-
Notifications
You must be signed in to change notification settings - Fork 1
/
screwdriver.yaml
87 lines (83 loc) · 3.26 KB
/
screwdriver.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
shared:
environment:
RELEASE_FILES: "skopeo-linux.tar.gz zstd-cli-linux.tar.gz zstd-cli-linux-aarch64.tar.gz zstd-cli-macosx.tar.gz skopeo-linux-aarch64.tar.gz"
annotations:
screwdriver.cd/restrictPR: fork
jobs:
skopeo:
requires: [~pr, ~commit]
image: almalinux
environment:
SKOPEO_PACKAGE_AMD64: skopeo.linux.amd64
SKOPEO_PACKAGE_ARM64: skopeo.linux.arm64
SKOPEO_VERSION: 1.16.1
GO_VERSION: 1.23.0
steps:
- make: ./build_skopeo.sh
- test-node20-sha256: |
DIGEST=$( ./${SKOPEO_PACKAGE_AMD64} inspect docker://docker.io/node:20 | jq -r '.Digest')
if [[ -z $DIGEST ]]; then
echo "unable to get image node:20 sha256 digest"
exit 1 v
fi
- test-alpine-sha256: |
DIGEST=$( ./${SKOPEO_PACKAGE_AMD64} inspect docker://docker.io/alpine:latest | jq -r '.Digest')
if [[ -z $DIGEST ]]; then
echo "unable to get image alpine:latest sha256 digest"
exit 1
fi
- test-busybox-sha256: |
DIGEST=$( ./${SKOPEO_PACKAGE_AMD64} inspect docker://docker.io/busybox:latest | jq -r '.Digest')
if [[ -z $DIGEST ]]; then
echo "unable to get image busybox:latest sha256 digest"
exit 1
fi
- test-centos7-sha256: |
DIGEST=$( ./${SKOPEO_PACKAGE_AMD64} inspect docker://docker.io/centos:7 | jq -r '.Digest')
if [[ -z $DIGEST ]]; then
echo "unable to get image centos:7 sha256 digest"
exit 1
fi
- package: |
a=($RELEASE_FILES)
tar -czf ${a[0]} ./${SKOPEO_PACKAGE_AMD64} && store-cli set ${a[0]} --type=cache --scope=event
tar -czf ${a[4]} ./${SKOPEO_PACKAGE_ARM64} && store-cli set ${a[4]} --type=cache --scope=event
zstd:
requires: [~pr, ~commit]
image: buildpack-deps:oracular
environment:
ZSTD_VERSION: 1.5.6
BUILD_DIR: "/tmp/zstd_static_build"
USER_SHELL_BIN: bash
steps:
- make: ./build_zstd.sh
- package: |
a=($RELEASE_FILES)
tar -czf ${a[1]} ./zstd-linux-x86_64 && store-cli set ${a[1]} --type=cache --scope=event
tar -czf ${a[2]} ./zstd-linux-aarch64 && store-cli set ${a[2]} --type=cache --scope=event
zstd-mac:
requires: [~pr, ~commit]
image: almalinux
environment:
ZSTD_PACKAGE: zstd
steps:
- make: echo "Fetching local file for mac build. Please build and upload manually if building new version"
- package: a=($RELEASE_FILES) && store-cli set ${a[3]} --type=cache --scope=event
publish:
requires: [zstd, skopeo, zstd-mac]
image: almalinux
steps:
- setup-ci: |
yum install -y epel-release
yum install -y wget git make gcc gcc-c++ bzip2
git clone https://github.com/screwdriver-cd/toolbox.git ci
- get: (files=($RELEASE_FILES); for i in "${files[@]}"; do store-cli get $i --type=cache --scope=event;done)
- tag: ./ci/git-tag.sh
- publish: |
files=($RELEASE_FILES); for i in "${files[@]}"; do echo $i; done
([ ! -z $SD_PULL_REQUEST ] && echo skip publish for PR) || ./ci/git-release.sh
secrets:
# Pushing tags to Git
- GIT_KEY_BASE64
# Pushing releases to GitHub
- GITHUB_TOKEN