Skip to content

Commit

Permalink
Merge pull request #4 from uche-madu/dev
Browse files Browse the repository at this point in the history
update workflow badge
  • Loading branch information
uche-madu authored Sep 30, 2023
2 parents 977d228 + 9218806 commit ed7244c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/retag.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
name: >
Retag and Push Airflow Image and Update Values File in
Retag Airflow Image and Update Values File in
the Infrastructure Repository
on:
push:
branches:
- main
types:
- closed
paths: # Only run workflow when Dockerfile or requirements.txt is changed
- 'Dockerfile'
- 'requirements.txt'
Expand Down Expand Up @@ -93,4 +91,4 @@ jobs:
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
branch: ${{ github.head_ref }}
branch: 'main'
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /usr/local/airflow

COPY requirements.txt .

# Install dbt into a virtual environment to use the ExternalPythonOperator
# Install dbt into a virtual environment for use in ExternalPythonOperator
# The sed command allows pip to avoid running with --user flag
RUN python -m venv dbt_venv && \
sed -i 's/include-system-site-packages = false/include-system-site-packages = true/' dbt_venv/pyvenv.cfg && \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
***This is one of two repositories with code for the entire DEB Project. While this repository focuses on the application code such as Airflow DAGs, the [DEB Infrastructure repository](https://github.com/uche-madu/deb-infrastructure) focuses on provisioning cloud resources. This separation of concerns via separate repositories aims to follow GitOps Principles.***

## CI/CD Workflow
The `build.yml` Github Actions workflow builds a custom airflow image and pushes it to Google Artifact Registry. It then checks out the [DEB Infrastructure repository](https://github.com/uche-madu/deb-infrastructure) to update the `airflow-helm/values-dev.yaml` file with the new image and tag. For this to work, create a repository-scoped `Personal Access Token` for your Github account and store it as a secret in this repository. Visit [Github Docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) for details about creating tokens.
The `build-push.yaml` Github Actions workflow builds a custom airflow image and pushes it to Google Artifact Registry. It then checks out the [DEB Infrastructure repository](https://github.com/uche-madu/deb-infrastructure) to update the `airflow-helm/values-dev.yaml` file with the new image and tag. For this to work, create a repository-scoped `Personal Access Token` for your Github account and store it as a secret in this repository. Visit [Github Docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) for details about creating tokens.

0 comments on commit ed7244c

Please sign in to comment.