Skip to content

Commit

Permalink
feat: added independant pipeline to build bundles using snc
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Riobo <[email protected]>
  • Loading branch information
adrianriobo committed Sep 27, 2024
1 parent a278f2c commit 794e174
Show file tree
Hide file tree
Showing 6 changed files with 395 additions and 11 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/snc-runner-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ jobs:
if [[ ! -f snc-runner/tkn/task.yaml ]]; then
exit 1
fi
if [[ ! -f snc-runner/tkn/pipeline.yaml ]]; then
exit 1
fi
# Check if version is in sync
- name: Create k8s Kind Cluster
Expand All @@ -77,12 +80,13 @@ jobs:
- name: Deploy tasks
run: |
kubectl apply -f snc-runner/tkn/task.yaml
kubectl apply -f snc-runner/tkn/pipeline.yaml
- name: Upload crc-builder-tkn
uses: actions/upload-artifact@v4
with:
name: snc-runner-tkn
path: snc-runner/tkn/task.yaml
path: snc-runner/tkn/*.yaml



3 changes: 2 additions & 1 deletion .github/workflows/snc-runner-pusher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ jobs:
curl -LO "https://github.com/tektoncd/cli/releases/download/v${TKN_VERSION}/tkn_${TKN_VERSION}_Linux_x86_64.tar.gz"
tar xvzf "tkn_${TKN_VERSION}_Linux_x86_64.tar.gz" tkn
./tkn bundle push ${{ env.image }}-tkn \
-f task.yaml
-f task.yaml \
-f pipeline.yaml
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ endif

snc-runner-tkn-create:
$(call tkn_template,$(SNC_RUNNER),$(SNC_RUNNER_V),snc-runner,task)
$(call tkn_template,$(SNC_RUNNER),$(SNC_RUNNER_V),snc-runner,pipeline)

snc-runner-tkn-push: install-out-of-tree-tools
ifndef IMAGE
IMAGE = $(SNC_RUNNER):$(SNC_RUNNER_V)
endif
$(TOOLS_BINDIR)/tkn bundle push $(IMAGE)-tkn \
-f snc-runner/tkn/task.yaml
-f snc-runner/tkn/task.yaml \
-f snc-runner/tkn/pipeline.yaml

#### crc-builder ####

Expand Down
43 changes: 43 additions & 0 deletions snc-runner/tkn/samples/pipelinerun.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: crc-ocp-4.17.0-rc.5-arm64-
spec:
pipelineRef:
resolver: git
params:
- name: url
value: https://github.com/crc-org/ci-definitions.git
- name: revision
value: main
- name: pathInRepo
value: snc-runner/tkn/pipeline.yaml
params:
- name: arch
value: arm64
- name: ocp-index-url
value: https://mirror.openshift.com/pub/openshift-v4/arm64/clients/ocp/4.17.0-rc.5
- name: snc-ref
value: release-4.17
- name: ocp-extended-cert
value: enabled
- name: debug
value: 'true'
workspaces:
- name: storage
persistentVolumeClaim:
claimName: XXXXX
- name: s3-credentials
secret:
secretName: XXXXX
- name: aws-credentials
secret:
secretName: XXXXX
- name: rh-account-secret
secret:
secretName: XXXXX
- name: ocp-pullsecret
secret:
secretName: XXXXX
timeout: "8h"
Loading

0 comments on commit 794e174

Please sign in to comment.