@mongodb-js/signing-utils 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/garasign.sh +11 -9
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"email": "compass@mongodb.com"
|
|
14
14
|
},
|
|
15
15
|
"homepage": "https://github.com/mongodb-js/devtools-shared",
|
|
16
|
-
"version": "0.3.
|
|
16
|
+
"version": "0.3.3",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "https://github.com/mongodb-js/devtools-shared.git"
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"debug": "^4.3.4",
|
|
71
71
|
"ssh2": "^1.15.0"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "d411cf05b4ae338491496383df90f4fd2df6dd66"
|
|
74
74
|
}
|
package/src/garasign.sh
CHANGED
|
@@ -14,12 +14,17 @@ if [ -z ${artifactory_password+omitted} ]; then echo "artifactory_password is un
|
|
|
14
14
|
if [ -z ${method+omitted} ]; then echo "method must either be gpg, rpm_gpg or jsign" && exit 1; fi
|
|
15
15
|
|
|
16
16
|
ARTIFACTORY_HOST="artifactory.corp.mongodb.com"
|
|
17
|
+
ENV_FILE="signing-envfile"
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
echo "GRS_CONFIG_USER1_USERNAME=${garasign_username}" >> "${ENV_FILE}"
|
|
20
|
+
echo "GRS_CONFIG_USER1_PASSWORD=${garasign_password}" >> "${ENV_FILE}"
|
|
21
|
+
|
|
22
|
+
cleanup() {
|
|
19
23
|
docker logout "${ARTIFACTORY_HOST}" > /dev/null 2>&1
|
|
24
|
+
rm -r "${ENV_FILE}" || true
|
|
20
25
|
echo "Logged out from artifactory"
|
|
21
26
|
}
|
|
22
|
-
trap
|
|
27
|
+
trap cleanup EXIT
|
|
23
28
|
|
|
24
29
|
echo "Logging into docker artifactory"
|
|
25
30
|
echo "${artifactory_password}" | docker login --password-stdin --username ${artifactory_username} ${ARTIFACTORY_HOST} > /dev/null 2>&1
|
|
@@ -37,8 +42,7 @@ echo "Working directory: $directory"
|
|
|
37
42
|
|
|
38
43
|
gpg_sign() {
|
|
39
44
|
docker run \
|
|
40
|
-
-
|
|
41
|
-
-e GRS_CONFIG_USER1_PASSWORD="${garasign_password}" \
|
|
45
|
+
--env-file="${ENV_FILE}" \
|
|
42
46
|
--rm \
|
|
43
47
|
-v $directory:$directory \
|
|
44
48
|
-w $directory \
|
|
@@ -48,8 +52,7 @@ gpg_sign() {
|
|
|
48
52
|
|
|
49
53
|
jsign_sign() {
|
|
50
54
|
docker run \
|
|
51
|
-
-
|
|
52
|
-
-e GRS_CONFIG_USER1_PASSWORD="${garasign_password}" \
|
|
55
|
+
--env-file="${ENV_FILE}" \
|
|
53
56
|
--rm \
|
|
54
57
|
-v $directory:$directory \
|
|
55
58
|
-w $directory \
|
|
@@ -63,8 +66,7 @@ rpm_gpg_sign() {
|
|
|
63
66
|
# to be used for signing. The rpm signing command is copied from:
|
|
64
67
|
# https://github.com/mongodb-devprod-infrastructure/barque/blob/3c03fe0b6a5a0d0221a78d688de6015f546fc495/sign/rpm.go#L21
|
|
65
68
|
docker run \
|
|
66
|
-
-
|
|
67
|
-
-e GRS_CONFIG_USER1_PASSWORD="${garasign_password}" \
|
|
69
|
+
--env-file="${ENV_FILE}" \
|
|
68
70
|
--rm \
|
|
69
71
|
-v $directory:$directory \
|
|
70
72
|
-w $directory \
|
|
@@ -89,4 +91,4 @@ else
|
|
|
89
91
|
echo "Unknown signing method: $method"
|
|
90
92
|
exit 1
|
|
91
93
|
fi
|
|
92
|
-
echo "Finished signing $file"
|
|
94
|
+
echo "Finished signing $file"
|