This uses a GitHub Enteprise instance but the same apply to a Public GitHub you just need to use https://github.com/
- URL: https://ghe.pipelines.devcluster.openshift.com/new
- Name: demo
- Visibility: public
- Add Readme
https://ghe.pipelines.devcluster.openshift.com/github-apps/pipelines-as-code
- Go to https://ghe.pipelines.devcluster.openshift.com/pac/demo
- Copy SSH URL
git clone git@ghe.pipelines.devcluster.openshift.com:pac/demo.git /tmp/demo
cd /tmp/demo
oc new-project demo
tkn pac repo create
vi .tekton/pull_request.yaml
test -e LICENSE || exit 1
git checkout -b tektonci
git add .tekton
git commit -m "Add tekton ci 🐱"
git push -u origin tektonci
https://ghe.pipelines.devcluster.openshift.com/pac/demo/compare/tektonci?expand=1
watch -n2 tkn pr ls
tkn pr logs -Lf
tkn pac repo ls
tkn pac repo describe
echo "Be kind and helpful license" > LICENSE
git add LICENSE
git commit -m "Add LICENSE" LICENSE
git push
tkn pac repo describe
tkn pac repo new --event-type push --branch main \
--name demo-push --namespace demo \
--url https://ghe.pipelines.devcluster.openshift.com/pac/demo
- vi .tekton/push.yaml
- add a “echo Success on PUSH” into the noop-task
git add . && git commit -asm "Add push file" && git push
watch -n2 tkn pr ls
https://ghe.pipelines.devcluster.openshift.com/pac/demo/pull/1
watch -n2 tkn pr ls --label=tekton.dev/pipeline-ascode-event-type=push
tkn pr logs -L
oc delete project demo && \
cd && \
rm -rf /tmp/demo && \
curl \
-X DELETE \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $(git config --get github.ghe-token)" \
https://api.ghe.pipelines.devcluster.openshift.com/repos/pac/demo