Developer Activity: Merge request from feature-branch to main
-
Navigate to the feature-branch component you had created. In prompted, login as dev1/{common_password}.
-
Click on View Source link to access the git repo of this component.
-
You will see an alert asking you to create a merge request
-
If you don’t see this alert, you can access this via the Code → Merge Requests left-hand menu, and proceed to click on the New merge request button
-
In the New merge request page, create a merge request by clicking on the Create merge request button at the bottom of the page
-
Since this merge request is to the
parasol-store
component, theparasol-store-build-pr-open
pipeline gets triggered and can viewed in theparasol-store
component -
Once the pipeline completes, make note of the final task
gitlab-update-task
, which updates the Gitlab’s Merge Request with status of the pipeline -
This status update can be visible in the Merge Request page. Note that the Pipeline is marked as Passed and ready to be merged
-
This handoff between the Tekton pipelines and Gitlab is through the use of webhooks.
Click to learn more about this
-
Click on the
gitlab-update-task
in the Tekton pipeline run -
Note the POST to gitlab. Scroll to the right, and you will note that the POST call sends
state=success
along with the Commit ID which then marks that particular Merge Request as success -
In Gitlab, navigate to parasol-store’s Webhooks page to view the Webhooks which have been setup as part of this workshop.
-
Developer Activity: Merge request from feature-branch to main
-
In a real-world scenario, there would be a peer-review or team-lead who would review and merge the PR. For the purposes of this workshop, let us go ahead and assume the role of a reviewer.
-
Navigate back to the Merge Request page and open the request that you created earlier; Click on the Merge button.
Click to view screenshot
-
The
Merge
action triggers another Pipeline in theparasol-store
component on Developer Hub, which will update the Argo manifests with the new image tag.Click to view screenshot
-
When this Pipeline complete, it will
-
Update the Dev and Staging ArgoCD manifests (deployment YAMLs are updated with the new image tag)
-
Create a PR against the Production ArgoCD manifests.
Click to view screenshot
-
Dev and Staging ArgoCD manifests updates
-
Let us now see what happened to the Dev and Staging ArgoCD manifests updates.
-
In Developer Hub, access the CD tab of the parasol-store component
-
Click on the the outgoing-arrow icon next to parasol-store-dev and parasol-store-staging. Login as (admin/{common_password}).
This ArgoCD/OpenShift Gitops is meant only for applications, while the other Argo you have accessed thus far for configuring Developer Hub is only for the the platform related Argo applications -
You will note that both dev and staging are tagged by the Tekton Pipeline to the same image tag. Hover the pointer over the Last Sync comment as shown in the screenshots below.
You may need to Refresh the Argo apps if you don’t the updates immediately. -
Dev Argo: parasol-store-dev
-
Staging Argo: parasol-store-staging
You can click on the parasol-store
deploy highlighted to view the deployment YAML of both dev and staging, and you can verify they are both pointing to the same Quay image
-
In the next section, you will complete the Production Manifests merge.