File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ provisioners:
171
171
- packer-scripts/run-serverspecs
172
172
- packer-scripts/perforce-install
173
173
- packer-scripts/pyenv-install
174
+ - packer-scripts/cosign-install
174
175
- packer-scripts/updates
175
176
- packer-scripts/test-system-info-output
176
177
- packer-scripts/dump-dpkg-manifest
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -o errexit
4
+ set -o xtrace
5
+
6
+ main () {
7
+
8
+ # Cosign installation
9
+ local COSIGN_VERSION=" v2.2.4"
10
+ wget -q " https://github.com/sigstore/cosign/releases/download/${COSIGN_VERSION} /cosign-linux-amd64"
11
+ # rename the binary
12
+ sudo mv cosign-linux-amd64 /usr/local/bin/not_cosign
13
+ sudo chmod +x /usr/local/bin/not_cosign
14
+ not_cosign version
15
+
16
+ # Rekor-cli installtion
17
+ local REKOR_VERSION=" v1.3.6"
18
+ wget -q " https://github.com/sigstore/rekor/releases/download/${REKOR_VERSION} /rekor-cli-linux-amd64"
19
+ sudo mv rekor-cli-linux-amd64 /usr/local/bin/rekor-cli
20
+ sudo chmod +x /usr/local/bin/rekor-cli
21
+ rekor-cli version
22
+
23
+ # create dummy cosign script
24
+ cat << 'EOF ' >>cosign
25
+ #!/usr/bin/env bash
26
+
27
+ set -o errexit
28
+ set -o xtrace
29
+
30
+ main() {
31
+
32
+ args="$@"
33
+ # call original cosign binary and send arguments
34
+ not_cosign $args
35
+
36
+ }
37
+
38
+ main "$@"
39
+
40
+ EOF
41
+
42
+ # make cosign script executable and move to /usr/local/bin
43
+ sudo chmod +x cosign && sudo mv cosign /usr/local/bin/cosign
44
+
45
+ }
46
+
47
+ main " $@ "
You can’t perform that action at this time.
0 commit comments