Skip to content
Snippets Groups Projects
Commit 5a3012dd authored by David Trattnig's avatar David Trattnig
Browse files

Change stage order, add branch rules

parent 3fcc2659
No related branches found
No related tags found
No related merge requests found
Pipeline #1919 failed
image: python:3.8-buster image: python:3.8-buster
stages: stages:
- bundle
- test - test
- bundle
- deploy - deploy
- release - release
...@@ -22,25 +22,6 @@ cache: ...@@ -22,25 +22,6 @@ cache:
paths: paths:
- ./node_modules - ./node_modules
bundle_and_test:
stage: bundle
before_script:
- apt-get --quiet update
- apt-get --quiet --yes install nodejs
- npm install -g @apidevtools/swagger-cli
script:
- mkdir public
- swagger-cli bundle -t json $API_ROOT_FILE > $BUNDLED_JSON_FILE
- swagger-cli validate $BUNDLED_JSON_FILE
artifacts:
paths:
- public
expire_in: 2 days
only:
- $CI_DEFAULT_BRANCH
check_style: check_style:
stage: test stage: test
before_script: before_script:
...@@ -57,7 +38,25 @@ check_style: ...@@ -57,7 +38,25 @@ check_style:
# - pip3 install tox # - pip3 install tox
# - tox # - tox
pages: bundle_and_test:
stage: bundle
before_script:
- apt-get --quiet update
- apt-get --quiet --yes install nodejs
- npm install -g @apidevtools/swagger-cli
script:
- mkdir public
- swagger-cli bundle -t json $API_ROOT_FILE > $BUNDLED_JSON_FILE
- swagger-cli validate $BUNDLED_JSON_FILE
artifacts:
paths:
- public
expire_in: 2 days
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: always
deploy_spec:
stage: deploy stage: deploy
before_script: before_script:
- apt-get --quiet update - apt-get --quiet update
...@@ -73,8 +72,9 @@ pages: ...@@ -73,8 +72,9 @@ pages:
paths: paths:
- public - public
expire_in: 2 days expire_in: 2 days
only: rules:
- $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: always
docker-push: docker-push:
# Use the official docker image. # Use the official docker image.
......
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