Skip to content

Commit 1e81118

Browse files
AS-3979: Updated the release repo to cloudtools repo (#110)
* AS-3979: Updated the release repo to cloudtools repo * Added ecr configs in release container * Added permissions * Corrected case and proper separator for key value to fix warnings * corrected case of ui-build in dockerfile
1 parent 19ccfcc commit 1e81118

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

.github/workflows/release-container-image.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
required: true
1414
default: 'dev'
1515

16+
permissions:
17+
id-token: write
18+
contents: read
19+
1620
jobs:
1721
docker:
1822
runs-on: ubuntu-latest
@@ -23,6 +27,15 @@ jobs:
2327
username: ${{ secrets.DOCKER_USERNAME }}
2428
password: ${{ secrets.DOCKER_PASSWORD }}
2529

30+
- name: Configure AWS credentials via OIDC
31+
uses: aws-actions/configure-aws-credentials@v5
32+
with:
33+
role-to-assume: ${{ secrets.ECR_ROLE }}
34+
aws-region: us-east-1
35+
36+
- name: Login to Amazon ECR
37+
uses: aws-actions/amazon-ecr-login@v2
38+
2639
- name: Set up QEMU
2740
uses: docker/setup-qemu-action@v3
2841

@@ -47,4 +60,6 @@ jobs:
4760
with:
4861
platforms: linux/amd64,linux/arm64
4962
push: true
50-
tags: docker.io/datastax/pulsar-admin-console:${{ env.TAG }}
63+
tags: |
64+
${{ secrets.ECR_REGISTRY }}/datastax/pulsar-admin-console:${{ env.TAG }}
65+
docker.io/datastax/pulsar-admin-console:${{ env.TAG }}

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:16 as UI-BUILD
1+
FROM node:16 AS ui-build
22

33
WORKDIR /build
44

@@ -25,7 +25,7 @@ WORKDIR /home/appuser/
2525
USER 10001:0
2626

2727
RUN mkdir -p dashboard/dist && mkdir server && mkdir config && ls
28-
COPY --from=UI-BUILD --chown=10001:0 /build/dist /home/appuser/dashboard/dist
28+
COPY --from=ui-build --chown=10001:0 /build/dist /home/appuser/dashboard/dist
2929
COPY --chown=10001:0 config/default.json /home/appuser/config/
3030
COPY --chown=10001:0 server/package*.json /home/appuser/server/
3131
COPY --chown=10001:0 server/*.js /home/appuser/server/
@@ -35,7 +35,7 @@ WORKDIR /home/appuser/server
3535

3636
# OpenShift compatibility
3737
RUN chmod g+w /home/appuser
38-
ENV HOME /home/appuser
38+
ENV HOME=/home/appuser
3939

4040
EXPOSE 8080 8081 6454 6455
4141

0 commit comments

Comments
 (0)