Skip to content

Commit

Permalink
Merge pull request #50 from yangcao77/pipeline-default-branch
Browse files Browse the repository at this point in the history
pass in branch name
  • Loading branch information
yangcao77 authored Apr 5, 2024
2 parents f67a95b + 010315d commit e4aca28
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 3 deletions.
2 changes: 2 additions & 0 deletions skeleton/backstage/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ spec:
image: '${{ parameters.imageRegistry }}/${{ parameters.imageOrg }}/${{ parameters.imageName }}'
tags: 'sed.edit.APPTAGS'
owner: ${{ parameters.owner }}
defaultBranch: ${{ parameters.branch }}
# This action creates a new GitHub repository and publishes the files in the workspace directory to the repository.
- id: publish-github
name: Publish Repository to GitHub
Expand Down Expand Up @@ -198,6 +199,7 @@ spec:
gitSecretKey: ${GIT__SECRET__DEFAULT__KEY}
webhookSecret: ${WEBHOOK__SECRET__DEFAULT__NAME}
webhookSecretKey: ${WEBHOOK__SECRET__DEFAULT__KEY}
defaultBranch: main
- action: fs:rename
id: renameComponentDir
name: Rename Component Directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: ${{ values.name }}-gitops-on-pull-request
annotations:
pipelinesascode.tekton.dev/on-event: "[pull_request]"
pipelinesascode.tekton.dev/on-target-branch: "[main]"
pipelinesascode.tekton.dev/on-target-branch: "[${{ values.defaultBranch }}]"
pipelinesascode.tekton.dev/pipeline: "https://raw.githubusercontent.com/redhat-appstudio/tssc-sample-pipelines/main/pac/pipelines/gitops-pull-request-rhtap.yaml"
pipelinesascode.tekton.dev/task-0: "https://raw.githubusercontent.com/redhat-appstudio/tssc-sample-pipelines/main/pac/tasks/git-clone.yaml"
pipelinesascode.tekton.dev/task-1: "https://raw.githubusercontent.com/redhat-appstudio/tssc-sample-pipelines/main/pac/tasks/gather-deploy-images.yaml"
Expand Down
2 changes: 1 addition & 1 deletion skeleton/source-repo/.tekton/docker-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: ${{ values.name }}-on-pull-request
annotations:
pipelinesascode.tekton.dev/on-event: "[pull_request]"
pipelinesascode.tekton.dev/on-target-branch: "[main]"
pipelinesascode.tekton.dev/on-target-branch: "[${{ values.defaultBranch }}]"
pipelinesascode.tekton.dev/max-keep-runs: "2"
pipelinesascode.tekton.dev/pipeline: "https://raw.githubusercontent.com/redhat-appstudio/tssc-sample-pipelines/main/pac/pipelines/docker-build-rhtap.yaml"
pipelinesascode.tekton.dev/task-0: "https://raw.githubusercontent.com/redhat-appstudio/tssc-sample-pipelines/main/pac/tasks/init.yaml"
Expand Down
2 changes: 1 addition & 1 deletion skeleton/source-repo/.tekton/docker-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: ${{ values.name }}-on-push
annotations:
pipelinesascode.tekton.dev/on-event: "[push]"
pipelinesascode.tekton.dev/on-target-branch: "[main]"
pipelinesascode.tekton.dev/on-target-branch: "[${{ values.defaultBranch }}]"
pipelinesascode.tekton.dev/max-keep-runs: "2"
pipelinesascode.tekton.dev/pipeline: "https://raw.githubusercontent.com/redhat-appstudio/tssc-sample-pipelines/main/pac/pipelines/docker-build-rhtap.yaml"
pipelinesascode.tekton.dev/task-0: "https://raw.githubusercontent.com/redhat-appstudio/tssc-sample-pipelines/main/pac/tasks/init.yaml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ spec:
image: '${{ parameters.imageRegistry }}/${{ parameters.imageOrg }}/${{ parameters.imageName }}'
tags: '["java", "quarkus", "sscs", "sbom", "acs"]'
owner: ${{ parameters.owner }}
defaultBranch: ${{ parameters.branch }}
# This action creates a new GitHub repository and publishes the files in the workspace directory to the repository.
- id: publish-github
name: Publish Repository to GitHub
Expand Down Expand Up @@ -198,6 +199,7 @@ spec:
gitSecretKey: password
webhookSecret: pipelines-secret
webhookSecretKey: webhook.secret
defaultBranch: main
- action: fs:rename
id: renameComponentDir
name: Rename Component Directory
Expand Down
2 changes: 2 additions & 0 deletions templates/devfile-sample-dotnet60-dance/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ spec:
image: '${{ parameters.imageRegistry }}/${{ parameters.imageOrg }}/${{ parameters.imageName }}'
tags: '["net", "sscs", "sbom", "acs"]'
owner: ${{ parameters.owner }}
defaultBranch: ${{ parameters.branch }}
# This action creates a new GitHub repository and publishes the files in the workspace directory to the repository.
- id: publish-github
name: Publish Repository to GitHub
Expand Down Expand Up @@ -198,6 +199,7 @@ spec:
gitSecretKey: password
webhookSecret: pipelines-secret
webhookSecretKey: webhook.secret
defaultBranch: main
- action: fs:rename
id: renameComponentDir
name: Rename Component Directory
Expand Down
2 changes: 2 additions & 0 deletions templates/devfile-sample-go-dance/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ spec:
image: '${{ parameters.imageRegistry }}/${{ parameters.imageOrg }}/${{ parameters.imageName }}'
tags: '["go", "sscs", "sbom", "acs"]'
owner: ${{ parameters.owner }}
defaultBranch: ${{ parameters.branch }}
# This action creates a new GitHub repository and publishes the files in the workspace directory to the repository.
- id: publish-github
name: Publish Repository to GitHub
Expand Down Expand Up @@ -198,6 +199,7 @@ spec:
gitSecretKey: password
webhookSecret: pipelines-secret
webhookSecretKey: webhook.secret
defaultBranch: main
- action: fs:rename
id: renameComponentDir
name: Rename Component Directory
Expand Down
2 changes: 2 additions & 0 deletions templates/devfile-sample-java-springboot-dance/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ spec:
image: '${{ parameters.imageRegistry }}/${{ parameters.imageOrg }}/${{ parameters.imageName }}'
tags: '["java", "spring", "sscs", "sbom", "acs"]'
owner: ${{ parameters.owner }}
defaultBranch: ${{ parameters.branch }}
# This action creates a new GitHub repository and publishes the files in the workspace directory to the repository.
- id: publish-github
name: Publish Repository to GitHub
Expand Down Expand Up @@ -198,6 +199,7 @@ spec:
gitSecretKey: password
webhookSecret: pipelines-secret
webhookSecretKey: webhook.secret
defaultBranch: main
- action: fs:rename
id: renameComponentDir
name: Rename Component Directory
Expand Down
2 changes: 2 additions & 0 deletions templates/devfile-sample-nodejs-dance/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ spec:
image: '${{ parameters.imageRegistry }}/${{ parameters.imageOrg }}/${{ parameters.imageName }}'
tags: '["nodejs", "express", "ubi8", "sscs", "sbom", "acs"]'
owner: ${{ parameters.owner }}
defaultBranch: ${{ parameters.branch }}
# This action creates a new GitHub repository and publishes the files in the workspace directory to the repository.
- id: publish-github
name: Publish Repository to GitHub
Expand Down Expand Up @@ -198,6 +199,7 @@ spec:
gitSecretKey: password
webhookSecret: pipelines-secret
webhookSecretKey: webhook.secret
defaultBranch: main
- action: fs:rename
id: renameComponentDir
name: Rename Component Directory
Expand Down
2 changes: 2 additions & 0 deletions templates/devfile-sample-python-dance/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ spec:
image: '${{ parameters.imageRegistry }}/${{ parameters.imageOrg }}/${{ parameters.imageName }}'
tags: '["python", "pip", "flask", "sscs", "sbom", "acs"]'
owner: ${{ parameters.owner }}
defaultBranch: ${{ parameters.branch }}
# This action creates a new GitHub repository and publishes the files in the workspace directory to the repository.
- id: publish-github
name: Publish Repository to GitHub
Expand Down Expand Up @@ -198,6 +199,7 @@ spec:
gitSecretKey: password
webhookSecret: pipelines-secret
webhookSecretKey: webhook.secret
defaultBranch: main
- action: fs:rename
id: renameComponentDir
name: Rename Component Directory
Expand Down

0 comments on commit e4aca28

Please sign in to comment.