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

    view merge alert

  • 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

    create merge alert

  • Since this merge request is to the parasol-store component, the parasol-store-build-pr-open pipeline gets triggered and can viewed in the parasol-store component

    parasol store pr open pipeline start

  • 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

    parasol store pr open pipeline done

  • This status update can be visible in the Merge Request page. Note that the Pipeline is marked as Passed and ready to be merged

    parasol store pr status update

  • 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

      gitlab update task

    • 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

    parasol store gitlab pr merge

  • The Merge action triggers another Pipeline in the parasol-store component on Developer Hub, which will update the Argo manifests with the new image tag.

    Click to view screenshot

    parasol store pr merge start

  • 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

      parasol store pr merge done

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

    parasol store argo

  • 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 parasol store argo dev

    • Staging Argo: parasol-store-staging

      parasol store argo 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.