Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(RELEASE-1319): move tasks based on type #763

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 2 additions & 6 deletions .github/scripts/test_tekton_tasks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,8 @@ done
for ITEM in $TEST_ITEMS
do
echo Task item: $ITEM
TASK_NAME=$(echo $ITEM | cut -d '/' -f 2)
TASK_DIR=$(echo $ITEM | cut -d '/' -f -2)
if [ "$(echo $ITEM | cut -d '/' -f 1)" == "internal" ] ; then
TASK_NAME=$(echo $ITEM | cut -d '/' -f 3)
TASK_DIR=$(echo $ITEM | cut -d '/' -f -3)
fi
TASK_NAME=$(echo $ITEM | cut -d '/' -f 3)
TASK_DIR=$(echo $ITEM | cut -d '/' -f -3)
echo " Task name: $TASK_NAME"

TASK_PATH=${TASK_DIR}/${TASK_NAME}.yaml
Expand Down
29 changes: 7 additions & 22 deletions .github/workflows/tekton_task_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,25 @@ jobs:
uses: tj-actions/changed-files@v41
with:
files: |
tasks/**
dir_names: "true"
dir_names_max_depth: "2"
- name: Get internal changed dirs
id: changed-internal-dirs
uses: tj-actions/changed-files@v41
with:
files: |
internal/tasks/**
tasks/*/**
dir_names: "true"
dir_names_max_depth: "3"
- name: Show changed dirs
run: |
echo ${{ steps.changed-dirs.outputs.all_changed_files }} \
${{ steps.changed-internal-dirs.outputs.all_changed_files }}
echo ${{ steps.changed-dirs.outputs.all_changed_files }}
- name: Create k8s Kind Cluster
uses: helm/[email protected]
if: |
steps.changed-dirs.outputs.any_changed == 'true' ||
steps.changed-internal-dirs.outputs.any_changed == 'true'
steps.changed-dirs.outputs.any_changed == 'true'
- name: Check cluster info
if: |
steps.changed-dirs.outputs.any_changed == 'true' ||
steps.changed-internal-dirs.outputs.any_changed == 'true'
steps.changed-dirs.outputs.any_changed == 'true'
run: |
kubectl cluster-info
- name: Install Tekton
timeout-minutes: 10
if: |
steps.changed-dirs.outputs.any_changed == 'true' ||
steps.changed-internal-dirs.outputs.any_changed == 'true'
steps.changed-dirs.outputs.any_changed == 'true'
run: |
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml

Expand All @@ -69,15 +57,12 @@ jobs:
kubectl get pods --namespace tekton-pipelines
- name: Install tkn
if: |
steps.changed-dirs.outputs.any_changed == 'true' ||
steps.changed-internal-dirs.outputs.any_changed == 'true'
steps.changed-dirs.outputs.any_changed == 'true'
uses: ./.github/actions/install-tkn
- name: Test Tekton tasks
if: |
steps.changed-dirs.outputs.any_changed == 'true' ||
steps.changed-internal-dirs.outputs.any_changed == 'true'
steps.changed-dirs.outputs.any_changed == 'true'
run: .github/scripts/test_tekton_tasks.sh
env:
TEST_ITEMS: >-
${{ steps.changed-dirs.outputs.all_changed_files }}
${{ steps.changed-internal-dirs.outputs.all_changed_files }}
2 changes: 1 addition & 1 deletion internal/resources/check-embargoed-cves-task.yaml
2 changes: 1 addition & 1 deletion internal/resources/collect-simple-signing-params.yaml
2 changes: 1 addition & 1 deletion internal/resources/create-advisory-task.yaml
2 changes: 1 addition & 1 deletion internal/resources/process-file-updates-task.yaml
2 changes: 1 addition & 1 deletion internal/resources/publish-index-image-task.yaml
2 changes: 1 addition & 1 deletion internal/resources/pulp-push-disk-images.yaml
3 changes: 3 additions & 0 deletions pipelines/internal/simple-signing-pipeline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Tekton pipeline for simple signing. It is meant to be used by the rh-sign-image
| taskGitUrl | The url to the git repo where the release-service-catalog tasks to be used are stored | Yes | https://github.com/konflux-ci/release-service-catalog.git |
| taskGitRevision | The revision in the taskGitUrl repo to be used | No | - |

## Changes in 0.3.0
* Update all task pathInRepo values as they are now in `tasks/internal`

## Changes in 0.2.0
* Changed the results used as parameters to `request-and-upload-signature`
* Instead of using the same results for both the Pyxis and UMB SSL authentication, the two were split into
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Pipeline
metadata:
name: simple-signing-pipeline
labels:
app.kubernetes.io/version: "0.2.0"
app.kubernetes.io/version: "0.3.0"
annotations:
tekton.dev/pipelines.minVersion: "0.12.1"
tekton.dev/tags: release
Expand Down Expand Up @@ -49,7 +49,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/collect-simple-signing-params/collect-simple-signing-params.yaml
value: tasks/internal/collect-simple-signing-params/collect-simple-signing-params.yaml
params:
- name: config_map_name
value: $(params.config_map_name)
Expand All @@ -63,7 +63,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/request-and-upload-signature/request-and-upload-signature.yaml
value: tasks/internal/request-and-upload-signature/request-and-upload-signature.yaml
params:
- name: config_map_name
value: $(params.config_map_name)
Expand Down
3 changes: 3 additions & 0 deletions pipelines/managed/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ affected by RHTAP services or which results could affect the RHTAP workflow.
| taskGitUrl | The url to the git repo where the release-service-catalog tasks to be used are stored | Yes | https://github.com/konflux-ci/release-service-catalog.git |
| taskGitRevision | The revision in the taskGitUrl repo to be used | No | - |

## Changes in 3.1.0
* Update all task pathInRepo values as they are now in `tasks/managed`

## Changes in 3.0.0
* Drop the `enterpriseContractPublicKey` param. The verify task will take the value from the policy.

Expand Down
6 changes: 3 additions & 3 deletions pipelines/managed/e2e/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Pipeline
metadata:
name: e2e
labels:
app.kubernetes.io/version: "3.0.0"
app.kubernetes.io/version: "3.1.0"
annotations:
tekton.dev/pipelines.minVersion: "0.12.1"
tekton.dev/tags: release
Expand Down Expand Up @@ -68,7 +68,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/collect-data/collect-data.yaml
value: tasks/managed/collect-data/collect-data.yaml
params:
- name: release
value: $(params.release)
Expand Down Expand Up @@ -125,7 +125,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/cleanup-workspace/cleanup-workspace.yaml
value: tasks/managed/cleanup-workspace/cleanup-workspace.yaml
when:
- input: $(params.postCleanUp)
operator: in
Expand Down
3 changes: 3 additions & 0 deletions pipelines/managed/fbc-release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Tekton release pipeline to interact with FBC Pipeline
| taskGitUrl | The url to the git repo where the release-service-catalog tasks to be used are stored | Yes | https://github.com/konflux-ci/release-service-catalog.git |
| taskGitRevision | The revision in the taskGitUrl repo to be used | No | - |

## Changes in 4.2.0
* Update all task pathInRepo values as they are now in `tasks/managed`

## Changes in 4.1.0
* Add the `check-data-keys` task to validate the `data.json` file using the JSON schema.

Expand Down
28 changes: 14 additions & 14 deletions pipelines/managed/fbc-release/fbc-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Pipeline
metadata:
name: fbc-release
labels:
app.kubernetes.io/version: "4.1.0"
app.kubernetes.io/version: "4.2.0"
annotations:
tekton.dev/pipelines.minVersion: "0.12.1"
tekton.dev/tags: release
Expand Down Expand Up @@ -80,7 +80,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/verify-access-to-resources/verify-access-to-resources.yaml
value: tasks/managed/verify-access-to-resources/verify-access-to-resources.yaml
params:
- name: release
value: $(params.release)
Expand All @@ -103,7 +103,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/collect-data/collect-data.yaml
value: tasks/managed/collect-data/collect-data.yaml
params:
- name: release
value: $(params.release)
Expand Down Expand Up @@ -139,7 +139,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/check-data-keys/check-data-keys.yaml
value: tasks/managed/check-data-keys/check-data-keys.yaml
resolver: git
workspaces:
- name: data
Expand All @@ -155,7 +155,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/validate-single-component/validate-single-component.yaml
value: tasks/managed/validate-single-component/validate-single-component.yaml
params:
- name: snapshotPath
value: "$(tasks.collect-data.results.snapshotSpec)"
Expand Down Expand Up @@ -203,7 +203,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/get-ocp-version/get-ocp-version.yaml
value: tasks/managed/get-ocp-version/get-ocp-version.yaml
params:
- name: fbcFragment
value: "$(tasks.collect-data.results.fbcFragment)"
Expand All @@ -221,7 +221,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/update-ocp-tag/update-ocp-tag.yaml
value: tasks/managed/update-ocp-tag/update-ocp-tag.yaml
params:
- name: dataPath
value: "$(tasks.collect-data.results.data)"
Expand All @@ -242,7 +242,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/check-fbc-packages/check-fbc-packages.yaml
value: tasks/managed/check-fbc-packages/check-fbc-packages.yaml
params:
- name: dataPath
value: "$(tasks.collect-data.results.data)"
Expand All @@ -262,7 +262,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/add-fbc-contribution/add-fbc-contribution.yaml
value: tasks/managed/add-fbc-contribution/add-fbc-contribution.yaml
params:
- name: dataPath
value: "$(tasks.collect-data.results.data)"
Expand Down Expand Up @@ -320,7 +320,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/sign-index-image/sign-index-image.yaml
value: tasks/managed/sign-index-image/sign-index-image.yaml
params:
- name: dataPath
value: "$(tasks.collect-data.results.data)"
Expand Down Expand Up @@ -357,7 +357,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/extract-index-image/extract-index-image.yaml
value: tasks/managed/extract-index-image/extract-index-image.yaml
params:
- name: inputDataFile
value: $(tasks.add-fbc-contribution-to-index-image.results.requestResultsFile)
Expand All @@ -375,7 +375,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/publish-index-image/publish-index-image.yaml
value: tasks/managed/publish-index-image/publish-index-image.yaml
params:
- name: dataPath
value: "$(tasks.collect-data.results.data)"
Expand Down Expand Up @@ -409,7 +409,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/update-cr-status/update-cr-status.yaml
value: tasks/managed/update-cr-status/update-cr-status.yaml
workspaces:
- name: data
workspace: release-workspace
Expand All @@ -425,7 +425,7 @@ spec:
- name: revision
value: $(params.taskGitRevision)
- name: pathInRepo
value: tasks/cleanup-workspace/cleanup-workspace.yaml
value: tasks/managed/cleanup-workspace/cleanup-workspace.yaml
when:
- input: $(params.postCleanUp)
operator: in
Expand Down
3 changes: 3 additions & 0 deletions pipelines/managed/push-binaries-to-dev-portal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Tekton pipeline to sign and release Red Hat binaries to the Red Hat Developer Po
| taskGitUrl | The url to the git repo where the release-service-catalog tasks to be used are stored | Yes | https://github.com/konflux-ci/release-service-catalog.git |
| taskGitRevision | The revision in the taskGitUrl repo to be used | No | - |

## Changes in 1.6.0
* Update all task pathInRepo values as they are now in `tasks/managed`

## Changes in 1.5.0
* Add the `check-data-keys` task to validate the `data.json` file using the JSON schema.

Expand Down
Loading
Loading