You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Nicolas Massé e7fce4df6f working pipeline 10 months ago
..
common working pipeline 10 months ago
README.md wip 10 months ago
pipeline.yaml wip 10 months ago
pipelinerun.yaml wip 10 months ago

README.md

Multi-architecture Tekton Pipeline

Tekton configuration

oc patch configmap/feature-flags -n openshift-pipelines --type=merge -p '{"data":{"disable-affinity-assistant":"true"}}'

Pipeline manifests

oc apply -k common/
oc apply -f pipeline.yaml

Authentication to the registries

export REGISTRY_AUTH_FILE="$PWD/auth.json"
podman login quay.io
podman login registry.redhat.io
oc apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
  annotations:
    tekton.dev/docker-0: https://quay.io
  name: registry-authentication
type: kubernetes.io/dockerconfigjson
data:
  .dockerconfigjson: $(base64 -w0 "$PWD/auth.json")
EOF

Initialize data inside the PVC

Create a Pod that uses the two previously created PVC :

apiVersion: v1
kind: Pod
metadata:
  name: rsync
  labels:
    app: rsync
spec:
  containers:
  - name: rsync
    image: registry.redhat.io/ubi9/ubi:9.6
    command: ["/bin/sleep"]
    args: ["INF"]
    volumeMounts:
    - name: bootc-caches
      mountPath: /caches
    - name: bootc-entitlements
      mountPath: /entitlements
  volumes:
  - name: bootc-caches
    persistentVolumeClaim:
      claimName: bootc-caches
  - name: bootc-entitlements
    persistentVolumeClaim:
      claimName: bootc-entitlements

Then copy all the data to /caches and /entitlements.

mkdir -p entitlements
cp etc-x86_64.tar entitlements/x86_64.tar
cp etc-aarch64.tar entitlements/aarch64.tar
oc rsync entitlements rsync:/
oc rsh rsync mkdir -p /caches/{x86_64,aarch64}/{rpm-ostree,dnf}

You can leave the Pod running or delete it with :

oc delete pod rsync

Run it!

oc create -f pipelinerun.yaml