Skip to content

Commit

Permalink
Merge branch 'main' into doc/upgrade-metabase
Browse files Browse the repository at this point in the history
  • Loading branch information
ohrite authored Sep 18, 2024
2 parents afc3e99 + 00ace1e commit 32dc996
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 107 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build-gtfs-rt-archiver-v3-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ jobs:
python-version: '3.10'
- run: curl -sSL https://install.python-poetry.org | python -
# from https://forcepush.tech/python-package-ci-cd-with-git-hub-actions
- name: Get image tag from pyproject.toml
- name: Get image tag from pyproject.toml and commit SHA
run: |
cd services/gtfs-rt-archiver-v3
PROJECT_VERSION=$(poetry version --short)
echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_ENV
echo "GITHUB_SHA_SHORT=${GITHUB_SHA:0:6}" >> $GITHUB_ENV
- uses: docker/build-push-action@v2
with:
context: services/gtfs-rt-archiver-v3
push: ${{ github.ref == 'refs/heads/main' }}
tags: ghcr.io/${{github.repository}}/gtfs-rt-archiver-v3:${{env.PROJECT_VERSION}}
tags: ghcr.io/${{github.repository}}/gtfs-rt-archiver-v3:${{env.PROJECT_VERSION}}-${{env.GITHUB_SHA_SHORT}}
6 changes: 5 additions & 1 deletion .github/workflows/deploy-apps-maps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: Build and publish apps/maps

on:
push:
branches:
- 'main'
paths:
- '.github/workflows/deploy-apps-maps.yml'
- 'apps/maps/**'
pull_request:
paths:
- '.github/workflows/deploy-apps-maps.yml'
- 'apps/maps/**'
workflow_dispatch:

Expand Down Expand Up @@ -34,7 +38,7 @@ jobs:

# Preview on PRs
- name: Deploy apps/maps preview to Netlify
if: ${{ github.ref != 'refs/heads/main' }}
if: ${{ github.event_name == 'pull_request' }}
run: |
npm install -g netlify-cli
netlify deploy --site=embeddable-maps-calitp-org --dir=apps/maps/build --alias=${GITHUB_REPOSITORY#*/}-${PR_NUMBER}
Expand Down
11 changes: 5 additions & 6 deletions services/gtfs-rt-archiver-v3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,11 @@ Code changes require building and pushing a new Docker image, as well as applyin

1. Make code changes and increment version in `pyproject.toml`
1. Ex. `poetry version 2023.4.10`
2. `docker build ... & docker push ...` (*from within the archiver directory*) or wait for [build-gtfs-rt-archiver-v3-image](../../.github/workflows/build-gtfs-rt-archiver-v3-image.yml) GitHub Action to run after merge to main
1. Ex. `docker build -t ghcr.io/cal-itp/data-infra/gtfs-rt-archiver-v3:2023.4.10 . && docker push ghcr.io/cal-itp/data-infra/gtfs-rt-archiver-v3:2023.4.10`
2. To push from your local machine, you must have [authenticated to ghcr.io](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry)
3. Change image tag version in the environments `kustomization.yaml`.
1. Ex. change the value of `newTag` to '`2023.4.10'`
4. Finally, apply changes in production by opening and merging a second PR that includes the `kustomization.yaml` changes.
2. Open a pull request and verify that the test container image build succeeds
3. Merge the pull request and obtain the new image tag from the GitHub Actions build output or from <https://github.com/cal-itp/data-infra/pkgs/container/data-infra%2Fgtfs-rt-archiver-v3>
4. Change image tag version in the environments `kustomization.yaml`.
1. Ex. change the value of `newTag` to '`2023.4.10-a66f90'`
5. Finally, apply changes in production by opening and merging a second PR that includes the `kustomization.yaml` changes.

### Changing download configurations

Expand Down
Loading

0 comments on commit 32dc996

Please sign in to comment.