2
2
set -o errexit # Exit the script with error if any of the commands fail
3
3
set +o xtrace # Disable tracing.
4
4
5
+ # Environment variables used as input:
6
+ # ARTIFACTORY_PASSWORD
7
+ # ARTIFACTORY_USERNAME
8
+ # AZURE_NUGET_SIGN_TENANT_ID
9
+ # AZURE_NUGET_SIGN_CLIENT_ID
10
+ # AZURE_NUGET_SIGN_CLIENT_SECRET
11
+ # PACKAGE_VERSION
12
+
5
13
if [ -z " $PACKAGE_VERSION " ]; then
6
14
echo " PACKAGE_VERSION variable should be set"
7
15
exit 1
@@ -11,4 +19,19 @@ echo Creating nuget package...
11
19
12
20
dotnet clean " ./MongoDB.Analyzer.sln"
13
21
dotnet build " ./MongoDB.Analyzer.sln" -c Release
14
- dotnet pack ./src/MongoDB.Analyzer.Package/MongoDB.Analyzer.Package.csproj -o ./artifacts/nuget -c Release -p:Version=" $PACKAGE_VERSION " -p:ContinuousIntegrationBuild=true
22
+ dotnet pack ./src/MongoDB.Analyzer.Package/MongoDB.Analyzer.Package.csproj -o ./artifacts/nuget -c Release -p:Version=" $PACKAGE_VERSION " -p:ContinuousIntegrationBuild=true
23
+
24
+ echo " ${ARTIFACTORY_PASSWORD} " | docker login --password-stdin --username " ${ARTIFACTORY_USERNAME} " artifactory.corp.mongodb.com
25
+
26
+ docker run --platform=" linux/amd64" --rm -v $( pwd) :/workdir -w /workdir \
27
+ artifactory.corp.mongodb.com/release-tools-container-registry-local/azure-keyvault-nuget \
28
+ NuGetKeyVaultSignTool sign " artifacts/nuget/*" ." $PACKAGE_VERSION " .nupkg \
29
+ --force \
30
+ --file-digest=sha256 \
31
+ --timestamp-rfc3161=http://timestamp.digicert.com \
32
+ --timestamp-digest=sha256 \
33
+ --azure-key-vault-url=https://mdb-authenticode.vault.azure.net \
34
+ --azure-key-vault-tenant-id=" $AZURE_NUGET_SIGN_TENANT_ID " \
35
+ --azure-key-vault-client-secret=" $AZURE_NUGET_SIGN_CLIENT_SECRET " \
36
+ --azure-key-vault-client-id=" $AZURE_NUGET_SIGN_CLIENT_ID " \
37
+ --azure-key-vault-certificate=authenticode-2021
0 commit comments