-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1154: Add circleci config check and create a more saving commit workflow
- Loading branch information
Showing
8 changed files
with
660 additions
and
547 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,14 @@ version: 2.1 | |
orbs: | ||
gradle: circleci/[email protected] | ||
browser-tools: circleci/[email protected] | ||
|
||
parameters: | ||
run_commit: | ||
default: false | ||
type: boolean | ||
run_backend: | ||
default: false | ||
type: boolean | ||
run_frontend: | ||
default: false | ||
type: boolean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
description: This command builds the circle config from the files in src and validates that it is up-to-date and valid. | ||
steps: | ||
- run: | ||
name: Install CircleCI CLI | ||
command: curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | sudo bash | ||
- run: | ||
name: Build circle config | ||
command: ./scripts/circleci-update-config.sh | ||
- run: # Taken from https://github.com/roopakv/orbs/blob/master/src/commands/fail_if_dirty.yml | ||
name: CircleCI config up to date | ||
# language=bash | ||
command: | | ||
FILES_MODIFIED="" | ||
setcommit () { | ||
FILES_MODIFIED=$(git status -s | grep -i -E '.*circleci/config.yml') | ||
} | ||
setcommit || true | ||
if [ -z "$FILES_MODIFIED" ] | ||
then | ||
echo "The CircleCI config is up to date." | ||
exit 0; | ||
else | ||
echo "The CircleCI config is not up to date. You can update it by running `yarn run circleci:update-config`." | ||
exit 1; | ||
fi | ||
- run: | ||
name: Validate circle config | ||
command: circleci config validate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
docker: | ||
- image: cimg/node:19.1.0-browsers | ||
resource_class: small | ||
environment: | ||
TOTAL_CPUS: 1 # For resource_class small | ||
TZ: 'Europe/Berlin' # Should be removed in IGAPP-39 | ||
shell: /bin/bash -eo pipefail | ||
steps: | ||
- checkout | ||
- check-circleci-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
when: << pipeline.parameters.run_backend >> | ||
jobs: | ||
- backend-build | ||
- administration-build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
when: << pipeline.parameters.run_commit >> | ||
jobs: | ||
- check | ||
- backend-build | ||
- backend-pack: | ||
requires: | ||
- backend-build | ||
- backend-health-check: | ||
requires: | ||
- backend-pack | ||
- check-frontend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
when: << pipeline.parameters.run_frontend >> | ||
jobs: | ||
- check-frontend | ||
- frontend-android-build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ cat .circleci/autogenerated_header.yml; circleci config pack .circleci/src; } > .circleci/config.yml && circleci config validate |