From 21986c5637100d8644d9d15fda58523ee950a9f9 Mon Sep 17 00:00:00 2001 From: Stefan Hattrell <29941279+digorgonzola@users.noreply.github.com> Date: Tue, 27 Feb 2024 14:37:17 +1100 Subject: [PATCH] fix workflows to remove java-specific steps --- .github/environment/central.env | 2 -- .github/workflows/build_deploy_edge.yml | 12 --------- .github/workflows/release.yml | 35 ------------------------- 3 files changed, 49 deletions(-) diff --git a/.github/environment/central.env b/.github/environment/central.env index 24ac697..10f1db6 100644 --- a/.github/environment/central.env +++ b/.github/environment/central.env @@ -1,6 +1,4 @@ AWS_REGION=ap-southeast-2 AWS_ROLE_ARN=arn:aws:iam::851725428481:role/AodnGitHubActionsRole -CODEARTIFACT_DOMAIN=central-aodn-org-au -CODEARTIFACT_REPO=maven-aodn-store ECR_REGISTRY=851725428481.dkr.ecr.ap-southeast-2.amazonaws.com ECR_REPOSITORY=sample-django-app diff --git a/.github/workflows/build_deploy_edge.yml b/.github/workflows/build_deploy_edge.yml index 0c80dcf..86c104e 100644 --- a/.github/workflows/build_deploy_edge.yml +++ b/.github/workflows/build_deploy_edge.yml @@ -28,15 +28,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: '17' - cache: 'maven' - server-id: 'codeartifact' - server-password: 'CODEARTIFACT_AUTH_TOKEN' - - name: Configure AWS Credentials id: aws_auth uses: aws-actions/configure-aws-credentials@v4 @@ -45,9 +36,6 @@ jobs: aws-region: ${{ vars.AWS_REGION }} role-to-assume: ${{ vars.AWS_ROLE_ARN }} - - name: Build with Maven - run: mvn -B verify --file pom.xml - - name: Login to ECR uses: docker/login-action@v3 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d80006..697843c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,15 +25,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: '17' - cache: 'maven' - server-id: 'codeartifact' - server-password: 'CODEARTIFACT_AUTH_TOKEN' - - name: Configure AWS Credentials id: aws_auth uses: aws-actions/configure-aws-credentials@v4 @@ -42,32 +33,6 @@ jobs: aws-region: ${{ vars.AWS_REGION }} role-to-assume: ${{ vars.AWS_ROLE_ARN }} - - name: Get CodeArtifact Repository Authentication Token - run: | - TOKEN=$(aws codeartifact get-authorization-token \ - --domain ${{ vars.CODEARTIFACT_DOMAIN }} \ - --domain-owner ${{ steps.aws_auth.outputs.aws-account-id }} \ - --region ${{ vars.AWS_REGION }} \ - --query authorizationToken \ - --output text) - echo "CODEARTIFACT_AUTH_TOKEN=$TOKEN" >> "$GITHUB_ENV" - - - name: Get CodeArtifact Repository URL - run: | - REPO_URL=$(aws codeartifact get-repository-endpoint \ - --domain ${{ vars.CODEARTIFACT_DOMAIN }} \ - --repository ${{ vars.CODEARTIFACT_REPO }} \ - --format maven \ - --region ${{ vars.AWS_REGION }} \ - --output text) - echo "CODEARTIFACT_REPO_URL=$REPO_URL" >> "$GITHUB_ENV" - - - name: Build with Maven & Publish to CodeArtifact - run: mvn -B clean deploy --file pom.xml - env: - CODEARTIFACT_AUTH_TOKEN: ${{ env.CODEARTIFACT_AUTH_TOKEN }} - CODEARTIFACT_REPO_URL: ${{ env.CODEARTIFACT_REPO_URL }} - - name: Login to ECR uses: docker/login-action@v3 with: