Merge pull request #32 from gresham-computing/orbUpgrade

DWN-42625 : introduce Gresham Orb and update build executor image
pull/1601/head
Harry Smith 2023-05-02 12:59:49 +01:00 committed by GitHub
commit 0eb7a458e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 24 deletions

14
.circleci/README.md Normal file
View File

@ -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)

View File

@ -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:
@ -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: |
@ -43,7 +45,8 @@ jobs:
- generate-download-urls:
extension: jar
- save-cache
- whitelist-remove
- gresham/whitelist-remove:
pattern: OpenId
- persist-workspace
test:
@ -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:
@ -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: