-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatekeeper-3.18-3.18.2-r2.yaml
107 lines (97 loc) · 3.21 KB
/
gatekeeper-3.18-3.18.2-r2.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
package:
name: gatekeeper-3.18-3.18.2-r2
version: "3.18.2"
epoch: 2
description: Gatekeeper - Policy Controller for Kubernetes
copyright:
- license: Apache-2.0
dependencies:
provides:
- gatekeeper=${{package.full-version}}
environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- go
- wolfi-baselayout
pipeline:
# We can't use go/install because this requires specific ldflags to set the version
- uses: git-checkout
with:
repository: https://github.com/open-policy-agent/gatekeeper
tag: v${{package.version}}
expected-commit: 35f8bb97ec9badb12266e2e3f74465ef718c6237
- runs: |
FRAMEWORKS_VERSION=$(go list -f '{{ .Version }}' -m github.com/open-policy-agent/frameworks/constraint)
OPA_VERSION=$(go list -f '{{ .Version }}' -m github.com/open-policy-agent/opa)
CGO_ENABLED=0 GO111MODULE=on go build -mod vendor -a -ldflags "-w -X github.com/open-policy-agent/gatekeeper/pkg/version.Version=v${{package.version}} -X main.frameworksVersion=${FRAMEWORKS_VERSION} -X main.opaVersion=${OPA_VERSION}" -o manager
make gator
mkdir -p ${{targets.destdir}}/usr/bin
install -Dm755 ./manager ${{targets.destdir}}/usr/bin/manager
- uses: strip
subpackages:
- name: ${{package.name}}-compat
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}
ln -sf /usr/bin/manager ${{targets.subpkgdir}}/manager
dependencies:
provides:
- gatekeeper-compat=${{package.full-version}}
- name: ${{package.name}}-gator
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/usr/bin
mv bin/gator ${{targets.subpkgdir}}/usr/bin/gator
dependencies:
provides:
- gatekeeper-gator=${{package.full-version}}
- name: ${{package.name}}-crds
dependencies:
provides:
- gatekeeper-crds=${{package.full-version}}
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/crds
cp charts/gatekeeper/crds/* ${{targets.subpkgdir}}/crds
test:
pipeline:
- name: Check crd yaml files are present
runs: |
ls /crds/*.yaml
# Upstream image places kubectl at root level, which is expected by the helm chart:
# https://github.com/open-policy-agent/gatekeeper/blob/master/crd.Dockerfile#L11
# https://github.com/open-policy-agent/gatekeeper/blob/master/charts/gatekeeper/templates/upgrade-crds-hook.yaml#L112-L115
- name: ${{package.name}}-crds-compat
dependencies:
provides:
- gatekeeper-crds-compat=${{package.full-version}}
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}
ln -sf /usr/bin/kubectl ${{targets.subpkgdir}}/kubectl
test:
environment:
contents:
packages:
- kubectl-default
pipeline:
- name: Validates root level symlink and regular symlinks for kubectl
runs: |
/kubectl --help
kubectl --help
/usr/bin/kubectl --help
update:
enabled: true
github:
identifier: open-policy-agent/gatekeeper
strip-prefix: v
use-tag: true
tag-filter: v3.18.
test:
pipeline:
# AUTOGENERATED
- runs: |
manager --help