-
Notifications
You must be signed in to change notification settings - Fork 53
Onboard tekton-kueue to kargo-infra-deployments project #637
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
Open
gbenhaim
wants to merge
1
commit into
redhat-appstudio:main
Choose a base branch
from
gbenhaim:tekton-kueue-kargo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...argo/internal-production/projects/kargo-infra-deployments/tekton-kueue/kustomization.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| resources: | ||
| - warehouse.yaml | ||
| - promotiontasks | ||
| - stage-ring-0-tekton-kueue.yaml |
5 changes: 5 additions & 0 deletions
5
...roduction/projects/kargo-infra-deployments/tekton-kueue/promotiontasks/kustomization.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| resources: | ||
| - tekton-kueue-promote-ring-0.yaml |
47 changes: 47 additions & 0 deletions
47
...ects/kargo-infra-deployments/tekton-kueue/promotiontasks/tekton-kueue-promote-ring-0.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| --- | ||
| apiVersion: kargo.akuity.io/v1alpha1 | ||
| kind: PromotionTask | ||
| metadata: | ||
| name: tekton-kueue-promote-ring-0 | ||
| spec: | ||
| vars: | ||
| - name: srcPath | ||
| steps: | ||
| - uses: http | ||
| as: fetch-index | ||
| if: ${{ ctx.targetFreight.origin.name == "tekton-kueue" }} | ||
| config: | ||
| method: GET | ||
| url: https://quay.io/v2/openshift-pipeline/pipelines-scheduler-rhel10/manifests/${{ imageFrom("quay.io/openshift-pipeline/pipelines-scheduler-rhel10").Digest }} | ||
| headers: | ||
| - name: Accept | ||
| value: application/vnd.oci.image.index.v1+json | ||
| successExpression: response.status == 200 | ||
| outputs: | ||
| - name: amd64Digest | ||
| fromExpression: filter(response.body.manifests, {.platform.architecture == 'amd64' && .platform.os == 'linux'})[0].digest | ||
| timeout: 30s | ||
| - uses: http | ||
| as: fetch-manifest | ||
| if: ${{ ctx.targetFreight.origin.name == "tekton-kueue" }} | ||
| config: | ||
| method: GET | ||
| url: https://quay.io/v2/openshift-pipeline/pipelines-scheduler-rhel10/manifests/${{ outputs['fetch-index'].amd64Digest }} | ||
| headers: | ||
| - name: Accept | ||
| value: application/vnd.oci.image.manifest.v1+json | ||
| successExpression: response.status == 200 | ||
| outputs: | ||
| - name: revision | ||
| fromExpression: response.body.annotations["org.opencontainers.image.revision"] | ||
| timeout: 30s | ||
| - uses: yaml-update | ||
| as: update-tekton-kueue | ||
| if: ${{ ctx.targetFreight.origin.name == "tekton-kueue" }} | ||
| config: | ||
| path: ${{ vars.srcPath }}/components/kueue/rings/ring-0/tekton-kueue/kustomization.yaml | ||
| updates: | ||
| - key: images.0.digest | ||
| value: ${{ imageFrom("quay.io/openshift-pipeline/pipelines-scheduler-rhel10").Digest }} | ||
| - key: resources.0 | ||
| value: https://github.com/openshift-pipelines/tekton-kueue/upstream/config/default?ref=${{ outputs['fetch-manifest'].revision }} |
112 changes: 112 additions & 0 deletions
112
...l-production/projects/kargo-infra-deployments/tekton-kueue/stage-ring-0-tekton-kueue.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| --- | ||
| apiVersion: kargo.akuity.io/v1alpha1 | ||
| kind: Stage | ||
| metadata: | ||
| name: ring-0-tekton-kueue | ||
| annotations: | ||
| kargo.akuity.io/color: green | ||
| spec: | ||
| requestedFreight: | ||
| - origin: | ||
| kind: Warehouse | ||
| name: tekton-kueue | ||
| sources: | ||
| direct: true | ||
| promotionTemplate: | ||
| spec: | ||
| vars: | ||
| - name: repoURL | ||
| value: https://github.com/redhat-appstudio/infra-deployments.git | ||
| - name: component | ||
| value: ${{ ctx.targetFreight.origin.name }} | ||
| steps: | ||
| - uses: git-clone | ||
| as: clone | ||
| config: | ||
| repoURL: ${{ vars.repoURL }} | ||
| checkout: | ||
| - branch: main | ||
| path: ./src | ||
| - task: | ||
| name: tekton-kueue-promote-ring-0 | ||
| as: tekton-kueue-promote | ||
| vars: | ||
| - name: srcPath | ||
| value: ./src | ||
| - uses: git-commit | ||
| as: commit | ||
| config: | ||
| path: ./src | ||
| message: | | ||
| chore(${{ ctx.stage }}): promote ${{ vars.component }} | ||
| - uses: git-push | ||
| as: push | ||
| config: | ||
| path: ./src | ||
| targetBranch: ${{ ctx.project }}/${{ vars.component }}/ring-0 | ||
| force: true | ||
| - uses: git-open-pr | ||
| as: open-pr | ||
| continueOnError: true | ||
| config: | ||
| repoURL: ${{ vars.repoURL }} | ||
| sourceBranch: ${{ ctx.project }}/${{ vars.component }}/ring-0 | ||
| targetBranch: main | ||
| title: "chore(${{ ctx.stage }}): promote ${{ vars.component }}" | ||
| description: | | ||
| ### ${{ ctx.stage }} | ||
|
|
||
| | | | | ||
| |---|---| | ||
| | **Component** | `${{ vars.component }}` | | ||
| | **Project** | `${{ ctx.project }}` | | ||
| | **Promotion** | `${{ ctx.promotion }}` | | ||
| | **Freight** | `${{ ctx.targetFreight.alias }}` | | ||
|
|
||
| --- | ||
|
|
||
| ${{ (outputs[vars.component + '-promote.pr-meta']?.details) ?? ('Promotes `' + vars.component + '` to **' + ctx.stage + '**.') }} | ||
|
|
||
| --- | ||
|
|
||
| Auto-merged after CI passes. No manual approval required for Ring 0. | ||
|
|
||
| > Branch is force-pushed each promotion cycle. Do not commit directly. | ||
| labels: | ||
| - ring-0 | ||
| - automated-promotion | ||
| - component/${{ vars.component }} | ||
| - task: | ||
| name: wait-for-ci | ||
| as: wait-for-ci | ||
| vars: | ||
| - name: commitSHA | ||
| value: ${{ outputs['push'].commit }} | ||
| - uses: http | ||
| as: find-pr | ||
| retry: | ||
| timeout: 5m0s | ||
| errorThreshold: 10 | ||
| config: | ||
| method: GET | ||
| url: https://api.github.com/repos/redhat-appstudio/infra-deployments/pulls?head=redhat-appstudio:${{ ctx.project }}/${{ vars.component }}/ring-0&state=open | ||
| headers: | ||
| - name: Authorization | ||
| value: Bearer ${{ secret('kargo-infra-deployments-secrets').github_pat }} | ||
| - name: Accept | ||
| value: application/vnd.github+json | ||
| outputs: | ||
| - name: prNumber | ||
| fromExpression: response.body[0].number | ||
| successExpression: response.status == 200 && len(response.body) > 0 | ||
| timeout: 30s | ||
| - uses: git-merge-pr | ||
| as: merge-pr | ||
| retry: | ||
| timeout: 2h0m0s | ||
| errorThreshold: 240 | ||
| config: | ||
| repoURL: ${{ vars.repoURL }} | ||
| prNumber: ${{ outputs['find-pr'].prNumber }} | ||
| mergeMethod: squash | ||
| wait: true | ||
14 changes: 14 additions & 0 deletions
14
...ts/kargo/internal-production/projects/kargo-infra-deployments/tekton-kueue/warehouse.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| apiVersion: kargo.akuity.io/v1alpha1 | ||
| kind: Warehouse | ||
| metadata: | ||
| name: tekton-kueue | ||
| spec: | ||
| freightCreationPolicy: Automatic | ||
| interval: 2h0m0s | ||
| subscriptions: | ||
| - image: | ||
| repoURL: quay.io/openshift-pipeline/pipelines-scheduler-rhel10 | ||
| imageSelectionStrategy: NewestBuild | ||
| discoveryLimit: 5 | ||
| allowTags: nightly | ||
|
qodo-for-redhat-appstudio[bot] marked this conversation as resolved.
|
||
67 changes: 67 additions & 0 deletions
67
components/kargo/internal-staging/projects/kargo-konflux-infra/promotiontasks.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| --- | ||
| apiVersion: kargo.akuity.io/v1alpha1 | ||
| kind: PromotionTask | ||
| metadata: | ||
| name: promote-component-with-copy | ||
| spec: | ||
| vars: | ||
| - name: repoURL | ||
| value: https://github.com/redhat-appstudio/infra-deployments | ||
| - name: branch | ||
| value: main | ||
| - name: srcKustomization | ||
| - name: destKustomization | ||
| - name: commitMessage | ||
|
|
||
| steps: | ||
| # Clone the Git repository that contains the Kustomize configuration | ||
| # to the ./src directory, and the environment configuration to ./out. | ||
| - uses: git-clone | ||
| as: git-clone | ||
| config: | ||
| repoURL: ${{ vars.repoURL }} | ||
| checkout: | ||
| - commit: ${{ commitFrom(vars.repoURL, warehouse(ctx.targetFreight.origin.name)).ID }} | ||
| path: ./src | ||
| as: src | ||
| - branch: ${{ vars.branch }} | ||
| path: ./main | ||
| as: main | ||
|
|
||
| - uses: delete | ||
| config: | ||
| path: ./main/${{ vars.destKustomization }} | ||
|
|
||
| - uses: copy | ||
| as: update-component | ||
| config: | ||
| inPath: ./src/${{ vars.srcKustomization }} | ||
| outPath: ./main/${{ vars.destKustomization }} | ||
|
|
||
| # Commit the changes to the Git repository. | ||
| - uses: git-commit | ||
| as: commit | ||
| config: | ||
| path: ./main | ||
| message: ${{ vars.commitMessage }} | ||
|
|
||
| # Push the changes to the Git repository. | ||
| - uses: git-push | ||
| as: push | ||
| config: | ||
| path: ./main | ||
| generateTargetBranch: true | ||
|
|
||
| - uses: git-open-pr | ||
| as: open-pr | ||
| config: | ||
| repoURL: ${{ vars.repoURL }} | ||
| createTargetBranch: true | ||
| sourceBranch: ${{ task.outputs.push.branch }} | ||
| targetBranch: main | ||
|
|
||
| - uses: git-wait-for-pr | ||
| as: wait-for-pr | ||
| config: | ||
| repoURL: ${{ vars.repoURL }} | ||
| prNumber: ${{ task.outputs['open-pr'].pr.id }} |
27 changes: 27 additions & 0 deletions
27
components/kargo/internal-staging/projects/kargo-konflux-infra/stages.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
| apiVersion: kargo.akuity.io/v1alpha1 | ||
| kind: Stage | ||
| metadata: | ||
| name: staging-promote | ||
| annotations: | ||
| kargo.akuity.io/color: yellow | ||
| spec: | ||
| requestedFreight: | ||
| - origin: | ||
| kind: Warehouse | ||
| name: development-tekton-kueue | ||
| sources: | ||
| direct: true | ||
| promotionTemplate: | ||
| spec: | ||
| steps: | ||
| # promote tekton-kueue to staging | ||
| - task: | ||
| name: promote-component-with-copy | ||
| vars: | ||
| - name: srcKustomization | ||
| value: components/kueue/development/tekton-kueue | ||
| - name: destKustomization | ||
| value: components/kueue/staging/base/tekton-kueue | ||
| - name: commitMessage | ||
| value: "Promote tekton-kueue to staging" |
12 changes: 12 additions & 0 deletions
12
components/kargo/internal-staging/projects/kargo-konflux-infra/warehouse.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| apiVersion: kargo.akuity.io/v1alpha1 | ||
| kind: Warehouse | ||
| metadata: | ||
| name: development-tekton-kueue | ||
| spec: | ||
| subscriptions: | ||
| - git: | ||
| repoURL: https://github.com/redhat-appstudio/infra-deployments | ||
| branch: main | ||
| includePaths: | ||
| - components/kueue/development/tekton-kueue |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.