Skip to content

Commit 368dfd7

Browse files
authored
Supply Docker images on ECR
* Try AWS integration * Test * Use latest orb * Test push * ECR Login * Login to ECR * Validated permissions * Temporarily lock version of oscrypto until bug fixed wbond/oscrypto#78 * Updated docs * Push to ECR
1 parent 39ceb12 commit 368dfd7

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

.circleci/config.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
version: 2.1
22

33
orbs:
4-
aws-cli: circleci/aws-cli@1.3.1
4+
aws-cli: circleci/aws-cli@4.1.1
5+
aws-ecr: circleci/aws-ecr@9.0.0
56

67
workflows:
78
build:
@@ -349,6 +350,13 @@ jobs:
349350
- image: cimg/base:stable
350351
steps:
351352
- setup_remote_docker
353+
- aws-cli/setup:
354+
role_arn: "${AWS_ROLE_ARN}"
355+
region: "us-east-1"
356+
- run:
357+
name: Login to AWS ECR
358+
command: |
359+
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/nsmithuk
352360
- run:
353361
name: Login to Docker Hub
354362
command: |
@@ -362,12 +370,20 @@ jobs:
362370
name: Copy image to new tag
363371
command: |
364372
./regctl image copy nsmithuk/local-kms:circleci nsmithuk/local-kms:latest
373+
./regctl image copy nsmithuk/local-kms:circleci public.ecr.aws/nsmithuk/local-kms:latest
365374
366375
build-docker-push-tag:
367376
docker:
368377
- image: cimg/base:stable
369378
steps:
370379
- setup_remote_docker
380+
- aws-cli/setup:
381+
role_arn: "${AWS_ROLE_ARN}"
382+
region: "us-east-1"
383+
- run:
384+
name: Login to AWS ECR
385+
command: |
386+
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/nsmithuk
371387
- run:
372388
name: Login to Docker Hub
373389
command: |
@@ -384,8 +400,11 @@ jobs:
384400
echo "Version Full << pipeline.git.tag >>"
385401
echo "Version Major $VERSION_MAJOR"
386402
387-
./regctl image copy nsmithuk/local-kms:circleci nsmithuk/local-kms:${VERSION_MAJOR}
388-
./regctl image copy nsmithuk/local-kms:circleci nsmithuk/local-kms:<< pipeline.git.tag >>
403+
./regctl image copy nsmithuk/local-kms:circleci nsmithuk/local-kms:${VERSION_MAJOR}
404+
./regctl image copy nsmithuk/local-kms:circleci nsmithuk/local-kms:<< pipeline.git.tag >>
405+
406+
./regctl image copy nsmithuk/local-kms:circleci public.ecr.aws/nsmithuk/local-kms:${VERSION_MAJOR}
407+
./regctl image copy nsmithuk/local-kms:circleci public.ecr.aws/nsmithuk/local-kms:<< pipeline.git.tag >>
389408
390409
release-artifacts-s3:
391410
executor: aws-cli/default

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ Pre-built binaries:
5555

5656
## Getting Started with Docker
5757

58+
Images are available on both [Docker Hub](https://hub.docker.com/r/nsmithuk/local-kms) and [AWS Public ECR](https://gallery.ecr.aws/nsmithuk/local-kms).
59+
5860
The quickest way to get started is with Docker. To get LKMS up, running and accessible on port 8080, you can run:
5961
```
6062
docker run -p 8080:8080 nsmithuk/local-kms

tests/functional/requirments.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ pytest
22
requests
33
aws-requests-auth
44
pycryptodome
5-
oscrypto
5+
https://github.com/wbond/oscrypto/archive/d5f3437ed24257895ae1edd9e503cfb352e635a8.zip

0 commit comments

Comments
 (0)