From e27213757ca5c5fb1f59fef99fe2c9fd81c07eca Mon Sep 17 00:00:00 2001 From: Harry Pidcock Date: Fri, 25 Aug 2023 16:36:58 +1000 Subject: [PATCH] Add 4.4.24 candidate and publish to ecr. --- .github/workflows/release.yaml | 7 +++++++ Dockerfile | 4 +++- images.yaml | 22 ++++++++++++++++++++-- make_functions.sh | 6 +++--- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d03da60..8d14ade 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -99,6 +99,13 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to ECR Public + uses: docker/login-action@v2 + with: + registry: public.ecr.aws + username: ${{ secrets.RELEASE_ECR_ACCESS_KEY_ID }} + password: ${{ secrets.RELEASE_ECR_SECRET_ACCESS_KEY }} + - name: Push images if: ${{ success() && github.ref == 'refs/heads/master' }} run: | diff --git a/Dockerfile b/Dockerfile index 558c7fc..f35233b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,8 @@ RUN cp -R /squashfs-root/bin/* /bin \ && rm -Rf /squashfs-root \ && apt-get update \ && apt-get install -y libsqlite3-0 libgssapi-krb5-2 \ -&& rm -rf /var/lib/apt/lists/* +&& rm -rf /var/lib/apt/lists/* \ +&& groupadd --gid 170 juju \ +&& useradd --home-dir /var/lib/juju --shell /usr/sbin/nologin --no-create-home --uid 170 --gid 170 juju ENTRYPOINT [ /bin/mongod ] diff --git a/images.yaml b/images.yaml index 725b93c..cae395b 100644 --- a/images.yaml +++ b/images.yaml @@ -1,12 +1,13 @@ images: juju-db-4.4: registry_paths: - - jujusolutions/juju-db + - docker.io/jujusolutions/juju-db + - public.ecr.aws/juju/juju-db tags: - 4.4 - 4.4.18 build_args: - - BASE_IMAGE=ubuntu:20.04 + - BASE_IMAGE=public.ecr.aws/ubuntu/ubuntu:20.04 - SNAP_RISK=stable - SNAP_TRACK=4.4 - SNAP_VERSION=4.4.18 @@ -16,3 +17,20 @@ images: - linux/ppc64le - linux/s390x juju_test_channel: 3.1/stable + juju-db-4.4-next: + registry_paths: + - docker.io/jujusolutions/juju-db + - public.ecr.aws/juju/juju-db + tags: + - 4.4.24 + build_args: + - BASE_IMAGE=public.ecr.aws/ubuntu/ubuntu:20.04 + - SNAP_RISK=candidate + - SNAP_TRACK=4.4 + - SNAP_VERSION=4.4.24 + platforms: + - linux/arm64 + - linux/amd64 + - linux/ppc64le + - linux/s390x + juju_test_channel: 3.1/stable diff --git a/make_functions.sh b/make_functions.sh index 6ada780..70cd76c 100755 --- a/make_functions.sh +++ b/make_functions.sh @@ -55,9 +55,9 @@ build_image() { fi echo "Building ${image} for build args \"$build_args\" and platforms \"$platforms\"" - echo ${cmd_platforms} - docker buildx build ${cmd_platforms} ${cmd_build_args} \ - -f "$dockerfile" . ${cmd_tags} -o "$output" --progress=auto + BUILDX_NO_DEFAULT_ATTESTATIONS=true DOCKER_BUILDKIT=1 docker buildx build ${cmd_platforms} ${cmd_build_args} \ + -f "$dockerfile" . ${cmd_tags} -o "$output" --progress=auto \ + --provenance=false } microk8s_image_update() {