[ci] feat: improve readability on gitlab run rules
This commit is contained in:
parent
97bb57e8e0
commit
ca10f5d745
2 changed files with 6 additions and 7 deletions
|
|
@ -7,11 +7,10 @@ deployment:
|
||||||
name: "cr.simoncor.net/siempie/ansible-deployment:latest"
|
name: "cr.simoncor.net/siempie/ansible-deployment:latest"
|
||||||
entrypoint: ["/bin/sh", "-c"]
|
entrypoint: ["/bin/sh", "-c"]
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PIPELINE_SOURCE == "push"'
|
|
||||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
||||||
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
||||||
- when: "never"
|
|
||||||
|
|
||||||
|
# run only on push to default branch
|
||||||
|
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
||||||
|
- when: "never"
|
||||||
|
|
||||||
# prepare ssh
|
# prepare ssh
|
||||||
before_script:
|
before_script:
|
||||||
|
|
@ -25,7 +24,6 @@ deployment:
|
||||||
echo "$SSH_DEPLOYMENT_KEY" > ~/.ssh/id_ed25519
|
echo "$SSH_DEPLOYMENT_KEY" > ~/.ssh/id_ed25519
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
|
|
||||||
|
|
||||||
# deployment commands
|
# deployment commands
|
||||||
script:
|
script:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,9 @@ linting:
|
||||||
name: "cr.simoncor.net/siempie/ansible-deployment:latest"
|
name: "cr.simoncor.net/siempie/ansible-deployment:latest"
|
||||||
entrypoint: ["/bin/sh", "-c"]
|
entrypoint: ["/bin/sh", "-c"]
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PIPELINE_SOURCE == "push"'
|
|
||||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
# run only on push to default branch
|
||||||
|
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
||||||
- when: "never"
|
- when: "never"
|
||||||
|
|
||||||
# start linting
|
# start linting
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue