You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tekton-example/README.md
+15-21Lines changed: 15 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,7 @@ Creation of a TaskRun (using `promote-run.yaml`) will then further promote from
12
12
## Other Files
13
13
-`service-promote.yaml`: This is the Tekton Task used for promoting from one repository to another. It creates a PullRequest and this represents the promotion from one environment to another (for example, from development to production - in this case represented as repositories)
14
14
-`service-promote-pipeline.yaml`: Creates a pipeline that executes `build-task.yaml` and `service-promote.yaml`
15
-
-`service-promote-pipeline-run.yaml`: Creates a PipelineRun that executes the `service-promote-pipeline` - This will build the code and promote it to a repository you have specified
16
15
-`promote.yaml`: Creates a pull request from one repository to another repository
17
-
-`promote-run.yaml`: Creates a TaskRun that executes a task promoting from a testing repository to a production repository
18
16
-`build-task.yaml`: This task builds a git source into a docker image and pushes to a docker registry
19
17
-`gitconfig`: Data file for the configmap - includes a GitHub user ID and email address
20
18
@@ -23,7 +21,8 @@ Creation of a TaskRun (using `promote-run.yaml`) will then further promote from
23
21
- You will need two repositories for this example, one to promote from and one to promote to
24
22
- For the repository to promote from, an example can be forked from here: https://github.com/akihikokuroda/promote-demo
25
23
- For the repository to promote to, an example can be forked from here:
- Edit all files in the template folder to contain real values. Entries of the form `REPLACE_ME.x` must be replaced with the value you wish to use, i.e at occurences such as `REPLACE_ME.IMAGE_NAME`, `REPLACE_ME.GITHUB_ORG/REPLACE_ME.GITHUB_REPO` etc... There are eight instances to replace in this folder.
44
+
- Edit both files in the template folder to contain real values. Entries of the form `REPLACE_ME.x` must be replaced with the value you wish to use, i.e at occurences such as `REPLACE_ME.IMAGE_NAME`, `REPLACE_ME.GITHUB_ORG/REPLACE_ME.GITHUB_REPO` etc... There are eight instances to replace in this folder.
This will store your GitHub username and email address in key-value pairs that can be used in the PipelineRun.
58
57
59
-
- Edit `service-promote-pipeline-run.yaml` to contain the name of the repository you want to promote to
60
-
61
58
## Execute Pipeline
62
59
63
-
`service-promote-pipeline-run` is designed to build your microservice from its development repository and then promote the new configuration to a GitOps repository (representing a different environment, for example development, staging, test or production).
60
+
The PipelineRun you will create is designed to build your microservice from its development repository and then promote the new configuration to a GitOps repository (representing a different environment, for example development, staging, test or production).
You can use `promote-run.yaml` to run a subsequent promote from one GitOps repository to another (e.g staging to prod) after merging the pull request on your first GitOps repository. For this you will need a third repository, and for this you can clone: https://github.com/a-roberts/gitops-repo-testing
67
+
- This creates a PipelineRun that executes the `service-promote-pipeline`, which will build the code and promote it to a repository you have specified
68
+
- The logs will be outputted to your console, and you can also view its progress in the Tekton Dashboard.
73
69
74
-
- Edit `promote-run.yaml`to contain the URL of the repository you want to promote from, and the URL of the repository you want to promote to
70
+
## Promote to Next Managed Environment
75
71
76
-
- Create the `promote-run` TaskRun:
77
-
```shell
78
-
kubectl create -f promote-run.yaml
79
-
```
72
+
Optionally, you can run a subsequent promote from one GitOps repository to another (e.g staging to prod) after merging the pull request on your first GitOps repository. For this you will need a third repository, and for this you can fork: https://github.com/rhd-gitops-example/gitops-example-staging
80
73
81
-
You can view the progress of your PipelineRun using:
74
+
- To do this second promote, you will need to create a TaskRun that executes a task promoting from a testing repository to a production repository
Or alternatively view its progress in the Tekton Dashboard.
79
+
This will start the TaskRun and output its logs, and you can also view its progress in the Tekton Dashboard.
86
80
87
-
The PipelineRun will clone the code from the inital repository locally, build it and promote it to the final repository. This will open a pull request which you will be able to view in the repository you chose to promote to.
81
+
The TaskRun will clone the code from the initial repository locally, build it and promote it to the final repository. This will open a pull request which you will be able to view in the repository you chose to promote to.
0 commit comments