Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 8fd2318a authored by Raphael JOIE's avatar Raphael JOIE
Browse files

Merge branch '2-test-merge-request-event-type' into 'v1'

Resolve "test-merge-request-event-type"

Closes #2

See merge request !4
parents e63fe358 6d389799
Branches v1
No related tags found
1 merge request!4Resolve "test-merge-request-event-type"
Pipeline #132266 waiting for manual action
......@@ -19,12 +19,14 @@ stages:
- test-deploy
#https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines
#workflow:
# rules:
# - if: $CI_PIPELINE_SOURCE == "merge_request_event"
# - if: ($CI_COMMIT_BRANCH || $CI_COMMIT_TAG) && $CI_OPEN_MERGE_REQUESTS
# when: never
# - if: $CI_COMMIT_BRANCH || $CI_COMMIT_TAG
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
# Don't run on first init commit of a branch
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_BEFORE_SHA == "0000000000000000000000000000000000000000"
when: never
- if: $CI_COMMIT_BRANCH
debug:
stage: debug
......@@ -47,23 +49,13 @@ test-static-style-force-job:
- docker
- lab
variables:
SRC_PATH: api/src
rules:
# Don't run if only the tag was pushed
- if: $CI_COMMIT_TAG && $CI_COMMIT_BRANCH == null
when: never
- when: always
SRC_PATH: src/
test-static-style-check-job:
stage: test-static-style
tags:
- docker
- lab
rules:
# Don't run if only the tag was pushed
- if: $CI_COMMIT_TAG && $CI_COMMIT_BRANCH == null
when: never
- when: always
test-static-build-job:
stage: test-static-build
......@@ -73,17 +65,15 @@ test-static-build-job:
variables:
IMAGE_TAG: $CI_REGISTRY/$CI_PROJECT_PATH/api:test-$CI_COMMIT_SHORT_SHA
rules:
# Don't run if only the tag was pushed
- if: $CI_COMMIT_TAG && $CI_COMMIT_BRANCH == null
when: never
- if: $CI_COMMIT_MESSAGE =~ /\#test/ || ($NMS_CI_PIPELINE_TEST == "always" && $CI_COMMIT_MESSAGE !~ /\#wip/)
- when: manual
allow_failure: false
script:
- echo "test-static-build"
- echo $IMAGE_TAG
- docker --version
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --build-arg http_proxy=${HTTP_PROXY} --build-arg https_proxy=${HTTPS_PROXY} -t ${IMAGE_TAG} ./api
- docker build --build-arg http_proxy=${HTTP_PROXY} --build-arg https_proxy=${HTTPS_PROXY} -t ${IMAGE_TAG} ./src
- docker push $IMAGE_TAG
test-unit-job:
......@@ -93,9 +83,6 @@ test-unit-job:
- lab
image: code.europa.eu:4567/digit-c4/dev/python-best-practices/python-poetry:3.11-alpine
rules:
# Don't run if only the tag was pushed
- if: $CI_COMMIT_TAG && $CI_COMMIT_BRANCH == null
when: never
- when: always
script:
- echo "test-unit-job"
......@@ -107,9 +94,6 @@ test-integration-job:
- lab
image: code.europa.eu:4567/digit-c4/dev/python-best-practices/python-poetry:3.11-alpine
rules:
# Don't run if only the tag was pushed
- if: $CI_COMMIT_TAG && $CI_COMMIT_BRANCH == null
when: never
- when: always
script:
- echo "test-integration-job"
......@@ -121,9 +105,6 @@ test-e2e-job:
- lab
image: code.europa.eu:4567/digit-c4/dev/python-best-practices/python-poetry:3.11-alpine
rules:
# Don't run if only the tag was pushed
- if: $CI_COMMIT_TAG && $CI_COMMIT_BRANCH == null
when: never
- when: always
script:
- echo "test-e2e-job"
......@@ -138,7 +119,7 @@ test-trigger-deploy-job:
# Avoid looping
- if: $CI_COMMIT_TAG == "test-deploy"
when: never
# - if: $NMS_CI_PIPELINE_DEPLOY == "always"
- if: ($NMS_CI_PIPELINE_DEPLOY == "always" && $CI_COMMIT_MESSAGE !~ /\#wip/) || $CI_COMMIT_MESSAGE =~ /\#deploy/
- when: manual
script:
- echo "test-deploy +1"
......
FROM python
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment