Commit Graph

39 Commits (7ab6175cf4488fbefd71d0bfa5c1b0ccc5e6d52a)

Author SHA1 Message Date
Amir Zarrinkafsh fad6317bb5
ci(buildkite): remove test concurrency step (#2384)
* ci(buildkite): remove test concurrency step

* fix: remove concurrency_group from integration test steps
2021-09-17 11:09:38 +10:00
Amir Zarrinkafsh 92ec00d7c5
feat: builds with gox and buildx (#2381)
* feat: builds with gox and buildx

This change builds all of Authelia respective binaries in parallel within a single step and distributes as necessary to subsequent steps, we now also build and distribute for the following OS/Architecture: freebsd/amd64.

Our CI/CD pipeline now also utilises docker buildx as a default for builds and pushes.

* refactor: clean up docker helper

* Remove `authelia-scripts docker push-image` command as all pushes will be performed with buildx and manifests
* Rename the --arch flag to --container
* Add Dockerfile.dev for users that want to build an Authelia container from source without utilising suites
* Set Dockerfile.dev as default for `authelia-scripts docker build` command

* refactor: variant -> container
2021-09-16 22:39:18 +10:00
Amir Zarrinkafsh 87550d1957
ci(buildkite): add [skip-test] and [test-skip] conditionals (#2265)
If a commit message includes either `[skip-test]` or `[test-skip]` a some CI steps will be ignored.

This is to allow rapid deployments and prototyping when attempting fixes, under no circumstances should any PR to master be accepted with said tags/conditionals.
2021-08-07 10:06:42 +10:00
Amir Zarrinkafsh 3422062697
ci(buildkite): make test concurrency gate conditional (#2242)
This ensures that the test concurrency gate step does not run on tagged releases are the integration steps are also skipped.
2021-08-05 16:19:18 +10:00
James Elliott 71fe953a4e
ci: skip integration test stage for examples (#2220)
This skips integration tests for any commits/PR's that only make changes to the examples/ folder as it's not a change that requires this check.
2021-08-02 13:32:04 +10:00
Amir Zarrinkafsh a59081890b
docs: add code of conduct (#2214)
Create CODE_OF_CONDUCT.md.
2021-07-30 16:46:06 +10:00
Amir Zarrinkafsh 636991031d
ci(buildkite): fix conditional for debian packages (#2123) 2021-06-27 13:58:58 +10:00
Amir Zarrinkafsh 4349adb090
ci(buildkite): add conditional for debian package builds with dep bumps (#2121) 2021-06-26 13:56:54 +10:00
Amir Zarrinkafsh 93e20a44e9
feat: build and distribute .deb packages (#2114)
* feat: build and distribute .deb packages

Creates .deb packages for distribution via GitHub releases and Buildkite builds for the following architectures:

* amd64
* armhf
* arm64

* fix: pkgver reference in debpackages.sh

* refactor: split deb packaging jobs and quote variables

* fix: pipeline upload for debpackages

* fix: depends_on key for debpackages

* fix: add depends_on: ~ for debpackages step

* fix: pre-artifact hook for debpackages

* fix: add .deb suffix in pre-artifact hook

* fix: variable reference in debhelper.sh

* refactor: silence wget output in debhelper.sh

* refactor: make build concurrency gate only depend_on docker builds

* refactor: make build concurrency gate also depend_on coverage build

* refactor: remove dependencies for build concurrency gate
2021-06-26 11:45:21 +10:00
Amir Zarrinkafsh 756aee507f
refactor: cra build path (#2117)
* refactor: cra build path

The `authelia-scripts` helper currently performs steps to move files around in different stages of development and CI/CD.

We now utilise the `BUILD_PATH` environment variable to adjust the output directory for the web frontend from the default of `./web/build/` simplifying the helper somewhat.

Additionally we no longer build the Go binary in the unit test stage of our CI/CD as this is not necessary.

* fix: build output directory in coverage dockerfile
2021-06-25 21:53:20 +10:00
James Elliott 5b9f505e6c
docs: add issue templates (#1847)
* docs: add issue templates
* ci: skip .github/ dir
2021-03-24 09:50:11 +11:00
Amir Zarrinkafsh 582ca4cbb1
ci(buildkite): optimise job to agent assignment (#1754)
Split out unit-testing jobs to ensure that the workloads are evenly spread.
2021-02-22 14:24:01 +11:00
Amir Zarrinkafsh 6daeaf4e47
ci(buildkite): add concurrency limits to build and test steps (#1751)
Due to the unpredictability of changes that Renovate can submit this PR will allow us to control the number of jobs that will run simultaneously per step.
2021-02-22 11:13:51 +11:00
Amir Zarrinkafsh 8c79e6beca
ci(buildkite): utilise conventional-changelog for release notes (#1714)
Instead of generating our changelog based on crude modifications utilising git log we now utilise conventional-changelog.

conventional-changelog utilises the angular commit structure to categorise and display the changelog for 3 types (fix,feat,perf) and each of the change scopes are identified in the changelog too.

An example of the output for v4.26.0 can be found below:

# [4.26.0](https://github.com/authelia/authelia/compare/v4.25.2...v4.26.0) (2021-02-02)

### Bug Fixes

* **handlers:** refresh user details on all domains ([#1642](https://github.com/authelia/authelia/issues/1642)) ([60ff16b](60ff16b518))

### Docker Container
* `docker pull authelia/authelia:4.26.0`
2021-02-12 14:00:36 +11:00
James Elliott 9e1b6ba82e
ci: consider .all-contributorsrc a docs file for the pipeline (#1704)
* ci: consider .all-contributorsrc a docs file for the pipeline

This change prevents the unit/integration testing and image deployment similar to other docs only changes.
2021-02-05 14:26:16 +11:00
Amir Zarrinkafsh d71dbd4858
ci(buildkite): update buildkite deployment steps (#1678)
This PR modifies the Buildkite CI pipeline with the following changes:

* Add `SECURITY.md` to CI_BYPASS
* Skip Docker {amd64,arm32v7,arm64v8} builds for renovate PRs
* Ensure Deploy Manifest step only is assigned to deployment nodes
2021-01-31 11:49:36 +11:00
Amir Zarrinkafsh 3487fd392e
[FEATURE] Add API docs and swagger-ui (#1544)
* [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>
2021-01-03 15:28:46 +11:00
Amir Zarrinkafsh 0bf192aae0
[CI] Adjust reviewdog filtermode for linting (#1506)
This will ensure that linter errors are picked up for the entire codebase instead of just against the default of [added/modified lines](https://github.com/reviewdog/reviewdog#added-default).
2020-12-03 18:06:42 +11:00
Amir Zarrinkafsh 8dfe5c7d70
[CI] Fail linting step on errors (#1307) 2020-09-04 14:06:10 +10:00
Amir Zarrinkafsh 0df8f6bfe3
[CI] Collect and upload coverage on master branch (#1174) 2020-07-02 08:56:45 +02:00
vdot0x23 6ccc92e47e
do not hardcode /bin/bash (#1122)
Co-authored-by: Victor Büttner <victor@0x23.dk>
Co-authored-by: Clément Michaud <clement.michaud34@gmail.com>
2020-06-18 09:49:13 +02:00
Amir Zarrinkafsh d123fe4785
[CI] Add Codecov support (#1065)
* [CI] Add Codecov support

* [CI] Capture backend coverage from integration tests

* [CI] Remove unnecessary artifacts for coverage build

* [CI] Only run coverage elements where necessary

* [CI] Simplify post-command hook

* Fix yarn dependencies and collect coverage

* [CI] Include cmd/authelia/ path in coverage

* [CI] Exclude internal/suites/ in coverage

Closes #1061.
2020-06-05 10:43:19 +10:00
James Elliott 9947371ef8
[CI] Run unit tests on master and tagged commits (#953) 2020-05-02 11:41:53 +10:00
Amir Zarrinkafsh 12100d21e2
[CI] Linting optimisations (#940)
* [CI] Lint all builds except tagged commits to satisfy branch protection

* [CI] Add automatic retries for linting failures
This is to treat any issues with the reviewdog API server and occasional failures we are seeing.
2020-04-29 12:30:46 +10:00
Amir Zarrinkafsh f8bd506326
[FEATURE] Embed static assets in Go binary (#916)
* [FEATURE] Embed static assets in Go binary

* Refactor/consolidate code and specify public_html via configuration

* Update docs and config template for assets

* Update AUR package pre-requisites and systemd unit

* Include static assets as Buildkite and GitHub artifacts

* Remove references to PUBLIC_DIR

* Only serve assets via embedded filesystem and remove configuration references

* Update authelia-scripts helper to build the embedded filesystem

* Mock the embedded filesystem for unit tests
Add to gitignore to ensure this isn't overwritten.

* Move go:generate to satisfy linter
2020-04-29 00:07:20 +10:00
Amir Zarrinkafsh 0ec3f18b44
[CI] Introduce GitHub checks based linting with reviewdog (#900)
* [CI] Introduce linting for branch commits with reviewdog
This utilises the GitHub checks API and could be a potential candidate instead of in-line PR reviews.

* [CI] Change reporter to `github-check`

* [CI] Adjust linting in-line PR commentary to execute with linting step
2020-04-22 23:10:22 +10:00
Amir Zarrinkafsh 580152b40b
[FEATURE] Include darwin based binaries for OSX (#814)
Build and publish binary artifacts for Authelia which can be run directly from OSX.
2020-04-03 16:13:24 +11:00
Amir Zarrinkafsh 6128081e1f
[Buildkite] Adjust CI bypasses (#804) 2020-04-01 09:44:57 +11:00
Amir Zarrinkafsh 92023de85d
[Buildkite] Tweak pipeline to conditionally ignore a wait step (#781) 2020-03-25 14:09:35 +11:00
Amir Zarrinkafsh d95bda8cdc
[Buildkite] Fix pipeline regression for master deployments (#770)
Fixes the regression #766 introduced as when the `build.branch` is `master` `build.tag` is `""`.
2020-03-22 16:36:18 +11:00
Amir Zarrinkafsh 8b64c9aad5
[Buildkite] Optimise pipeline for tagged deployments (#766)
* [Buildkite] Optimise pipeline for tagged deployments
Ensure Unit and Integration testing is bypassed for tagged builds.

* Apply suggestions from code review

Co-Authored-By: Clément Michaud <clement.michaud34@gmail.com>
2020-03-22 11:03:36 +11:00
Amir Zarrinkafsh 93abf699b8
[Buildkite] Fix docs bypass for origin/master divergences (#764)
If origin/master diverges beyond the initial fork-point on branches or external forks, the `git merge-base` command exits unsuccessfully. This will cause commits to incorrectly be recognised as a docs bypass. This change will catch the unsuccessful exit and treat it as a normal CI/CD run.

Examples:
- https://buildkite.com/authelia/authelia/builds/932
- https://buildkite.com/authelia/authelia/builds/933
- https://buildkite.com/authelia/authelia/builds/941
2020-03-21 14:42:29 +01:00
Amir Zarrinkafsh daba4d789f
[Buildkite] Optimise pipeline for deployments to master (#756)
Prior to this change all PR's which are merged into master would result in another run of the Unit and Integration testing.
This is not necessary because all steps have to pass for a PR to be accepted in to master, this will save significant time for deployments to master and reduce overall load to the Buildkite workers.
2020-03-20 14:03:50 +11:00
Amir Zarrinkafsh 06e36f89e3
[Buildkite] Fix unbound variable for docs bypass (#711) 2020-03-15 22:01:52 +11:00
Amir Zarrinkafsh a24ca937cd
[Buildkite] Fix docs bypass for tagged releases (#709) 2020-03-15 21:07:23 +11:00
Amir Zarrinkafsh 8b80be4061
[Buildkite] Utilise annotations for build notifications (#700)
* [Buildkite] Utilise annotations for artifact and doc bypass notifications

* [Buildkite] Add context to annotations

* [Buildkite] Adjust docs annotation to display for PRs
2020-03-11 10:25:47 +11:00
Amir Zarrinkafsh 6af27cb3f9
[Buildkite] Fix CI docs bypass by ensuring HEAD diff for master is correct (#699) 2020-03-09 17:45:15 +11:00
Amir Zarrinkafsh df431b32c8
[Buildkite] Compare to `origin/master` for docs bypass (#696) 2020-03-09 15:59:58 +11:00
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