Skip to content

DWN-42625 : introduce Gresham Orb and update build executor image #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .circleci/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# How to make changes?
##### Install the CircleCI CLI:
https://circleci.com/docs/2.0/local-cli/#installation

##### Making a change
Change the areas of the .circleci/config.yml file that need to be edited

##### To verify your changes
Any config can be verified, to ensure your changes are valid against the yaml and orb schemas,
from the root of the project, run: `circleci config validate .circleci/config.yml --org-slug gh/gresham-computing --token $CIRCLE_TOKEN`

##### Possible errors:
- Your file must be encoded in UTF-8 (powershell defaulted to UTF-16)
- Must use Unix style line endings (LF, not CRLF)
43 changes: 19 additions & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ parameters:
default: false

orbs:
aws-white-list-circleci-ip: configure/aws-white-list-circleci-ip@1.0.1
gresham: gresham-computing/gresham-orb@5.1.0

executors:
docker-executor:
docker:
- image: 455456581940.dkr.ecr.eu-west-1.amazonaws.com/circleci-build-images:corretto-8u342
- image: 399104266609.dkr.ecr.eu-west-1.amazonaws.com/circleci-build-images:corretto-8u342
aws_auth:
aws_access_key_id: $AWS_ACCESS_KEY_ID
aws_secret_access_key: $AWS_SECRET_ACCESS_KEY
aws_access_key_id: $GIS_PRD_ECR_INT_BUILD_ACCESS_KEY
aws_secret_access_key: $GIS_PRD_ECR_INT_BUILD_SECRET_ACCESS_KEY

jobs:
build-and-deploy:
Expand All @@ -23,7 +23,9 @@ jobs:
- checkout
- get-maven-settings-file
- restore-cache
- whitelist-add
- gresham/get-whitelister
- gresham/whitelist-add:
pattern: OpenId
- run:
name: "Setting Maven version"
command: |
Expand All @@ -43,7 +45,8 @@ jobs:
- generate-download-urls:
extension: jar
- save-cache
- whitelist-remove
- gresham/whitelist-remove:
pattern: OpenId
- persist-workspace

test:
Expand All @@ -52,27 +55,33 @@ jobs:
- attach_workspace:
at: .
- restore-cache
- whitelist-add
- gresham/get-whitelister
- gresham/whitelist-add:
pattern: OpenId
- run:
name: "Running tests"
command: mvn -fae -s gresham-nexus-settings/ctc.plugins.settings.xml test -B -V -U
- save-test-results
- save-cache
- persist-workspace
- whitelist-remove
- gresham/whitelist-remove:
pattern: OpenId

release:
executor: docker-executor
steps:
- checkout
- get-maven-settings-file
- whitelist-add
- gresham/get-whitelister
- gresham/whitelist-add:
pattern: OpenId
- restore-cache
- run:
name: Creating openid-connect-server release and next snapshot
command: chmod +x .circleci/cci_create_release_and_snapshot.sh && .circleci/cci_create_release_and_snapshot.sh
- save-cache
- whitelist-remove
- gresham/whitelist-remove:
pattern: OpenId

workflows:
build-and-test:
Expand Down Expand Up @@ -121,20 +130,6 @@ commands:
git config --global url."https://api:${GITHUB_GRESHAM_PW}@github.com/".insteadOf "https://github.com/"
git clone https://github.com/gresham-computing/gresham-nexus-settings

whitelist-add:
steps:
- aws-white-list-circleci-ip/add:
description: "${CIRCLE_PROJECT_REPONAME}-${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM}"
tag-key: "Name"
tag-value: "SG-CircleCi-CTC"

whitelist-remove:
steps:
- aws-white-list-circleci-ip/remove:
description: "${CIRCLE_PROJECT_REPONAME}-${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM}"
tag-key: "Name"
tag-value: "SG-CircleCi-CTC"

save-cache:
steps:
- save_cache:
Expand Down