-
Notifications
You must be signed in to change notification settings - Fork 312
/
Copy pathkots.yaml
137 lines (113 loc) · 4.09 KB
/
kots.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
package:
name: kots
version: "1.124.7"
epoch: 1
description: Kubernetes Off-The-Shelf (KOTS) Software
copyright:
- license: Apache-2.0
dependencies:
runtime:
- bash
- busybox
- curl
- git
- helm
- kubectl
- kustomize
- py3-dateutil
- py3-magic
- s3cmd
environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- git
- go
- nodejs
- yarn
pipeline:
- uses: git-checkout
with:
repository: https://github.com/replicatedhq/kots
tag: v${{package.version}}
expected-commit: 41547babfd76d2bf2b593d40cd320fb15379345f
- uses: go/bump
with:
deps: |-
golang.org/x/oauth2@v0.27.0
github.com/containerd/containerd@v1.7.27
- runs: |
set -x
mkdir -p ${{targets.destdir}}/etc
mkdir -p ${{targets.destdir}}/usr/bin
# Scripts etc.
mv deploy/assets/* "${{targets.destdir}}/etc/"
# kotsadm and kots binaries
export VERSION=${{package.version}}
export GIT_TAG=${{package.version}}
# Set environment variables from repository
source .image.env
KOTS_KUSTOMIZE_BIN_DIR=/usr/bin
# TODO: fix pact build error on arm https://github.com/pact-foundation/pact-js-core/issues/264
export PACT_SKIP_BINARY_INSTALL=true
# Configure Yarn
yarn install --pure-lockfile --network-concurrency 1
# removing tests for now to see if this builds
make -C web deps lint build-kotsadm
make kots build
mv bin/kotsadm "${{targets.destdir}}/usr/bin/"
mv bin/kots "${{targets.destdir}}/usr/bin/"
subpackages:
- name: kots-symlink-compat # inconsistent naming for compat however this package name already exists
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/usr/local/bin
ln -s /usr/bin ${{targets.subpkgdir}}/usr/local/bin
ln -s /usr/bin/kotsadm ${{targets.subpkgdir}}/kotsadm
ln -s /usr/bin/kots ${{targets.subpkgdir}}/kots
# loop over all the assets in /etc and symlink them into the root subpackage
for file in ${{targets.destdir}}/etc/*; do
filename=$(basename $file)
ln -s /etc/$filename ${{targets.subpkgdir}}/$filename
done
# TODO: this is a manual intervention whenever helm bumps its major version
ln -s /usr/bin/helm ${{targets.subpkgdir}}/usr/local/bin/helm
ln -s /usr/bin/helm ${{targets.subpkgdir}}/usr/local/bin/helm3
# TODO: this is a manual intervention whenever kustomize bumps its major version
ln -s /usr/bin/kustomize ${{targets.subpkgdir}}/usr/local/bin/kustomize
ln -s /usr/bin/kustomize ${{targets.subpkgdir}}/usr/local/bin/kustomize5
ln -s /usr/bin/kubectl ${{targets.subpkgdir}}/usr/local/bin/kubectl
description: Compatability package for kots
- name: kots-compat # adding kots-compat here since we removed the older one and want to avoid breaking anything
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/usr/local/bin
# NOTE: this is a manual intervention whenever helm releases a new major version
ln -s /usr/bin/helm ${{targets.contextdir}}/usr/local/bin/helm
ln -s /usr/bin/helm ${{targets.contextdir}}/usr/local/bin/helm3
# NOTE: this is a manual intervention whenever kustomize releases a new major version
ln -s /usr/bin/kustomize ${{targets.contextdir}}/usr/local/bin/kustomize
ln -s /usr/bin/kustomize ${{targets.contextdir}}/usr/local/bin/kustomize5
ln -s /usr/bin/kubectl ${{targets.contextdir}}/usr/local/bin/kubectl
description: Compatability package for kots
update:
enabled: true
github:
identifier: replicatedhq/kots
strip-prefix: v
test:
pipeline:
- name: Check kots version
runs: |
kots version
kots --help
kotsadm version
kotsadm --help
- name: Validate kots CLI help command
runs: |
kots help
- name: Validate kots CLI install command
runs: |
kots install --help