https://github.com/okd-project/okd-coreos-pipeline
Tekton pipeline for running coreos-assembler builds
https://github.com/okd-project/okd-coreos-pipeline
Last synced: 2 months ago
JSON representation
Tekton pipeline for running coreos-assembler builds
- Host: GitHub
- URL: https://github.com/okd-project/okd-coreos-pipeline
- Owner: okd-project
- License: apache-2.0
- Created: 2022-08-02T15:39:23.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-13T22:59:23.000Z (8 months ago)
- Last Synced: 2024-09-15T10:02:20.720Z (8 months ago)
- Size: 165 KB
- Stars: 11
- Watchers: 15
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OKD CoreOS Build Pipeline
All the necessary resources to deploy a generic Tekton pipeline to build CoreOS boot and container images using rpm-ostree and coreos-assembler.
## Usage in a Kind cluster
For Kind (and possibly other) clusters, execute the following commands:
```bash
# create and log into your cluster
kind create cluster# clone repo
git clone https://github.com/okd-project/okd-coreos-pipeline.git
cd okd-coreos-pipeline# install tekton
kubectl apply -f https://storage.googleapis.com/tekton-releases/operator/latest/release.yaml# create task and pipeline definitions
kubectl apply -k environments/kind# check all resources have been deployed
kubectl get all -n okd-coreos
```Once all pods are in the RUNNING status create a secret that will allow you to push to the selected
registry (pipelineRun parameter target-repository), as in the example below:Sample registry auth secret file:
```yaml
apiVersion: v1
kind: Secret
metadata:
name: my-secret
data:
.dockerconfigjson: ewo...p9
type: kubernetes.io/dockerconfigjson
```Use this command to create the secret:
```bash
kubectl apply -f ./my-secret.yaml -n okd-coreos# run pipeline
kubectl create \
-n okd-coreos \
-f environments/kind/pipelineruns/okd-coreos-4.15-dev-pipelinerun.yaml# see the logs
tkn pipelinerun logs -f \
-n okd-coreos \
okd-coreos-4.15-dev-pipelinerun-fooba
```### Sending pipeline status notifications to a Matrix channel
In order for the pipeline to be able to send its status to a matrix room, make sure you create a secret, `matrix-access-token`, of type generic with a single key, `token`, containing the access token to the matrix endpoint.
```yaml
kind: Secret
apiVersion: v1
metadata:
name: matrix-access-token
stringData:
token: {OAuth token for the bot app}
```The pipeline run `environments/moc/pipelineruns/okd-coreos-4.*-prod-pipelinerun.yaml` uses the following parameters:
* `matrix-room` : containing the matrix roomID where the notification will be sent
* `matrix-endpoint`: URI of the matrix server hosting the room## MOC
For manually creating pipelineruns on the MOC build farm, execute the following commands:
```bash
# log into MOC build farm cluster# apply resource changes
kubectl apply -k environments/moc# check all resources have been deployed
kubectl get all -n okd-coreos# run pipeline
kubectl create \
-n okd-coreos \
-f environments/moc/pipelineruns/okd-coreos-4.15-prod-pipelinerun.yaml# see the logs
tkn pipelinerun logs -f \
-n okd-coreos \
okd-coreos-4.15-prod-pipelinerun-fooba```