Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[.github] - infra: new connectors deploy workflow #8661

Merged
merged 4 commits into from
Nov 15, 2024

Conversation

JulesBelveze
Copy link
Contributor

@JulesBelveze JulesBelveze commented Nov 15, 2024

Description

This PR aims at adding a workflow to trigger the connectors deployment from the dust-infra repository.

Risk

Deploy Plan

…structure

 - Introduce workflow_dispatch trigger with a configurable input for deploying to the 'us-central1' region
 - Implement concurrency control to manage deployment processes and prevent collisions
 - Authenticate with Google Cloud and set up the Cloud SDK for deployment tasks
 - Build a Docker image using Cloud Build and a custom script, with parameters for image name and Dockerfile path
 - Generate a GitHub App token dynamically for use in the workflow
 - Enable triggering of a downstream repository's workflow using a repository dispatch event with a custom payload including the region and image tag
@JulesBelveze JulesBelveze marked this pull request as draft November 15, 2024 10:00
…ment

 - Switch to using specific app ID and private key for infra deployment
 - Correct the environment variable used for the GitHub token in the dispatch event trigger
@JulesBelveze JulesBelveze marked this pull request as ready for review November 15, 2024 10:07
 - Ensure the `cloud-build.sh` script uses the correct relative working directory by adding a leading `./` to the path configuration
 - Changed the GitHub App ID reference to use secrets for enhanced security and better management of sensitive data
 - This update ensures that the App ID is not exposed in the workflow file, aligning with best practices for credential storage
./k8s/cloud-build.sh \
--image-name=connectors \
--dockerfile-path=./connectors/Dockerfile \
--working-dir=. \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--working-dir=. \
--working-dir=./ \

id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.INFRA_DISPATCH_APP_ID }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
app-id: ${{ vars.INFRA_DISPATCH_APP_ID }}
app-id: ${{ secrets.INFRA_DISPATCH_APP_ID }}

@JulesBelveze JulesBelveze merged commit 2f6252f into main Nov 15, 2024
2 checks passed
@JulesBelveze JulesBelveze deleted the workflow/trigger-dust-infra branch November 15, 2024 10:13
Duncid pushed a commit that referenced this pull request Nov 15, 2024
* [.github] - feature: add manual workflow dispatch for deploying infrastructure

 - Introduce workflow_dispatch trigger with a configurable input for deploying to the 'us-central1' region
 - Implement concurrency control to manage deployment processes and prevent collisions
 - Authenticate with Google Cloud and set up the Cloud SDK for deployment tasks
 - Build a Docker image using Cloud Build and a custom script, with parameters for image name and Dockerfile path
 - Generate a GitHub App token dynamically for use in the workflow
 - Enable triggering of a downstream repository's workflow using a repository dispatch event with a custom payload including the region and image tag

* [.github] - fix: update secrets and app ID for connector infra deployment

 - Switch to using specific app ID and private key for infra deployment
 - Correct the environment variable used for the GitHub token in the dispatch event trigger

* [.github] - fix: correct working directory path in GitHub Actions config

 - Ensure the `cloud-build.sh` script uses the correct relative working directory by adding a leading `./` to the path configuration

* [.github] - fix: use secret for INFRA_DISPATCH_APP_ID in GitHub Actions

 - Changed the GitHub App ID reference to use secrets for enhanced security and better management of sensitive data
 - This update ensures that the App ID is not exposed in the workflow file, aligning with best practices for credential storage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants