Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2019-11-22 16:33:56 +0000
committerSravan Kumar Lakkimsetti2019-11-22 16:33:56 +0000
commitcdf4647388e8aebf315a729daffe4d681820a01a (patch)
tree2b52c8329617d6f66cd65524e8faf524bfe35add /production
parent6cc4ac09607d66c3d6491f460ba911596397ab01 (diff)
downloadeclipse.platform.releng.aggregator-cdf4647388e8aebf315a729daffe4d681820a01a.tar.gz
eclipse.platform.releng.aggregator-cdf4647388e8aebf315a729daffe4d681820a01a.tar.xz
eclipse.platform.releng.aggregator-cdf4647388e8aebf315a729daffe4d681820a01a.zip
Bug 553095 - Integrate Mac Notarization with platform build process
Change-Id: I2a7fe5db10e46ad3f23af3ae6bbfc230721de65d Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
Diffstat (limited to 'production')
-rwxr-xr-xproduction/build-functions.shsource40
-rwxr-xr-xproduction/publish-equinox.sh3
2 files changed, 41 insertions, 2 deletions
diff --git a/production/build-functions.shsource b/production/build-functions.shsource
index 2d487158a..ef295a3ad 100755
--- a/production/build-functions.shsource
+++ b/production/build-functions.shsource
@@ -678,7 +678,43 @@ fn-gather-repo ()
fi
}
-
+fn-notarize-macbuild ()
+{
+
+ BUILD_DIR="$1"; shift
+ DMG="$1"; shift
+ PATH=/shared/common/jq/1.6/:${PATH}
+
+ pushd $BUILD_DIR
+
+ PRIMARY_BUNDLE_ID="$(echo ${DMG} | sed 's/-macosx-cocoa-x86_64.dmg//g')"
+
+ RESPONSE=\
+ $(curl -s -X POST \
+ -F file=@${DMG} \
+ -F 'options={"primaryBundleId": "'${PRIMARY_BUNDLE_ID}'", "staple": true};type=application/json' \
+ http://172.30.206.146:8383/macos-notarization-service/notarize)
+
+ UUID=$(echo ${RESPONSE} | jq -r '.uuid')
+
+ STATUS=$(echo ${RESPONSE} | jq -r '.notarizationStatus.status')
+
+ while [[ ${STATUS} == 'IN_PROGRESS' ]]; do
+ sleep 1m
+ RESPONSE=$(curl -s http://172.30.206.146:8383/macos-notarization-service/${UUID}/status)
+ STATUS=$(echo ${RESPONSE} | jq -r '.notarizationStatus.status')
+ done
+
+ if [[ ${STATUS} != 'COMPLETE' ]]; then
+ echo "Notarization failed: ${RESPONSE}"
+ exit 1
+ fi
+
+ rm "${DMG}"
+
+ curl -JO http://172.30.206.146:8383/macos-notarization-service/${UUID}/download
+ popd
+}
# USAGE: fn-gather-sdk BUILD_ID REPO_DIR BUILD_DIR
# BUILD_ID: I20121116-0700
@@ -702,6 +738,7 @@ fn-gather-sdk ()
cp org.eclipse.sdk.ide-macosx.cocoa.x86_64.dmg "$BUILD_DIR"/eclipse-SDK-${BUILD_ID}-macosx-cocoa-x86_64.dmg
cp org.eclipse.sdk.ide-win32.win32.x86_64.zip "$BUILD_DIR"/eclipse-SDK-${BUILD_ID}-win32-x86_64.zip
popd
+ fn-notarize-macbuild "$BUILD_DIR" eclipse-SDK-${BUILD_ID}-macosx-cocoa-x86_64.dmg
else
echo " ERROR: $TARGET_PRODUCTS did not exist in fn-gather-sdks"
fi
@@ -738,6 +775,7 @@ fn-gather-platform ()
cp org.eclipse.platform.ide-macosx.cocoa.x86_64.dmg "$BUILD_DIR"/eclipse-platform-${BUILD_ID}-macosx-cocoa-x86_64.dmg
cp org.eclipse.platform.ide-win32.win32.x86_64.zip "$BUILD_DIR"/eclipse-platform-${BUILD_ID}-win32-x86_64.zip
popd
+ fn-notarize-macbuild "$BUILD_DIR" eclipse-platform-${BUILD_ID}-macosx-cocoa-x86_64.dmg
else
echo " ERROR: $TARGET_PRODUCTS did not exist in fn-gather-platform"
fi
diff --git a/production/publish-equinox.sh b/production/publish-equinox.sh
index 3d11b41fc..6e859e4bd 100755
--- a/production/publish-equinox.sh
+++ b/production/publish-equinox.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#*******************************************************************************
-# Copyright (c) 2017 IBM Corporation and others.
+# Copyright (c) 2019 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -91,6 +91,7 @@ fn-eq-gather-starterkit ()
cp -v org.eclipse.rt.osgistarterkit.product-win32.win32.x86_64.zip "$DROP_DIR"/EclipseRT-OSGi-StarterKit-${BUILD_ID}-win32-win32-x86_64.zip
popd
+ fn-notarize-macbuild "$DROP_DIR" EclipseRT-OSGi-StarterKit-${BUILD_ID}-macosx-cocoa-x86_64.dmg
else
echo " ERROR: $TARGET_PRODUCTS did not exist in fn-eq-gather-starterkit"
return 1

Back to the top