From e740f23e3a5dfdbf0babdaed27364f52452f9d00 Mon Sep 17 00:00:00 2001 From: delarea Date: Thu, 9 Jan 2025 11:42:02 +0200 Subject: [PATCH] Move to env --- Jenkinsfile | 14 ++++++++++---- .../scripts/download-signed-mac-OS-binaries.sh | 3 +-- .../scripts/trigger-sign-mac-OS-workflow.sh | 4 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a091ba047..2ac5dd801 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -536,8 +536,11 @@ def dockerLogin(){ def triggerDarwinBinariesSigningWorkflow() { withCredentials([string(credentialsId: 'eyalde-github-access-token', variable: "GITHUB_ACCESS_TOKEN")]) { stage("Sign MacOS binaries") { - sh('chmod +x $repo/build/apple_release/scripts/trigger-sign-mac-OS-workflow.sh') - sh('$repo/build/apple_release/scripts/trigger-sign-mac-OS-workflow.sh $cliExecutableName $releaseVersion $GITHUB_ACCESS_TOKEN') + sh 'chmod +x $repo/build/apple_release/scripts/trigger-sign-mac-OS-workflow.sh' + sh """ + export GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN} + $repo/build/apple_release/scripts/trigger-sign-mac-OS-workflow.sh $cliExecutableName $releaseVersion $goarch + """ } } } @@ -550,7 +553,10 @@ def triggerDarwinBinariesSigningWorkflow() { */ def downloadDarwinSignedBinaries(goarch) { withCredentials([string(credentialsId: 'eyalde-github-access-token', variable: "GITHUB_ACCESS_TOKEN")]) { - sh ('chmod +x $repo/build/apple_release/scripts/download-signed-mac-OS-binaries.sh') - sh ('$repo/build/apple_release/scripts/download-signed-mac-OS-binaries.sh $cliExecutableName $releaseVersion $goarch $GITHUB_ACCESS_TOKEN') + sh 'chmod +x $repo/build/apple_release/scripts/download-signed-mac-OS-binaries.sh' + sh """ + export GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN} + $repo/build/apple_release/scripts/download-signed-mac-OS-binaries.sh $cliExecutableName $releaseVersion $goarch + """ } } \ No newline at end of file diff --git a/build/apple_release/scripts/download-signed-mac-OS-binaries.sh b/build/apple_release/scripts/download-signed-mac-OS-binaries.sh index c6780cb25..029cd2861 100755 --- a/build/apple_release/scripts/download-signed-mac-OS-binaries.sh +++ b/build/apple_release/scripts/download-signed-mac-OS-binaries.sh @@ -10,8 +10,7 @@ releaseVersion=$2 # The architecture of the macOS binary to be downloaded - amd64 or arm64 goarch=$3 -# GitHub Access Token for authentication -GITHUB_ACCESS_TOKEN=$3 +# GitHub Access Token for authentication from ENV # Function to retrieve the specific artifact URL with retries get_specific_artifact_url_with_retries() { diff --git a/build/apple_release/scripts/trigger-sign-mac-OS-workflow.sh b/build/apple_release/scripts/trigger-sign-mac-OS-workflow.sh index 4ffbc4030..4e621399e 100644 --- a/build/apple_release/scripts/trigger-sign-mac-OS-workflow.sh +++ b/build/apple_release/scripts/trigger-sign-mac-OS-workflow.sh @@ -9,8 +9,8 @@ cliExecutableName=$1 # The version of the release being processed releaseVersion=$2 -# GitHub Access Token for authentication -GITHUB_ACCESS_TOKEN=$3 +# GitHub Access Token for authentication from ENV + # Trigger