-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathcosa-init.yaml
75 lines (64 loc) · 1.86 KB
/
cosa-init.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
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: cosa-init
spec:
params:
- description: The manifest repo URL
name: repo
type: string
- description: The manifest repo branch
name: branch
type: string
- description: The CoreOS variant
name: variant
type: string
- description: The OKD version
name: version
type: string
steps:
- image: 'quay.io/coreos-assembler/coreos-assembler:latest'
name: prepare-repo
resources:
limits:
devices.kubevirt.io/kvm: '1'
memory: 4Gi
requests:
devices.kubevirt.io/kvm: '1'
memory: 4Gi
script: |
#!/usr/bin/env bash
set -euxo pipefail
mkdir -p /workspace/coreos
cd /workspace/coreos
cat << INFO
Initializing coreos-assembler:
Manifest repo: $(params.repo)
Branch: $(params.branch)
OKD version: $(params.version)
CoreOS variant: $(params.variant)
INFO
cosa init \
--branch $(params.branch) \
--variant $(params.variant) \
$(params.repo)
# Move rpms into scope of COSA VM
if [ -d "/workspace/rpms" ]; then
cp -r /workspace/rpms /workspace/coreos/
createrepo_c /workspace/coreos/rpms
fi
# TODO: Upstream to openshift/os
# Get oc and hypershift from the yum repo in the artifacts image,
# instead of the rhel ose repo.
sed -i 's/rhel-9.*-server-ose.*/artifacts/' $(readlink -f src/config/manifest-$(params.variant).yaml)
cat <<EOF >> src/config/c9s.repo
[artifacts]
name=OKD RPM artifacts
baseurl=file:///workspace/coreos/rpms/
repo_gpgcheck=0
gpgcheck=0
enabled=1
EOF
workspaces:
- mountPath: /workspace
name: ws