mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
3487fd392e
* [FEATURE] Add API docs and swagger-ui This change will serve out swagger-ui at the `/api/` root path. * Update descriptions and summaries in API spec * Utilise frontend assets from unit testing for Docker build steps * Fix tag for /api/user/* endpoints * Fix response schema for /api/user/info/2fa_method * Template and inject the session name during runtime into swagger-ui This change also factorises and renames index.go into template.go, this can now be generically utilised to template any file. * Fix integration tests * Add U2F endpoints * Change swagger directory to api This change is to more closely conform to the golang-standards project layout. * Add authentication for u2f endpoints * Modify u2f endpoint descriptions * Rename and fix u2f 2fa sign endpoints * Fix request body for /api/secondfactor/u2f/sign endpoint Co-authored-by: James Elliott <james-d-elliott@users.noreply.github.com>
59 lines
1.8 KiB
Bash
Executable File
59 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -u
|
|
|
|
DIVERGED=$(git merge-base --fork-point origin/master > /dev/null; echo $?)
|
|
|
|
if [[ $DIVERGED == 0 ]]; then
|
|
if [[ $BUILDKITE_TAG == "" ]]; then
|
|
if [[ $BUILDKITE_BRANCH == "master" ]]; then
|
|
CI_BYPASS=$(git diff --name-only HEAD~1 | sed -rn '/^(BREAKING.md|CONTRIBUTING.md|README.md|docs\/.*)/!{q1}' && echo true || echo false)
|
|
else
|
|
CI_BYPASS=$(git diff --name-only `git merge-base --fork-point origin/master` | sed -rn '/^(BREAKING.md|CONTRIBUTING.md|README.md|docs\/.*)/!{q1}' && echo true || echo false)
|
|
fi
|
|
|
|
if [[ $CI_BYPASS == "true" ]]; then
|
|
cat .buildkite/annotations/bypass | buildkite-agent annotate --style "info" --context "ctx-info"
|
|
fi
|
|
else
|
|
CI_BYPASS="false"
|
|
fi
|
|
else
|
|
CI_BYPASS="false"
|
|
fi
|
|
|
|
cat << EOF
|
|
env:
|
|
CI_BYPASS: ${CI_BYPASS}
|
|
|
|
steps:
|
|
- label: ":service_dog: Linting"
|
|
command: "reviewdog -reporter=github-check -filter-mode=nofilter -fail-on-error"
|
|
retry:
|
|
automatic: true
|
|
if: build.branch !~ /^(v[0-9]+\.[0-9]+\.[0-9]+)$\$/
|
|
|
|
- label: ":hammer_and_wrench: Unit Test"
|
|
command: "authelia-scripts --log-level debug ci"
|
|
artifact_paths:
|
|
- "authelia-public_html.tar.gz"
|
|
- "authelia-public_html.tar.gz.sha256"
|
|
key: "unit-test"
|
|
if: build.env("CI_BYPASS") != "true"
|
|
|
|
- wait:
|
|
if: build.env("CI_BYPASS") != "true"
|
|
|
|
- label: ":docker: Image Builds"
|
|
command: ".buildkite/steps/buildimages.sh | buildkite-agent pipeline upload"
|
|
depends_on: ~
|
|
if: build.env("CI_BYPASS") != "true"
|
|
|
|
- wait:
|
|
if: build.branch !~ /^(v[0-9]+\.[0-9]+\.[0-9]+)$\$/ && build.env("CI_BYPASS") != "true"
|
|
|
|
- label: ":chrome: Integration Tests"
|
|
command: ".buildkite/steps/e2etests.sh | buildkite-agent pipeline upload"
|
|
depends_on:
|
|
- "build-docker-linux-coverage"
|
|
if: build.branch !~ /^(v[0-9]+\.[0-9]+\.[0-9]+)$\$/ && build.env("CI_BYPASS") != "true"
|
|
EOF |