From 1a0b3be816599a5b53a5264583317f005f622f7b Mon Sep 17 00:00:00 2001 From: Henry Heikkinen Date: Tue, 3 Dec 2024 23:14:11 +0200 Subject: [PATCH] OPHYK-212 Fix passing GitHub Packages credentials to build --- Dockerfile | 2 +- infra/src/cdk-app-util.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 762ecc362..08a48d44b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM gradle:8.11-jdk21-corretto AS build WORKDIR /app -COPY github-packages-gradle.properties /root/.gradle/gradle.properties +COPY github-packages-gradle.properties /opt/gradle/gradle.properties COPY ytj-client ./ytj-client COPY organisaatio-api ./organisaatio-api COPY organisaatio-service ./organisaatio-service diff --git a/infra/src/cdk-app-util.ts b/infra/src/cdk-app-util.ts index 56fd3f9d1..18e559d2a 100644 --- a/infra/src/cdk-app-util.ts +++ b/infra/src/cdk-app-util.ts @@ -158,9 +158,9 @@ class ContinuousDeploymentPipelineStack extends cdk.Stack { type: codebuild.BuildEnvironmentVariableType.PARAMETER_STORE, value: `/env/${env}/slack-notifications-channel-webhook`, }, - GRADLE_GITHUB_PACKAGES_PROPERTIES: { + GITHUB_PACKAGES_GRADLE_PROPERTIES: { type: codebuild.BuildEnvironmentVariableType.PARAMETER_STORE, - value: `/gradle/github-packages-gradle-properties`, + value: "/gradle/github-packages-gradle-properties", }, }, buildSpec: codebuild.BuildSpec.fromObject({ @@ -173,7 +173,7 @@ class ContinuousDeploymentPipelineStack extends cdk.Stack { commands: [ "sudo yum install -y perl-Digest-SHA", // for shasum command `git checkout ${tag}`, - "echo $GRADLE_GITHUB_PACKAGES_PROPERTIES > github-packages-gradle.properties", + "echo $GITHUB_PACKAGES_GRADLE_PROPERTIES | base64 -d > github-packages-gradle.properties" ], }, build: {