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

fix(ci): update gtfs-rt-archiver-v3 tagging and docs #3455

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}}
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