Skip to content

Commit

Permalink
WS-3238 Migrate to image 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszmichalak committed May 24, 2024
1 parent 459156a commit f3ed363
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,19 @@ jobs:

steps:
-
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
-
name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v2'
with:
role-to-assume: ${{ secrets.AWS_CI_ROLE_TO_ASSUME }}
role-session-name: CypressJdkMavenImageRelease
aws-region: us-east-1
-
name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v1
with:
registry-type: public
workload_identity_provider: ${{ secrets.GCP_WEBSIGHT_RELEASES_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_WEBSIGHT_RELEASES_RELEASE_DEPLOY_SA }}
-
name: Setup docker auth
run: gcloud auth configure-docker europe-west1-docker.pkg.dev
-
name: Set up QEMU # https://github.com/docker/buildx/issues/499
uses: docker/setup-qemu-action@v2
Expand All @@ -44,4 +41,4 @@ jobs:
context: .
platforms: linux/amd64
push: true
tags: public.ecr.aws/ds/cypress-jdk-maven:${{ github.ref_name }}
tags: europe-west1-docker.pkg.dev/websight-io/websight-docker-releases/cypress-jdk-maven:${{ github.ref_name }}
14 changes: 3 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
FROM cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1
FROM cypress/browsers:node16.16.0-chrome107-ff107
LABEL maintainer="WebSight Team <https://www.websight.io/>"

ARG MAVEN_VERSION=3.8.6
ARG MAVEN_DOWNLOAD_SHA512=f790857f3b1f90ae8d16281f902c689e4f136ebe584aba45e4b1fa66c80cba826d3e0e52fdd04ed44b4c66f6d3fe3584a057c26dfcac544a60b301e6d0f91c26

# https://linux.debian.bugs.dist.narkive.com/mPcDlYo6/bug-863199-error-creating-symbolic-link-usr-share-man-man1-rmid-1-gz-dpkg-tmp
RUN mkdir -p /usr/share/man/man1

RUN apt update \
&& apt -y install openjdk-17-jre openjdk-17-jdk git unzip curl \
&& apt -y install openjdk-17-jre openjdk-17-jdk git unzip \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

Expand All @@ -21,9 +18,4 @@ RUN wget https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
ENV M2_HOME=/opt/maven
ENV MAVEN_HOME=/opt/maven
ENV PATH=/opt/maven/bin:${PATH}

RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "/tmp/awscliv2.zip" \
&& unzip /tmp/awscliv2.zip -d /tmp \
&& ./tmp/aws/install \
&& rm -rf /tmp/aws /tmp/awscliv2.zip
ENV PATH=/opt/maven/bin:${PATH}

0 comments on commit f3ed363

Please sign in to comment.