authelia/.buildkite/deployment.sh
Amir Zarrinkafsh b70c4a744f
[Buildkite] Ignore unnecessary CI steps for docs/* only based commits (#690)
* [Buildkite] Ignore build and deploy steps for [DOCS] only based commits

* [Buildkite] Convert static pipelines into dynamic pipelines

* [Buildkite] Convert dynamic pipeline steps into heredocs

* [Buildkite] Fix indentation for aurpackages.sh

* [Buildkite] Rename docs bypass env variable

* [Buildkite] Fix automatic retries in integration tests
2020-03-09 12:32:07 +11:00

57 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
set -u
cat << EOF
env:
CI_DOCS_BYPASS: $(git diff --name-only `git merge-base --fork-point master` | sed -rn '/^docs\/.*/!{q1}' && echo true || echo false)
steps:
- label: ":docker: Image Deployments"
command: ".buildkite/steps/deployimages.sh | buildkite-agent pipeline upload"
concurrency: 1
concurrency_group: "deployments"
if: build.branch == "master" && build.env("CI_DOCS_BYPASS") != "true"
- label: ":docker: Image Deployments"
command: ".buildkite/steps/deployimages.sh | buildkite-agent pipeline upload"
if: build.branch != "master" && build.env("CI_DOCS_BYPASS") != "true"
- wait:
if: build.env("CI_DOCS_BYPASS") != "true"
- label: ":docker: Deploy Manifests"
command: "authelia-scripts docker push-manifest"
concurrency: 1
concurrency_group: "deployments"
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
if: build.branch == "master" && build.env("CI_DOCS_BYPASS") != "true"
- label: ":docker: Deploy Manifests"
command: "authelia-scripts docker push-manifest"
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
if: build.branch != "master" && build.env("CI_DOCS_BYPASS") != "true"
- label: ":github: Deploy Artifacts"
command: "ghartifacts.sh"
depends_on: ~
retry:
automatic: true
agents:
upload: "fast"
key: "artifacts"
if: build.tag != null
- label: ":linux: Deploy AUR"
command: ".buildkite/steps/aurpackages.sh | buildkite-agent pipeline upload"
depends_on: ~
if: build.tag != null || build.branch == "master" && build.env("CI_DOCS_BYPASS") != "true"
- label: ":book: Deploy Documentation"
command: "syncdoc.sh"
depends_on: ~
agents:
upload: "fast"
if: build.branch == "master"
EOF