Repository to store Tekton pipelines and tasks to build containerized frontends from consoledot
To be able to build a frontend in Konflux, you will need to use the following two Tekton tasks:
You will need to add these two tasks in your two Tekton pipelines inside your .tekton
directory. You can find an example on how to do this in this same repo in the .tekton
directory.
You can find the example on how we are using it for the tests in this repository in the PR pipeline, and in the on push pipeline.
Important points to consider:
- Don't forget to check how to use the parameters in this file
- The
taskRef
in your pipeline should be like this:
taskRef:
resolver: git
params:
- name: url
value: https://github.com/RedHatInsights/konflux-consoledot-frontend-build
- name: revision
value: main
- name: pathInRepo
value: tasks/parse-build-deploy-script/parse-build-deploy-script.yaml
- Make sure to create the
runAfter
attribute and set it up to run after theclone-repository
.
You can find the example on how we are using it for the tests in this repository in the PR pipeline, and in the on push pipeline.
Important points to consider:
- Don't forget to check how to use the parameters in this file
- The
taskRef
in your pipeline should be like this:
taskRef:
resolver: git
params:
- name: url
value: https://github.com/RedHatInsights/konflux-consoledot-frontend-build
- name: revision
value: main
- name: pathInRepo
value: tasks/create-frontend-dockerfile/create-frontend-dockerfile.yaml
- Make sure to update the
runAfter
attribute of thebuild-container
task to run after this task andprefetch-dependencies
, and not afterclone-repository
as it was set up.
All the tasks need to be tested in the pipelines in the .tekton
directory. Make sure the name of your task is the same name
of the subdirectory where it is stored inside the tasks
directory.
After creating the task, you should add your task to the ./tests/scripts/.tasks
file in the corresponding
list or lists. If it is a task that has to run with PRs, add it to the pr_tasks
list, if it needs to run with pushes to main, add it
to the push_tasks
list, and if it is a demo/draft task that doesn't need to be tested, add it to the no_test_tasks
list.
Make sure that you are actually testing your task in the corresponding pipeline(s) or the test will fail.