You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

43 lines
1.4 KiB

workflow:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH == 'staging'
- if: $CI_COMMIT_BRANCH == 'develop'
default:
image: docker:27.4.1
services:
- docker:27.4.1-dind
build:
stage: build
script:
- docker build --tag tildes-dev --file ./docker/Dockerfile-for-vagrant ./docker
- docker network create -d bridge test
- >
docker run
-v ./tildes:/opt/tildes
--detach
--network test
--name tildes-dev-main-container
tildes-dev
- >
docker run
-v ./ansible:/srv/ansible
--network test
debian:12
bash -c
'apt-get update
&& apt-get install -y openssh-client sshpass python3-pip
&& mkdir -p ~/.ssh
&& chmod 700 ~/.ssh
&& touch ~/.ssh/known_hosts
&& chmod 644 ~/.ssh/known_hosts
&& ssh-keyscan tildes-dev-main-container >> ~/.ssh/known_hosts
&& python3 -m pip install --break-system-packages ansible
&& ansible-galaxy collection install -r /srv/ansible/requirements.yml
&& ansible-playbook --inventory /srv/ansible/ci_inventory.ini /srv/ansible/playbook.yml
&& sshpass -pvagrant ssh vagrant@tildes-dev-main-container
"bash -c \". activate && invoke type-check test --quiet --full code-style-check --full\""'