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

Update template to use cluster resolver instead of clusterTask #2412

Merged

Conversation

savitaashture
Copy link
Contributor

@savitaashture savitaashture commented Nov 20, 2024

Changes

Now yaml of pipeline looks like below

$ kubectl get pipeline -n openshift s2i-java -o yaml
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
  annotations:
    operator.tekton.dev/last-applied-hash: 2260c0add316038f374abec17c4be39ad4bcf43f8471f221cbf4817cec48c910
    operator.tekton.dev/preserve-namespace: "true"
  creationTimestamp: "2024-11-20T12:22:38Z"
  generation: 1
  labels:
    operator.tekton.dev/operand-name: openshift-pipelines-addons
    pipeline.openshift.io/runtime: java
    pipeline.openshift.io/type: openshift
  name: s2i-java
  namespace: openshift
  ownerReferences:
  - apiVersion: operator.tekton.dev/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: TektonInstallerSet
    name: addon-custom-pipelinestemplate-mkhbf
    uid: 7e68a241-f348-4acf-98c0-4bad3a2903fb
  resourceVersion: "107220"
  uid: 4550b397-faad-43d6-8740-1c267642e6a9
spec:
  params:
  - name: APP_NAME
    type: string
  - name: GIT_REPO
    type: string
  - name: GIT_REVISION
    type: string
  - name: IMAGE_NAME
    type: string
  - default: .
    name: PATH_CONTEXT
    type: string
  - default: openjdk-11-ubi8
    name: VERSION
    type: string
  tasks:
  - name: fetch-repository
    params:
    - name: URL
      value: $(params.GIT_REPO)
    - name: REVISION
      value: $(params.GIT_REVISION)
    - name: SUBDIRECTORY
      value: ""
    - name: DELETE_EXISTING
      value: "true"
    taskRef:
      params:
      - name: kind
        value: task
      - name: name
        value: git-clone
      - name: namespace
        value: openshift-pipelines
      resolver: cluster
    workspaces:
    - name: output
      workspace: workspace
  - name: build
    params:
    - name: IMAGE
      value: $(params.IMAGE_NAME)
    - name: TLS_VERIFY
      value: "false"
    - name: CONTEXT
      value: $(params.PATH_CONTEXT)
    - name: VERSION
      value: $(params.VERSION)
    runAfter:
    - fetch-repository
    taskRef:
      params:
      - name: kind
        value: task
      - name: name
        value: s2i-java
      - name: namespace
        value: openshift-pipelines
      resolver: cluster
    workspaces:
    - name: source
      workspace: workspace
  - name: deploy
    params:
    - name: SCRIPT
      value: oc rollout status dc/$(params.APP_NAME)
    runAfter:
    - build
    taskRef:
      params:
      - name: kind
        value: task
      - name: name
        value: openshift-client
      - name: namespace
        value: openshift-pipelines
      resolver: cluster
  workspaces:
  - name: workspace

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Release Notes

NONE

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Nov 20, 2024
@savitaashture savitaashture requested review from jkandasa and removed request for piyush-garg and PuneetPunamiya November 20, 2024 12:51
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 20, 2024
@savitaashture
Copy link
Contributor Author

savitaashture commented Nov 20, 2024

cc @pratap0007

@pratap0007
Copy link
Contributor

cc @pratap0007

Thanks @savitaashture for creating the PR

@pratap0007
Copy link
Contributor

LGTM

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Nov 21, 2024
@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 21, 2024
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 21, 2024
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jkandasa, vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [jkandasa,vdemeester]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@PuneetPunamiya
Copy link
Member

/lgtm

@tekton-robot tekton-robot merged commit 04a2ca1 into tektoncd:main Nov 21, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants