-
Notifications
You must be signed in to change notification settings - Fork 123
/
pkg.yaml
49 lines (47 loc) · 1.78 KB
/
pkg.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
name: ecr-credential-provider
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
steps:
- sources:
- url: https://github.com/kubernetes/cloud-provider-aws/archive/refs/tags/{{ .VERSION }}.tar.gz
destination: cloud-provider-aws.tar.gz
sha256: f59aea7f2eed719ca83440109d5e4146d260f08804aa9f21d3da15e6da4ce7bf
sha512: 1b41eeb3edbe7b424d19875c8125cb1228a8cb81b2323dddc9104cb916cf7d96a2ee076c179b2a6dde0e75592535514d8b48c151c42c2ceda5acc0c2bf9e8704
env:
GOPATH: /go
cachePaths:
- /.cache/go-build
- /go/pkg
prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
- |
mkdir -p ${GOPATH}/src/k8s.io/cloud-provider-aws
tar -xzf cloud-provider-aws.tar.gz --strip-components=1 -C ${GOPATH}/src/k8s.io/cloud-provider-aws
build:
- |
export PATH=${PATH}:${TOOLCHAIN}/go/bin
go build \
-C ${GOPATH}/src/k8s.io/cloud-provider-aws \
-o ./dist/ecr-credential-provider \
-ldflags "-s -w \
-X k8s.io/component-base/version.gitVersion={{ .VERSION }} \
-X main.gitVersion={{ .VERSION }}" \
./cmd/ecr-credential-provider
install:
- install -D -m 0755
${GOPATH}/src/k8s.io/cloud-provider-aws/dist/ecr-credential-provider
/rootfs/usr/local/lib/kubelet/credentialproviders/ecr-credential-provider
test:
- |
mkdir -p /extensions-validator-rootfs
cp -r /rootfs/ /extensions-validator-rootfs/rootfs
cp /pkg/manifest.yaml /extensions-validator-rootfs/manifest.yaml
/extensions-validator validate --rootfs=/extensions-validator-rootfs --pkg-name="${PKG_NAME}"
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /