-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3205 from cal-itp/3200-streamline-k8s-deploy
Streamline k8s deploy process
- Loading branch information
Showing
18 changed files
with
184 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Generate diff of Kubernetes changes | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
paths: | ||
- '.holo/config.toml' | ||
- '.holo/sources/jarvus-cluster-template.toml' | ||
- '.holo/branches/releases/**' | ||
- '.github/workflows/*-kubernetes.yml' | ||
- 'ci/**' | ||
- 'kubernetes/apps/**' | ||
- 'kubernetes/system/**' | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_TOKEN }} | ||
|
||
jobs: | ||
preview-kubernetes: | ||
runs-on: ubuntu-latest | ||
env: | ||
CLOUDSDK_CORE_PROJECT: cal-itp-data-infra | ||
GKE_NAME: data-infra-apps | ||
GKE_REGION: us-west1 | ||
USE_GKE_GCLOUD_AUTH_PLUGIN: True | ||
steps: | ||
# Setup | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: 'google-github-actions/auth@v2' | ||
with: | ||
credentials_json: '${{ secrets.GCP_SA_KEY }}' | ||
- uses: google-github-actions/setup-gcloud@v2 | ||
- run: gcloud components install gke-gcloud-auth-plugin | ||
- uses: google-github-actions/get-gke-credentials@v1 | ||
with: | ||
cluster_name: ${{ env.GKE_NAME }} | ||
location: ${{ env.GKE_REGION }} | ||
- run: curl -sSL https://install.python-poetry.org | python - | ||
- name: Set up hologit | ||
env: | ||
BIO_RELEASE: 1.6.821 | ||
run: | | ||
curl -LO "https://github.com/biome-sh/biome/releases/download/v${BIO_RELEASE}/bio-${BIO_RELEASE}-x86_64-linux.tar.gz" | ||
tar xzvf "bio-${BIO_RELEASE}-x86_64-linux.tar.gz" | ||
sudo mv bio /usr/local/bin/bio | ||
sudo bio pkg install --binlink jarvus/hologit | ||
git config user.name "Github Action $GITHUB_JOB" | ||
git config user.email "$(whoami)@$(uname -n)" | ||
# Render Kubernetes content with parent underlay and checkout | ||
- run: git holo project kubernetes-workspace --commit-to=kubernetes | ||
- run: git checkout kubernetes | ||
|
||
# Diff and write back to PR | ||
- id: diff | ||
name: Run poetry invoke | ||
shell: bash | ||
working-directory: ci | ||
run: | | ||
poetry install | ||
poetry run invoke secrets -f "./channels/prod.yaml" | ||
poetry run invoke release -f "./channels/prod.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...anches/release-candidate/_data-infra.toml → ...hes/kubernetes-workspace/_data-infra.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[holomapping] | ||
files = [ "ci/**", "kubernetes/apps/**", "kubernetes/system/**", ".github/workflows/service-*" ] | ||
files = [ "ci/**", "kubernetes/apps/**", "kubernetes/system/**", ".github/workflows/*-kubernetes.yml" ] | ||
before = "*" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.