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 default: false
orbs: orbs:
aws-white-list-circleci-ip: configure/aws-white-list-circleci-ip@1.0.1 gresham: gresham-computing/gresham-orb@5.1.0
executors: executors:
docker-executor: docker-executor:
docker: 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_auth:
aws_access_key_id: $AWS_ACCESS_KEY_ID aws_access_key_id: $GIS_PRD_ECR_INT_BUILD_ACCESS_KEY
aws_secret_access_key: $AWS_SECRET_ACCESS_KEY aws_secret_access_key: $GIS_PRD_ECR_INT_BUILD_SECRET_ACCESS_KEY
jobs: jobs:
build-and-deploy: build-and-deploy:
@ -23,7 +23,9 @@ jobs:
- checkout - checkout
- get-maven-settings-file - get-maven-settings-file
- restore-cache - restore-cache
- whitelist-add - gresham/get-whitelister
- gresham/whitelist-add:
pattern: OpenId
- run: - run:
name: "Setting Maven version" name: "Setting Maven version"
command: | command: |
@ -43,7 +45,8 @@ jobs:
- generate-download-urls: - generate-download-urls:
extension: jar extension: jar
- save-cache - save-cache
- whitelist-remove - gresham/whitelist-remove:
pattern: OpenId
- persist-workspace - persist-workspace
test: test:
@ -52,27 +55,33 @@ jobs:
- attach_workspace: - attach_workspace:
at: . at: .
- restore-cache - restore-cache
- whitelist-add - gresham/get-whitelister
- gresham/whitelist-add:
pattern: OpenId
- run: - run:
name: "Running tests" name: "Running tests"
command: mvn -fae -s gresham-nexus-settings/ctc.plugins.settings.xml test -B -V -U command: mvn -fae -s gresham-nexus-settings/ctc.plugins.settings.xml test -B -V -U
- save-test-results - save-test-results
- save-cache - save-cache
- persist-workspace - persist-workspace
- whitelist-remove - gresham/whitelist-remove:
pattern: OpenId
release: release:
executor: docker-executor executor: docker-executor
steps: steps:
- checkout - checkout
- get-maven-settings-file - get-maven-settings-file
- whitelist-add - gresham/get-whitelister
- gresham/whitelist-add:
pattern: OpenId
- restore-cache - restore-cache
- run: - run:
name: Creating openid-connect-server release and next snapshot 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 command: chmod +x .circleci/cci_create_release_and_snapshot.sh && .circleci/cci_create_release_and_snapshot.sh
- save-cache - save-cache
- whitelist-remove - gresham/whitelist-remove:
pattern: OpenId
workflows: workflows:
build-and-test: build-and-test:
@ -121,20 +130,6 @@ commands:
git config --global url."https://api:${GITHUB_GRESHAM_PW}@github.com/".insteadOf "https://github.com/" 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 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: save-cache:
steps: steps:
- save_cache: - save_cache: