-
Notifications
You must be signed in to change notification settings - Fork 312
/
Copy pathflux-source-controller.yaml
87 lines (79 loc) · 2.22 KB
/
flux-source-controller.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
package:
name: flux-source-controller
version: "1.5.0"
epoch: 7
description: The GitOps Toolkit source management component
copyright:
- license: Apache-2.0
environment:
contents:
packages:
- busybox
- ca-certificates-bundle
- clang-16
- gcc
- go
- llvm-lld-16
pipeline:
- uses: git-checkout
with:
expected-commit: 301fc7271458e79a2331fc70c2ba5dc97c13d39c
repository: https://github.com/fluxcd/source-controller
tag: v${{package.version}}
- uses: go/bump
with:
deps: |-
oras.land/oras-go@v1.2.6
github.com/go-jose/go-jose/v4@v4.0.5
github.com/go-jose/go-jose/v3@v3.0.4
golang.org/x/oauth2@v0.27.0
golang.org/x/crypto@v0.35.0
golang.org/x/net@v0.36.0
github.com/containerd/containerd@v1.7.27
- runs: |
mkdir -p "${{targets.destdir}}"/usr/bin
CGO_ENABLED=1 CGO_LDFLAGS="-static -fuse-ld=lld" go build \
-ldflags "-w" \
-tags 'netgo,osusergo,static_build' \
-trimpath -o "${{targets.destdir}}"/usr/bin/source-controller .
- uses: strip
subpackages:
- name: fluxcd-source-controller-bitnami-compat
description: "compat package with bitnami/flux image"
pipeline:
- uses: bitnami/compat
with:
image: fluxcd-source-controller
version-path: 1/debian-12
- runs: |
mkdir -p ${{targets.subpkgdir}}/opt/bitnami/flux/bin/
chmod g+rwX ${{targets.subpkgdir}}/opt/bitnami
ln -sf /usr/bin/source-controller ${{targets.subpkgdir}}/opt/bitnami/flux/bin/source-controller
cp LICENSE ${{targets.subpkgdir}}/opt/bitnami/licenses/LICENSE
test:
pipeline:
- runs: |
run-script --version
run-script --help
update:
enabled: true
ignore-regex-patterns:
- api/
github:
identifier: fluxcd/source-controller
strip-prefix: v
tag-filter: v
test:
environment:
contents:
packages:
- ${{package.name}}
pipeline:
# the source-controller when passing the -h flag exit with error code 2
- runs: |
set +e
source-controller -h
if [ $? -ne 2 ]; then
echo "expected 2, got $?"
exit 1
fi