From 0c5a35a5cda35717e565d4a01c3f3e143ff2b5f8 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Wed, 20 Oct 2021 15:06:41 +0200 Subject: [PATCH] - Split jobs between package and code signing on mac. --- .gitlab-ci-files/job-macosx-desktop.yml | 20 +++++++++++++++++++- .gitlab-ci.yml | 1 + tools/app_notarization.sh | 5 +++-- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci-files/job-macosx-desktop.yml b/.gitlab-ci-files/job-macosx-desktop.yml index bc2acad48..0cdb6823c 100644 --- a/.gitlab-ci-files/job-macosx-desktop.yml +++ b/.gitlab-ci-files/job-macosx-desktop.yml @@ -95,6 +95,24 @@ job-macosx-makefile-package: extends: job-macosx-makefile script: - *build_all_script + artifacts: + when: always + paths: + - build/OUTPUT/* + when: always + expire_in: 1 week + +job-macosx-codesigning: + stage: signing + tags: [ "macosx-xcode11" ] + needs: + - job-macosx-makefile-package + only: + variables: + - $NIGHTLY_MASTER + - $DEPLOY_MACOSX + script: + - cd build - codesign --options runtime,library --verbose -s "$MACOS_SIGNING_IDENTITY" OUTPUT/Packages/Linphone*.dmg - ./../tools/app_notarization.sh artifacts: @@ -112,7 +130,7 @@ job-macosx-makefile-deploy: stage: deploy tags: [ "macosx-xcode11" ] needs: - - job-macosx-makefile-package + - job-macosx-codesigning only: variables: - $NIGHTLY_MASTER diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4ab5f9dc0..23104b8f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,4 +61,5 @@ include: stages: - build - package + - signing - deploy diff --git a/tools/app_notarization.sh b/tools/app_notarization.sh index ca3b5fffb..1061ba832 100755 --- a/tools/app_notarization.sh +++ b/tools/app_notarization.sh @@ -15,7 +15,8 @@ echo "dmg processed. Checking UUID" request_uuid="$("/usr/libexec/PlistBuddy" -c "Print notarization-upload:RequestUUID" notarize_result.plist)" echo "Notarization UUID: ${request_uuid}" #Get status from upload -tryCount=0 +declare -i tryCount=0 +declare -i maxCount=4 for (( ; ; )) do echo "Getting notarization status" @@ -23,7 +24,7 @@ do xcrun_result=$? if [ "${xcrun_result}" != "0" ] then - if [ "${trycount}" -lt 4 ] + if [ "$trycount" -lt "$maxCount" ] then tryCount=$((tryCount+1)) sleep 60