diff --git a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/08-add-create-environment.md b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/08-add-create-environment.md index 8267e343..b5cec8a1 100644 --- a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/08-add-create-environment.md +++ b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/08-add-create-environment.md @@ -141,7 +141,7 @@ The create environment task utilizes [Tronador](https://docs.stakater.com/tronad secretName: git-pat-creds ``` - **Notice** that we added another **workspace repo-token** to the pipeline run. This workspace utilizes the git-pat-creds secret that we previously created and mounts it to the create-environment task. + **Notice** that we added another **workspace, repo-token** to the pipeline run. This workspace utilizes the git-pat-creds secret that we previously created and mounts it to the create-environment task. !!! note Remember to add the remote task in the annotations diff --git a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/10-add-kube-linting.md b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/10-add-kube-linting.md index e7720aa2..bbd1a744 100644 --- a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/10-add-kube-linting.md +++ b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/10-add-kube-linting.md @@ -163,6 +163,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a !!! note Remember to add the remote task in the annotations + ![Kube-linting](images/kube-linting-annotation.png) 1. Create a pull request with you changes. This should trigger the pipeline in the build namespace. diff --git a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/11-add-unit-test.md b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/11-add-unit-test.md index b6cbc551..f9061743 100644 --- a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/11-add-unit-test.md +++ b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/11-add-unit-test.md @@ -14,7 +14,7 @@ ### Create PipelineRun with Unit Test Task -You have already created a PipelineRun in the previous tutorial. Let's now add another task `unit-test` to it. +You have already created a PipelineRun in the previous tutorial. Let's now add another task [`unit-test`](https://github.com/stakater-tekton-catalog/unit-test) to it. 1. Open up the PipelineRun file you created in the previous tutorial. 1. Now edit the file so the YAML becomes like the one given below. @@ -27,20 +27,23 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a annotations: pipelinesascode.tekton.dev/on-event: "[pull_request]" # Trigger the pipelineRun on push events on branch main pipelinesascode.tekton.dev/on-target-branch: "main" - pipelinesascode.tekton.dev/task: "[git-clone, https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-create-git-tag/rendered/stakater-create-git-tag-0.0.7.yaml, https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-create-environment/rendered/stakater-create-environment-0.0.16.yaml,https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-code-linting/rendered/stakater-code-linting-0.0.3.yaml, - https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-kube-linting/rendered/stakater-kube-linting-0.0.6.yaml, - https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-unit-test/rendered/stakater-unit-test-0.0.5.yaml]" + pipelinesascode.tekton.dev/task: "[git-clone, + https://raw.githubusercontent.com/stakater-tekton-catalog/create-git-tag/0.0.12/task/stakater-create-git-tag/stakater-create-git-tag.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/create-environment/0.0.16/task/stakater-create-environment/stakater-create-environment.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/code-linting-mvn/0.0.4/task/stakater-code-linting/stakater-code-linting.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/kube-linting/0.0.7/task/stakater-kube-linting/stakater-kube-linting.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/unit-test/0.0.6/task/stakater-unit-test/stakater-unit-test.yaml]" pipelinesascode.tekton.dev/max-keep-runs: "2" # Only remain 2 latest pipelineRuns on SAAP spec: params: - name: repo_url value: "git@github.com://" # Place your repo SSH URL - - name: gitrevision + - name: git_revision value: {{revision}} # Dynamic variable to fetch branch name of the push event on your repo - name: repo_path value: {{repo_name}} # Dynamic varaible to fetch repo name - - name: image_registry_url - value: "" # Place image registry URL without https:// + - name: image_registry + value: "" # Place image registry URL without https:// succeeded by your application name - name: helm_registry value: "" # Place helm registry URL with https:// - name: pull_request_number @@ -48,9 +51,9 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a pipelineSpec: # Define what parameters will be used for pipeline params: - name: repo_url - - name: gitrevision + - name: git_revision - name: repo_path - - name: image_registry_url + - name: image_registry - name: helm_registry - name: pull_request_number workspaces: # Mention what workspaces will be used by this pipeline to store data and used by data transferring between tasks @@ -72,12 +75,12 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a - name: url value: $(params.repo_url) - name: revision - value: $(params.gitrevision) + value: $(params.git_revision) - name: create-git-tag runAfter: - fetch-repository taskRef: - name: stakater-create-git-tag-0.0.7 + name: stakater-create-git-tag kind: Task params: - name: PR_NUMBER @@ -94,7 +97,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a - create-git-tag taskRef: kind: Task - name: stakater-create-environment-0.0.15 + name: stakater-create-environment params: - name: CREATE_ON_CLUSTER value: "true" @@ -121,7 +124,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a runAfter: - stakater-create-environment taskRef: - name: stakater-code-linting-0.0.3 + name: stakater-code-linting kind: Task workspaces: - name: source @@ -130,7 +133,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a runAfter: - stakater-create-environment taskRef: - name: stakater-kube-linting-0.0.6 + name: stakater-kube-linting kind: Task params: - name: FILE @@ -147,7 +150,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a - code-linting - kube-linting taskRef: - name: stakater-unit-test-0.0.5 + name: stakater-unit-test kind: Task workspaces: - name: source @@ -171,6 +174,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a !!! note Remember to add the remote task in the annotations + ![unit-test](images/unit-test-annotation.png) 1. Create a pull request with you changes. This should trigger the pipeline in the build namespace. diff --git a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/12-add-sonar-scan.md b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/12-add-sonar-scan.md index 1df1cff3..7a04a0a0 100644 --- a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/12-add-sonar-scan.md +++ b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/12-add-sonar-scan.md @@ -14,7 +14,7 @@ ### Create PipelineRun with Sonar Scan Task -You have already created a PipelineRun in the previous tutorial. Let's now add another task `sonar-scan` to it. +You have already created a PipelineRun in the previous tutorial. Let's now add another task [`sonar-scan`](https://github.com/stakater-tekton-catalog/sonarqube-scan) to it. 1. Open up the PipelineRun file you created in the previous tutorial. 1. Now edit the file so the YAML becomes like the one given below. @@ -27,21 +27,24 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a annotations: pipelinesascode.tekton.dev/on-event: "[pull_request]" # Trigger the pipelineRun on push events on branch main pipelinesascode.tekton.dev/on-target-branch: "main" - pipelinesascode.tekton.dev/task: "[git-clone, https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-create-git-tag/rendered/stakater-create-git-tag-0.0.7.yaml, https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-create-environment/rendered/stakater-create-environment-0.0.16.yaml,https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-code-linting/rendered/stakater-code-linting-0.0.3.yaml, - https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-kube-linting/rendered/stakater-kube-linting-0.0.6.yaml, - https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-unit-test/rendered/stakater-unit-test-0.0.5.yaml, - https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-sonarqube-scan/rendered/stakater-sonarqube-scan-0.0.5.yaml]" + pipelinesascode.tekton.dev/task: "[git-clone, + https://raw.githubusercontent.com/stakater-tekton-catalog/create-git-tag/0.0.12/task/stakater-create-git-tag/stakater-create-git-tag.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/create-environment/0.0.16/task/stakater-create-environment/stakater-create-environment.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/code-linting-mvn/0.0.4/task/stakater-code-linting/stakater-code-linting.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/kube-linting/0.0.7/task/stakater-kube-linting/stakater-kube-linting.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/unit-test/0.0.6/task/stakater-unit-test/stakater-unit-test.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/sonarqube-scan/0.0.13/task/stakater-sonarqube-scan/stakater-sonarqube-scan.yaml]" pipelinesascode.tekton.dev/max-keep-runs: "2" # Only remain 2 latest pipelineRuns on SAAP spec: params: - name: repo_url value: "git@github.com://" # Place your repo SSH URL - - name: gitrevision + - name: git_revision value: {{revision}} # Dynamic variable to fetch branch name of the push event on your repo - name: repo_path value: {{repo_name}} # Dynamic varaible to fetch repo name - - name: image_registry_url - value: "" # Place image registry URL without https:// + - name: image_registry + value: "" # Place image registry URL without https:// succeeded by your application name - name: helm_registry value: "" # Place helm registry URL with https:// - name: pull_request_number @@ -49,9 +52,9 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a pipelineSpec: # Define what parameters will be used for pipeline params: - name: repo_url - - name: gitrevision + - name: git_revision - name: repo_path - - name: image_registry_url + - name: image_registry - name: helm_registry - name: pull_request_number workspaces: # Mention what workspaces will be used by this pipeline to store data and used by data transferring between tasks @@ -73,12 +76,12 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a - name: url value: $(params.repo_url) - name: revision - value: $(params.gitrevision) + value: $(params.git_revision) - name: create-git-tag runAfter: - fetch-repository taskRef: - name: stakater-create-git-tag-0.0.7 + name: stakater-create-git-tag kind: Task params: - name: PR_NUMBER @@ -95,7 +98,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a - create-git-tag taskRef: kind: Task - name: stakater-create-environment-0.0.15 + name: stakater-create-environment params: - name: CREATE_ON_CLUSTER value: "true" @@ -122,7 +125,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a runAfter: - stakater-create-environment taskRef: - name: stakater-code-linting-0.0.3 + name: stakater-code-linting kind: Task workspaces: - name: source @@ -131,7 +134,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a runAfter: - stakater-create-environment taskRef: - name: stakater-kube-linting-0.0.6 + name: stakater-kube-linting kind: Task params: - name: FILE @@ -148,7 +151,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a - code-linting - kube-linting taskRef: - name: stakater-unit-test-0.0.5 + name: stakater-unit-test kind: Task workspaces: - name: source @@ -157,11 +160,11 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a runAfter: - unit-test taskRef: - name: stakater-sonarqube-scan-0.0.5 + name: stakater-sonarqube-scan kind: Task params: - name: SONAR_HOST_URL - value: https://sonarqube-stakater-sonarqube.apps.tno2-ams.s9nghh76.lab.kubeapp.cloud + value: - name: SONAR_PROJECT_KEY value: $(params.repo_path) - name: SONAR_LOGIN @@ -185,8 +188,11 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a secretName: git-pat-creds ``` + **Notice** we have provided a parameter **SONAR_HOST_URL** to the sonar-scan task. You need to provide your SonarQube url here. You can get it from Forecastle. + !!! note Remember to add the remote task in the annotations + ![sonar-scan](images/sonar-scan-annotation.png) 1. Create a pull request with you changes. This should trigger the pipeline in the build namespace. diff --git a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/13-add-buildah.md b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/13-add-buildah.md index 00d7bfe0..d98fb594 100644 --- a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/13-add-buildah.md +++ b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/13-add-buildah.md @@ -14,7 +14,7 @@ ### Create PipelineRun with Buildah Task -You have already created a PipelineRun in the previous tutorial. Let's now add another task `buildah` to it. +You have already created a PipelineRun in the previous tutorial. Let's now add another task [`buildah`](https://github.com/stakater-tekton-catalog/buildah) to it. 1. Open up the PipelineRun file you created in the previous tutorial. 1. Now edit the file so the YAML becomes like the one given below. @@ -27,22 +27,25 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a annotations: pipelinesascode.tekton.dev/on-event: "[pull_request]" # Trigger the pipelineRun on push events on branch main pipelinesascode.tekton.dev/on-target-branch: "main" - pipelinesascode.tekton.dev/task: "[git-clone, https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-create-git-tag/rendered/stakater-create-git-tag-0.0.7.yaml, https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-create-environment/rendered/stakater-create-environment-0.0.16.yaml,https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-code-linting/rendered/stakater-code-linting-0.0.3.yaml, - https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-kube-linting/rendered/stakater-kube-linting-0.0.6.yaml, - https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-unit-test/rendered/stakater-unit-test-0.0.5.yaml, - https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-sonarqube-scan/rendered/stakater-sonarqube-scan-0.0.5.yaml, - https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-buildah/rendered/stakater-buildah-0.0.18.yaml]" + pipelinesascode.tekton.dev/task: "[git-clone, + https://raw.githubusercontent.com/stakater-tekton-catalog/create-git-tag/0.0.12/task/stakater-create-git-tag/stakater-create-git-tag.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/create-environment/0.0.16/task/stakater-create-environment/stakater-create-environment.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/code-linting-mvn/0.0.4/task/stakater-code-linting/stakater-code-linting.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/kube-linting/0.0.7/task/stakater-kube-linting/stakater-kube-linting.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/unit-test/0.0.6/task/stakater-unit-test/stakater-unit-test.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/sonarqube-scan/0.0.13/task/stakater-sonarqube-scan/stakater-sonarqube-scan.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/buildah/0.0.29/task/stakater-buildah/stakater-buildah.yaml]" pipelinesascode.tekton.dev/max-keep-runs: "2" # Only remain 2 latest pipelineRuns on SAAP spec: params: - name: repo_url value: "git@github.com://" # Place your repo SSH URL - - name: gitrevision + - name: git_revision value: {{revision}} # Dynamic variable to fetch branch name of the push event on your repo - name: repo_path value: {{repo_name}} # Dynamic varaible to fetch repo name - - name: image_registry_url - value: "" # Place image registry URL without https:// + - name: image_registry + value: "" # Place image registry URL without https:// succeeded by your application name - name: helm_registry value: "" # Place helm registry URL with https:// - name: pull_request_number @@ -50,9 +53,9 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a pipelineSpec: # Define what parameters will be used for pipeline params: - name: repo_url - - name: gitrevision + - name: git_revision - name: repo_path - - name: image_registry_url + - name: image_registry - name: helm_registry - name: pull_request_number workspaces: # Mention what workspaces will be used by this pipeline to store data and used by data transferring between tasks @@ -74,12 +77,12 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a - name: url value: $(params.repo_url) - name: revision - value: $(params.gitrevision) + value: $(params.git_revision) - name: create-git-tag runAfter: - fetch-repository taskRef: - name: stakater-create-git-tag-0.0.7 + name: stakater-create-git-tag kind: Task params: - name: PR_NUMBER @@ -96,7 +99,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a - create-git-tag taskRef: kind: Task - name: stakater-create-environment-0.0.15 + name: stakater-create-environment params: - name: CREATE_ON_CLUSTER value: "true" @@ -123,7 +126,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a runAfter: - stakater-create-environment taskRef: - name: stakater-code-linting-0.0.3 + name: stakater-code-linting kind: Task workspaces: - name: source @@ -132,7 +135,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a runAfter: - stakater-create-environment taskRef: - name: stakater-kube-linting-0.0.6 + name: stakater-kube-linting kind: Task params: - name: FILE @@ -149,7 +152,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a - code-linting - kube-linting taskRef: - name: stakater-unit-test-0.0.5 + name: stakater-unit-test kind: Task workspaces: - name: source @@ -158,11 +161,11 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a runAfter: - unit-test taskRef: - name: stakater-sonarqube-scan-0.0.5 + name: stakater-sonarqube-scan kind: Task params: - name: SONAR_HOST_URL - value: https://sonarqube-stakater-sonarqube.apps.tno2-ams.s9nghh76.lab.kubeapp.cloud + value: - name: SONAR_PROJECT_KEY value: $(params.repo_path) - name: SONAR_LOGIN @@ -173,7 +176,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a runAfter: - unit-test taskRef: - name: stakater-buildah-0.0.18 + name: stakater-buildah kind: Task params: - name: IMAGE @@ -210,6 +213,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a !!! note Remember to add the remote task in the annotations + ![buildah](images/buildah.png) 1. Create a pull request with you changes. This should trigger the pipeline in the build namespace. diff --git a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/14-add-trivy-scan.md b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/14-add-trivy-scan.md index 91a8eeef..7fdf3a03 100644 --- a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/14-add-trivy-scan.md +++ b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/14-add-trivy-scan.md @@ -14,7 +14,7 @@ ### Create PipelineRun with Trivy Scan Task -You have already created a PipelineRun in the previous tutorial. Let's now add another task `tricy-scan` to it. +You have already created a PipelineRun in the previous tutorial. Let's now add another task [`tricy-scan`](https://github.com/stakater-tekton-catalog/trivy-scan) to it. 1. Open up the PipelineRun file you created in the previous tutorial. 1. Now edit the file so the YAML becomes like the one given below. @@ -27,23 +27,26 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a annotations: pipelinesascode.tekton.dev/on-event: "[pull_request]" # Trigger the pipelineRun on push events on branch main pipelinesascode.tekton.dev/on-target-branch: "main" - pipelinesascode.tekton.dev/task: "[git-clone, https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-create-git-tag/rendered/stakater-create-git-tag-0.0.7.yaml, https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-create-environment/rendered/stakater-create-environment-0.0.16.yaml,https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-code-linting/rendered/stakater-code-linting-0.0.3.yaml, - https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-kube-linting/rendered/stakater-kube-linting-0.0.6.yaml, - https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-unit-test/rendered/stakater-unit-test-0.0.5.yaml, - https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-sonarqube-scan/rendered/stakater-sonarqube-scan-0.0.5.yaml, - https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-buildah/rendered/stakater-buildah-0.0.18.yaml, - https://raw.githubusercontent.com/stakater/tekton-catalog/main/stakater-trivy-scan/rendered/stakater-trivy-scan-0.0.3.yaml]" + pipelinesascode.tekton.dev/task: "[git-clone, + https://raw.githubusercontent.com/stakater-tekton-catalog/create-git-tag/0.0.12/task/stakater-create-git-tag/stakater-create-git-tag.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/create-environment/0.0.16/task/stakater-create-environment/stakater-create-environment.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/code-linting-mvn/0.0.4/task/stakater-code-linting/stakater-code-linting.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/kube-linting/0.0.7/task/stakater-kube-linting/stakater-kube-linting.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/unit-test/0.0.6/task/stakater-unit-test/stakater-unit-test.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/sonarqube-scan/0.0.13/task/stakater-sonarqube-scan/stakater-sonarqube-scan.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/buildah/0.0.29/task/stakater-buildah/stakater-buildah.yaml, + https://raw.githubusercontent.com/stakater-tekton-catalog/trivy-scan/0.0.3/task/stakater-trivy-scan/stakater-trivy-scan.yaml]" pipelinesascode.tekton.dev/max-keep-runs: "2" # Only remain 2 latest pipelineRuns on SAAP spec: params: - name: repo_url value: "git@github.com://" # Place your repo SSH URL - - name: gitrevision + - name: git_revision value: {{revision}} # Dynamic variable to fetch branch name of the push event on your repo - name: repo_path - value: {{repo_name}} # Dynamic varaible to fetch repo name - - name: image_registry_url - value: "" # Place image registry URL without https:// + value: {{repo_name}} # Dynamic variable to fetch repo name + - name: image_registry + value: "" # Place image registry URL without https:// succeeded by your application name - name: helm_registry value: "" # Place helm registry URL with https:// - name: pull_request_number @@ -51,9 +54,9 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a pipelineSpec: # Define what parameters will be used for pipeline params: - name: repo_url - - name: gitrevision + - name: git_revision - name: repo_path - - name: image_registry_url + - name: image_registry - name: helm_registry - name: pull_request_number workspaces: # Mention what workspaces will be used by this pipeline to store data and used by data transferring between tasks @@ -75,12 +78,12 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a - name: url value: $(params.repo_url) - name: revision - value: $(params.gitrevision) + value: $(params.git_revision) - name: create-git-tag runAfter: - fetch-repository taskRef: - name: stakater-create-git-tag-0.0.7 + name: stakater-create-git-tag kind: Task params: - name: PR_NUMBER @@ -97,7 +100,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a - create-git-tag taskRef: kind: Task - name: stakater-create-environment-0.0.15 + name: stakater-create-environment params: - name: CREATE_ON_CLUSTER value: "true" @@ -124,7 +127,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a runAfter: - stakater-create-environment taskRef: - name: stakater-code-linting-0.0.3 + name: stakater-code-linting kind: Task workspaces: - name: source @@ -133,7 +136,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a runAfter: - stakater-create-environment taskRef: - name: stakater-kube-linting-0.0.6 + name: stakater-kube-linting kind: Task params: - name: FILE @@ -150,7 +153,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a - code-linting - kube-linting taskRef: - name: stakater-unit-test-0.0.5 + name: stakater-unit-test kind: Task workspaces: - name: source @@ -159,11 +162,11 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a runAfter: - unit-test taskRef: - name: stakater-sonarqube-scan-0.0.5 + name: stakater-sonarqube-scan kind: Task params: - name: SONAR_HOST_URL - value: https://sonarqube-stakater-sonarqube.apps.tno2-ams.s9nghh76.lab.kubeapp.cloud + value: - name: SONAR_PROJECT_KEY value: $(params.repo_path) - name: SONAR_LOGIN @@ -174,7 +177,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a runAfter: - unit-test taskRef: - name: stakater-buildah-0.0.18 + name: stakater-buildah kind: Task params: - name: IMAGE @@ -197,7 +200,7 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a - buildah - sonarqube-scan taskRef: - name: stakater-trivy-scan-0.0.3 + name: stakater-trivy-scan kind: Task params: - name: IMAGE @@ -223,7 +226,8 @@ You have already created a PipelineRun in the previous tutorial. Let's now add a ``` !!! note - Remember to add the remote task in the annotations + Remember to add the remote task in the annotations + ![Trivy-scan](images/trivy-scan-annotation.png) 1. Create a pull request with you changes. This should trigger the pipeline in the build namespace. diff --git a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/buildah-annotation.png b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/buildah-annotation.png new file mode 100644 index 00000000..6b66e2e0 Binary files /dev/null and b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/buildah-annotation.png differ diff --git a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/kube-linting-annotation.png b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/kube-linting-annotation.png new file mode 100644 index 00000000..9080a7d1 Binary files /dev/null and b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/kube-linting-annotation.png differ diff --git a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/sonar-scan-annotation.png b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/sonar-scan-annotation.png new file mode 100644 index 00000000..7e4bc44a Binary files /dev/null and b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/sonar-scan-annotation.png differ diff --git a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/trivy-scan-annotation.png b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/trivy-scan-annotation.png new file mode 100644 index 00000000..c3171253 Binary files /dev/null and b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/trivy-scan-annotation.png differ diff --git a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/unit-test-annotation.png b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/unit-test-annotation.png new file mode 100644 index 00000000..f7620991 Binary files /dev/null and b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/unit-test-annotation.png differ