GAP Documentation
GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage
Edit page

Syncing your application to production in CI workflow

Syncing your application will be no longer possible by setting GAP_PROD_DEPLOY environment variable to true due to security concerns.

We use ArgoCD github action integration to sync our application to production. You can find more details about how to set up github actions for argo CD in the official documentation.

This enables us to have more control over who can sync to production by using github’s repo information,branch protection rules and required reviews.

Setting up OIDC token in github actions

Set up your Subject claim template for your repository as repo, workflow.

Setting up oidc token in github actions
Setting up oidc token in github actions

Add an extra step / job to your CI workflow

  argocd-sync-to-production:
    runs-on: ubuntu-latest
    permissions:
      contents: "read"
      id-token: "write"
    needs:
      - update-image-tag
    steps:
      - uses: emartech/gap-tools/argocd-sync@master
        with:
          argocd_app_name: <argocd name of your application>

The argocd_app_name should be the full name of your application, eg.: gap-docs-cloud-platform-gap-s-us1-01

Open a ticket to the GAP team

Dear GAP team,

Please set permission to sync using ArgoCD with the following settings:
- Repository: <repository of your application>
- Workflow name: <name of the workflow that will be used to sync to production>
- Namespace: <namespace of your application>
- Application name: <name of your application>

Thanks,
{TeamLead}