diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 63e1b7d7795f5dcb8c22c8190a4cb9f61f3553dd..39bbac71740f2dad862d16aeda194e785db36505 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,7 @@ stages: - static_tests - dynamic_tests - deployment - + # build the container that further steps will run in in order to avoid duplicating instructions between steps metabuild: stage: metabuild @@ -26,10 +26,12 @@ metabuild: - "pica-etherpad/*" - "pica-tellform/*" - "pica-wekan/*" + - "pica-sympa/*" refs: - master - dev-ci - tx-services-p19-test + - dev-sympa # build the container that was modified build: @@ -50,10 +52,12 @@ build: - "pica-etherpad/*" - "pica-tellform/*" - "pica-wekan/*" + - "pica-sympa/*" refs: - master - dev-ci - tx-services-p19-test + - dev-sympa # run CoreOS' Clair and make the CI failed if a critical vulnerability isn't in the whitelist clair: @@ -83,10 +87,12 @@ clair: - "pica-etherpad/*" - "pica-tellform/*" - "pica-wekan/*" + - "pica-sympa/*" refs: - master - dev-ci - tx-services-p19-test + - dev-sympa # run docker-bench-security and upload the results docker-bench-security: @@ -119,12 +125,14 @@ docker-bench-security: changes: - "pica-dokuwiki/*" - "pica-etherpad/*" - - "pica-tellform/*" + - "pica-tellform/*" - "pica-wekan/*" + - "pica-sympa/*" refs: - master - dev-ci - tx-services-p19-test + - dev-sympa # automatically deploy the container on pica01-test deployment-test: @@ -146,7 +154,7 @@ deployment-test: - echo $REGISTRY_PASSWORD | docker login $REGISTRY -u $REGISTRY_USERNAME --password-stdin - docker pull $REGISTRY/ci-builds/$CI_COMMIT_SHA:latest - docker tag $REGISTRY/ci-builds/$CI_COMMIT_SHA:latest $MODIFIED_IMAGE_FULL - script: + script: - cd $MODIFIED_IMAGE - sed -i -e s/picasoft.net/test.picasoft.net/g docker-compose.yml - for VOLUME in $(docker-compose config --volumes | sed 's/-volume//g'); do if [[ ! $(docker volume ls -q | grep "^$VOLUME\$") ]]; then docker volume create --name=$VOLUME; fi; done @@ -162,10 +170,12 @@ deployment-test: - "pica-etherpad/*" - "pica-tellform/*" - "pica-wekan/*" + - "pica-sympa/*" refs: - master - dev-ci - tx-services-p19-test + - dev-sympa # automatically deploy the container on the production host associated with the modified image # this will only happen after manually triggering the deployment @@ -210,6 +220,4 @@ deployment-prod: - "pica-wekan/*" refs: - master - - dev-ci - - tx-services-p19-test when: manual