2020-06-18 07:49:13 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-03-09 01:32:07 +00:00
|
|
|
set -u
|
|
|
|
|
2020-03-21 13:42:29 +00:00
|
|
|
DIVERGED=$(git merge-base --fork-point origin/master > /dev/null; echo $?)
|
|
|
|
|
2021-06-26 01:45:21 +00:00
|
|
|
if [[ "${DIVERGED}" == 0 ]]; then
|
|
|
|
if [[ "${BUILDKITE_TAG}" == "" ]]; then
|
|
|
|
if [[ "${BUILDKITE_BRANCH}" == "master" ]]; then
|
2022-05-24 12:28:45 +00:00
|
|
|
CI_BYPASS=$(git diff --name-only HEAD~1 | sed -rn '/^(CODE_OF_CONDUCT\.md|CONTRIBUTING\.md|README\.md|SECURITY\.md|crowdin\.yml|\.all-contributorsrc|\.editorconfig|\.github\/.*|docs\/.*|examples\/.*)/!{q1}' && echo true || echo false)
|
2020-03-21 13:42:29 +00:00
|
|
|
else
|
2022-05-24 12:28:45 +00:00
|
|
|
CI_BYPASS=$(git diff --name-only `git merge-base --fork-point origin/master` | sed -rn '/^(CODE_OF_CONDUCT\.md|CONTRIBUTING\.md|README\.md|SECURITY\.md|crowdin\.yml|\.all-contributorsrc|\.editorconfig|\.github\/.*|docs\/.*|examples\/.*)/!{q1}' && echo true || echo false)
|
2020-03-21 13:42:29 +00:00
|
|
|
fi
|
2020-03-15 10:07:23 +00:00
|
|
|
else
|
2020-03-31 22:44:57 +00:00
|
|
|
CI_BYPASS="false"
|
2020-03-15 10:07:23 +00:00
|
|
|
fi
|
2020-03-15 11:01:52 +00:00
|
|
|
else
|
2020-03-31 22:44:57 +00:00
|
|
|
CI_BYPASS="false"
|
2020-03-09 06:45:15 +00:00
|
|
|
fi
|
|
|
|
|
2020-03-09 01:32:07 +00:00
|
|
|
cat << EOF
|
|
|
|
env:
|
2020-03-31 22:44:57 +00:00
|
|
|
CI_BYPASS: ${CI_BYPASS}
|
2020-03-09 01:32:07 +00:00
|
|
|
|
2020-01-31 04:16:46 +00:00
|
|
|
steps:
|
2021-09-16 12:39:18 +00:00
|
|
|
- label: ":docker: Deploy Manifest"
|
2020-02-29 14:31:10 +00:00
|
|
|
command: "authelia-scripts docker push-manifest"
|
2021-09-16 12:39:18 +00:00
|
|
|
depends_on:
|
|
|
|
- "unit-test"
|
2021-08-07 01:04:21 +00:00
|
|
|
retry:
|
|
|
|
manual:
|
|
|
|
permit_on_passed: true
|
2021-01-31 00:49:36 +00:00
|
|
|
agents:
|
|
|
|
upload: "fast"
|
2020-04-29 04:06:35 +00:00
|
|
|
if: build.env("CI_BYPASS") != "true"
|
2020-01-31 04:16:46 +00:00
|
|
|
|
|
|
|
- label: ":github: Deploy Artifacts"
|
2020-02-29 00:43:59 +00:00
|
|
|
command: "ghartifacts.sh"
|
2020-05-02 03:22:17 +00:00
|
|
|
depends_on:
|
2021-09-16 12:39:18 +00:00
|
|
|
- "unit-test"
|
2021-06-26 01:45:21 +00:00
|
|
|
- "build-deb-package-amd64"
|
|
|
|
- "build-deb-package-armhf"
|
|
|
|
- "build-deb-package-arm64"
|
2020-02-28 21:58:44 +00:00
|
|
|
retry:
|
|
|
|
automatic: true
|
2020-01-31 04:16:46 +00:00
|
|
|
agents:
|
|
|
|
upload: "fast"
|
2020-02-19 23:25:28 +00:00
|
|
|
key: "artifacts"
|
|
|
|
if: build.tag != null
|
|
|
|
|
|
|
|
- label: ":linux: Deploy AUR"
|
|
|
|
command: ".buildkite/steps/aurpackages.sh | buildkite-agent pipeline upload"
|
2020-02-29 14:31:10 +00:00
|
|
|
depends_on: ~
|
2021-12-03 06:10:09 +00:00
|
|
|
if: build.tag != null && build.env("CI_BYPASS") != "true"
|
2020-02-29 00:43:59 +00:00
|
|
|
|
2021-07-05 02:49:48 +00:00
|
|
|
- label: ":debian: :fedora: :ubuntu: Deploy APT"
|
|
|
|
command: "aptdeploy.sh"
|
|
|
|
depends_on:
|
|
|
|
- "build-deb-package-amd64"
|
|
|
|
- "build-deb-package-arm64"
|
|
|
|
- "build-deb-package-armhf"
|
|
|
|
agents:
|
|
|
|
upload: "fast"
|
|
|
|
if: build.tag != null
|
|
|
|
|
2020-02-29 05:15:03 +00:00
|
|
|
- label: ":book: Deploy Documentation"
|
2020-02-29 00:43:59 +00:00
|
|
|
command: "syncdoc.sh"
|
2020-02-29 14:31:10 +00:00
|
|
|
depends_on: ~
|
2020-02-29 00:43:59 +00:00
|
|
|
agents:
|
|
|
|
upload: "fast"
|
|
|
|
if: build.branch == "master"
|
2020-03-09 01:32:07 +00:00
|
|
|
EOF
|