Skip to content

Commit

Permalink
Merge pull request #49 from jduimovich/add-gitlab-auth
Browse files Browse the repository at this point in the history
auth-secret in template for gitlab and github
  • Loading branch information
yangcao77 authored Mar 27, 2024
2 parents d2d199e + 38f7e0a commit f67a95b
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 23 deletions.
1 change: 1 addition & 0 deletions skeleton/backstage/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ spec:
description: sed.edit.CATALOG_DESCRIPTION
dockerfile: sed.edit.DOCKERFILE
buildContext: sed.edit.BUILDCONTEXT
gitopsSecretName: ${{ 'gitops-auth-secret' if parameters.hostType === 'GitHub' else 'gitlab-auth-secret' }}
image: '${{ parameters.imageRegistry }}/${{ parameters.imageOrg }}/${{ parameters.imageName }}'
tags: 'sed.edit.APPTAGS'
owner: ${{ parameters.owner }}
Expand Down
4 changes: 2 additions & 2 deletions skeleton/gitops-template/.tekton/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ This pipeline is used to validate pull-requests into the gitops repository. This

Tasks references come from this repository ` ../pipelines` `../tasks` and are referenced by URL using the git resolver in tekton.

When the pipleines in this repo are updated, all future runs in existin pipelines are shared.
When the pipleines in this repo are updated, all future runs in existing pipelines are shared.

A developer can override these tasks with a local copy and updated annotations.

Example

To override the git-clone task, you may simply copy the git reference into your .tekton directory and then reference it from the remote task annotation.

`pipelinesascode.tekton.dev/task-0: "./tekton/git-clone.yaml"`
`pipelinesascode.tekton.dev/task-0: ".tekton/git-clone.yaml"`


## Templates
Expand Down
6 changes: 3 additions & 3 deletions skeleton/source-repo/.tekton/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# docker-build-rhtap

## Shared Git resolver model for shared pipeline and tasks.
## Shared Git resolver model for shared pipeline and tasks

This pipeline is used to create dockerfile based sscs builds. The pipeline run by this runner will clone the source, build an image with SBOM, and attestations and push these to the users image registry.

Tasks references come from this repository ` ../pipelines` `../tasks` and are referenced by URL using the git resolver in tekton.

When the pipleines in this repo are updated, all future runs in existin pipelines are shared.
When the pipleines in this repo are updated, all future runs in existing pipelines are shared.

A developer can override these tasks with a local copy and updated annotations.

Example

To override the git-clone task, you may simply copy the git reference into your .tekton directory and then reference it from the remote task annotation.

`pipelinesascode.tekton.dev/task-0: "./tekton/git-clone.yaml"`
`pipelinesascode.tekton.dev/task-0: ".tekton/git-clone.yaml"`

## Templates
These pipelines are in template format. The references to this repository in the PaC template is `{{values.rawUrl}}` which is updated to point to this repo or the fork of this repo.
Expand Down
2 changes: 2 additions & 0 deletions skeleton/source-repo/.tekton/docker-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ spec:
value: '{{revision}}'
- name: event-type
value: '{{event_type}}'
- name: gitops-auth-secret-name
value: ${{ values.gitopsSecretName }}
pipelineRef:
name: docker-build-rhtap
workspaces:
Expand Down
2 changes: 2 additions & 0 deletions skeleton/source-repo/.tekton/docker-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ spec:
value: '{{revision}}'
- name: event-type
value: '{{event_type}}'
- name: gitops-auth-secret-name
value: ${{ values.gitopsSecretName }}
pipelineRef:
name: docker-build-rhtap
workspaces:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# docker-build-rhtap

## Shared Git resolver model for shared pipeline and tasks.
## Shared Git resolver model for shared pipeline and tasks

This pipeline is used to create dockerfile based sscs builds. The pipeline run by this runner will clone the source, build an image with SBOM, and attestations and push these to the users image registry.

Tasks references come from this repository ` ../pipelines` `../tasks` and are referenced by URL using the git resolver in tekton.

When the pipleines in this repo are updated, all future runs in existin pipelines are shared.
When the pipleines in this repo are updated, all future runs in existing pipelines are shared.

A developer can override these tasks with a local copy and updated annotations.

Example

To override the git-clone task, you may simply copy the git reference into your .tekton directory and then reference it from the remote task annotation.

`pipelinesascode.tekton.dev/task-0: "./tekton/git-clone.yaml"`
`pipelinesascode.tekton.dev/task-0: ".tekton/git-clone.yaml"`

## Templates
These pipelines are in template format. The references to this repository in the PaC template is `{{values.rawUrl}}` which is updated to point to this repo or the fork of this repo.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ spec:
description: Secure Supply Chain Example for Quarkus Java example with advanced continuous integration pipeline covering building, CVE scanning, security scanning, signatures, attestations, SLSA provenance and SBOM along with Gitops-based continuous deployment
dockerfile: src/main/docker/Dockerfile.jvm.staged
buildContext: .
gitopsSecretName: ${{ 'gitops-auth-secret' if parameters.hostType === 'GitHub' else 'gitlab-auth-secret' }}
image: '${{ parameters.imageRegistry }}/${{ parameters.imageOrg }}/${{ parameters.imageName }}'
tags: '["java", "quarkus", "sscs", "sbom", "acs"]'
owner: ${{ parameters.owner }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# docker-build-rhtap

## Shared Git resolver model for shared pipeline and tasks.
## Shared Git resolver model for shared pipeline and tasks

This pipeline is used to create dockerfile based sscs builds. The pipeline run by this runner will clone the source, build an image with SBOM, and attestations and push these to the users image registry.

Tasks references come from this repository ` ../pipelines` `../tasks` and are referenced by URL using the git resolver in tekton.

When the pipleines in this repo are updated, all future runs in existin pipelines are shared.
When the pipleines in this repo are updated, all future runs in existing pipelines are shared.

A developer can override these tasks with a local copy and updated annotations.

Example

To override the git-clone task, you may simply copy the git reference into your .tekton directory and then reference it from the remote task annotation.

`pipelinesascode.tekton.dev/task-0: "./tekton/git-clone.yaml"`
`pipelinesascode.tekton.dev/task-0: ".tekton/git-clone.yaml"`

## Templates
These pipelines are in template format. The references to this repository in the PaC template is `{{values.rawUrl}}` which is updated to point to this repo or the fork of this repo.
Expand Down
1 change: 1 addition & 0 deletions templates/devfile-sample-dotnet60-dance/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ spec:
description: Secure Supply Chain Example for C# .Net 6.0 example with advanced continuous integration pipeline covering building, CVE scanning, security scanning, signatures, attestations, SLSA provenance and SBOM along with Gitops-based continuous deployment
dockerfile: docker/Dockerfile
buildContext: .
gitopsSecretName: ${{ 'gitops-auth-secret' if parameters.hostType === 'GitHub' else 'gitlab-auth-secret' }}
image: '${{ parameters.imageRegistry }}/${{ parameters.imageOrg }}/${{ parameters.imageName }}'
tags: '["net", "sscs", "sbom", "acs"]'
owner: ${{ parameters.owner }}
Expand Down
6 changes: 3 additions & 3 deletions templates/devfile-sample-go-dance/content/docs/pipelines.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# docker-build-rhtap

## Shared Git resolver model for shared pipeline and tasks.
## Shared Git resolver model for shared pipeline and tasks

This pipeline is used to create dockerfile based sscs builds. The pipeline run by this runner will clone the source, build an image with SBOM, and attestations and push these to the users image registry.

Tasks references come from this repository ` ../pipelines` `../tasks` and are referenced by URL using the git resolver in tekton.

When the pipleines in this repo are updated, all future runs in existin pipelines are shared.
When the pipleines in this repo are updated, all future runs in existing pipelines are shared.

A developer can override these tasks with a local copy and updated annotations.

Example

To override the git-clone task, you may simply copy the git reference into your .tekton directory and then reference it from the remote task annotation.

`pipelinesascode.tekton.dev/task-0: "./tekton/git-clone.yaml"`
`pipelinesascode.tekton.dev/task-0: ".tekton/git-clone.yaml"`

## Templates
These pipelines are in template format. The references to this repository in the PaC template is `{{values.rawUrl}}` which is updated to point to this repo or the fork of this repo.
Expand Down
1 change: 1 addition & 0 deletions templates/devfile-sample-go-dance/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ spec:
description: Secure Supply Chain Example for Go Runtime http based application with advanced continuous integration pipeline covering building, CVE scanning, security scanning, signatures, attestations, SLSA provenance and SBOM along with Gitops-based continuous deployment
dockerfile: docker/Dockerfile
buildContext: .
gitopsSecretName: ${{ 'gitops-auth-secret' if parameters.hostType === 'GitHub' else 'gitlab-auth-secret' }}
image: '${{ parameters.imageRegistry }}/${{ parameters.imageOrg }}/${{ parameters.imageName }}'
tags: '["go", "sscs", "sbom", "acs"]'
owner: ${{ parameters.owner }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# docker-build-rhtap

## Shared Git resolver model for shared pipeline and tasks.
## Shared Git resolver model for shared pipeline and tasks

This pipeline is used to create dockerfile based sscs builds. The pipeline run by this runner will clone the source, build an image with SBOM, and attestations and push these to the users image registry.

Tasks references come from this repository ` ../pipelines` `../tasks` and are referenced by URL using the git resolver in tekton.

When the pipleines in this repo are updated, all future runs in existin pipelines are shared.
When the pipleines in this repo are updated, all future runs in existing pipelines are shared.

A developer can override these tasks with a local copy and updated annotations.

Example

To override the git-clone task, you may simply copy the git reference into your .tekton directory and then reference it from the remote task annotation.

`pipelinesascode.tekton.dev/task-0: "./tekton/git-clone.yaml"`
`pipelinesascode.tekton.dev/task-0: ".tekton/git-clone.yaml"`

## Templates
These pipelines are in template format. The references to this repository in the PaC template is `{{values.rawUrl}}` which is updated to point to this repo or the fork of this repo.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ spec:
description: Secure Supply Chain Example for Spring Boot® using Maven sample HTTP/REST application based application with advanced continuous integration pipeline covering building, CVE scanning, security scanning, signatures, attestations, SLSA provenance and SBOM along with Gitops-based continuous deployment
dockerfile: docker/Dockerfile
buildContext: .
gitopsSecretName: ${{ 'gitops-auth-secret' if parameters.hostType === 'GitHub' else 'gitlab-auth-secret' }}
image: '${{ parameters.imageRegistry }}/${{ parameters.imageOrg }}/${{ parameters.imageName }}'
tags: '["java", "spring", "sscs", "sbom", "acs"]'
owner: ${{ parameters.owner }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# docker-build-rhtap

## Shared Git resolver model for shared pipeline and tasks.
## Shared Git resolver model for shared pipeline and tasks

This pipeline is used to create dockerfile based sscs builds. The pipeline run by this runner will clone the source, build an image with SBOM, and attestations and push these to the users image registry.

Tasks references come from this repository ` ../pipelines` `../tasks` and are referenced by URL using the git resolver in tekton.

When the pipleines in this repo are updated, all future runs in existin pipelines are shared.
When the pipleines in this repo are updated, all future runs in existing pipelines are shared.

A developer can override these tasks with a local copy and updated annotations.

Example

To override the git-clone task, you may simply copy the git reference into your .tekton directory and then reference it from the remote task annotation.

`pipelinesascode.tekton.dev/task-0: "./tekton/git-clone.yaml"`
`pipelinesascode.tekton.dev/task-0: ".tekton/git-clone.yaml"`

## Templates
These pipelines are in template format. The references to this repository in the PaC template is `{{values.rawUrl}}` which is updated to point to this repo or the fork of this repo.
Expand Down
1 change: 1 addition & 0 deletions templates/devfile-sample-nodejs-dance/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ spec:
description: Secure Supply Chain Example for Node.js+Express REST API with advanced continuous integration pipeline covering building, CVE scanning, security scanning, signatures, attestations, SLSA provenance and SBOM along with Gitops-based continuous deployment
dockerfile: Dockerfile
buildContext: .
gitopsSecretName: ${{ 'gitops-auth-secret' if parameters.hostType === 'GitHub' else 'gitlab-auth-secret' }}
image: '${{ parameters.imageRegistry }}/${{ parameters.imageOrg }}/${{ parameters.imageName }}'
tags: '["nodejs", "express", "ubi8", "sscs", "sbom", "acs"]'
owner: ${{ parameters.owner }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# docker-build-rhtap

## Shared Git resolver model for shared pipeline and tasks.
## Shared Git resolver model for shared pipeline and tasks

This pipeline is used to create dockerfile based sscs builds. The pipeline run by this runner will clone the source, build an image with SBOM, and attestations and push these to the users image registry.

Tasks references come from this repository ` ../pipelines` `../tasks` and are referenced by URL using the git resolver in tekton.

When the pipleines in this repo are updated, all future runs in existin pipelines are shared.
When the pipleines in this repo are updated, all future runs in existing pipelines are shared.

A developer can override these tasks with a local copy and updated annotations.

Example

To override the git-clone task, you may simply copy the git reference into your .tekton directory and then reference it from the remote task annotation.

`pipelinesascode.tekton.dev/task-0: "./tekton/git-clone.yaml"`
`pipelinesascode.tekton.dev/task-0: ".tekton/git-clone.yaml"`

## Templates
These pipelines are in template format. The references to this repository in the PaC template is `{{values.rawUrl}}` which is updated to point to this repo or the fork of this repo.
Expand Down
1 change: 1 addition & 0 deletions templates/devfile-sample-python-dance/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ spec:
description: Secure Supply Chain Example for Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. This sample demonstrates software supply chain security functionalty using an advanced continuous integration pipeline covering building, CVE scanning, security scanning, signatures, attestations, SLSA provenance and SBOM along with Gitops-based continuous deployment.
dockerfile: docker/Dockerfile
buildContext: .
gitopsSecretName: ${{ 'gitops-auth-secret' if parameters.hostType === 'GitHub' else 'gitlab-auth-secret' }}
image: '${{ parameters.imageRegistry }}/${{ parameters.imageOrg }}/${{ parameters.imageName }}'
tags: '["python", "pip", "flask", "sscs", "sbom", "acs"]'
owner: ${{ parameters.owner }}
Expand Down

0 comments on commit f67a95b

Please sign in to comment.