-
Notifications
You must be signed in to change notification settings - Fork 314
/
Copy pathcloudnative-pg.yaml
78 lines (70 loc) · 2.57 KB
/
cloudnative-pg.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
package:
name: cloudnative-pg
version: "1.25.1"
epoch: 31
description: CloudNativePG is a comprehensive platform designed to seamlessly manage PostgreSQL databases
copyright:
- license: Apache-2.0
dependencies:
runtime:
- merged-bin
- wolfi-baselayout
pipeline:
- uses: git-checkout
with:
repository: https://github.com/cloudnative-pg/cloudnative-pg
tag: v${{package.version}}
expected-commit: c56e00d462c3899ab305540953ec541dfe0f762a
- name: Generate controller code
runs: |
make generate fmt vet
- uses: go/bump
with:
deps: |-
golang.org/x/net@v0.36.0
- uses: go/build
with:
output: manager_${{build.goarch}}
ldflags: |
-X github.com/cloudnative-pg/cloudnative-pg/pkg/versions.buildVersion=${{package.version}}
-X github.com/cloudnative-pg/cloudnative-pg/pkg/versions.buildCommit=$(git rev-parse --short=8 HEAD)
-X github.com/cloudnative-pg/cloudnative-pg/pkg/versions.buildDate=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%dT%H:%M:%SZ")
packages: ./cmd/manager
- runs: |
mkdir ${{targets.contextdir}}/operator
ln -sf /usr/bin/manager_${{build.goarch}} ${{targets.contextdir}}/operator/
ln -sf /usr/bin/manager_${{build.goarch}} ${{targets.contextdir}}/manager
subpackages:
- name: ${{package.name}}-plugins
pipeline:
- uses: go/build
with:
packages: ./cmd/kubectl-cnpg
output: plugins
ldflags: |
-X github.com/cloudnative-pg/cloudnative-pg/pkg/versions.buildVersion=${{package.version}}
-X github.com/cloudnative-pg/cloudnative-pg/pkg/versions.buildCommit=$(git rev-parse --short=8 HEAD)
-X github.com/cloudnative-pg/cloudnative-pg/pkg/versions.buildDate=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%dT%H:%M:%SZ")
dependencies:
runtime:
- merged-bin
- wolfi-baselayout
update:
enabled: true
github:
identifier: cloudnative-pg/cloudnative-pg
strip-prefix: v
use-tag: true
test:
pipeline:
# - Testing observability requires helm installation
# - Testing backup and Recovery requires using BarmanObjectStorage:
- name: "Verify Installation"
runs: |
cd /
manager_${{build.goarch}} version | grep "${{package.version}}"
/manager version | grep "${{package.version}}"
/manager debug show-architectures | grep ${{build.goarch}}
arch=$(uname -m | sed -e "s/x86_64/amd64/" -e "s/aarch64/arm64/")
manager_$arch version
manager_$arch --help