diff --git a/.gitlab-ci.deploy.yml b/.gitlab-ci.deploy.yml new file mode 100644 index 0000000..d19eb7d --- /dev/null +++ b/.gitlab-ci.deploy.yml @@ -0,0 +1,16 @@ +# We MUST have a separate pipeline otherwise the artifacts are stale! +# this is why we use an include file instead of a single file! + +stages: + - deploy + +my.remarkbox.com: + stage: deploy + tags: ["my.remarkbox.com"] + needs: + - build + script: + # deploy build via salt-call out to the salt-master for a highstate. + - sudo /opt/salt-call-state-highstate.sh + rules: + - if: '$CI_COMMIT_BRANCH == "main"' diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed09beb..8325fea 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ stages: - test - build - - my.remarkbox.com + - deploy - pypi-twine test: @@ -47,16 +47,14 @@ build: when: always -my.remarkbox.com: - stage: my.remarkbox.com - tags: ["my.remarkbox.com"] - needs: - - build - script: - # deploy build via salt-call out to the salt-master for a highstate. - - sudo /opt/salt-call-state-highstate.sh +deploy: + stage: deploy + needs: [build] rules: - - if: '$CI_COMMIT_BRANCH == "main"' + - if: '$CI_COMMIT_BRANCH == "develop" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"' + when: on_success + trigger: + include: .gitlab-ci.deploy.yml pypi-twine: