-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: update build workflows to use image caching, multi-arch, auto-tag (…
…#925) * refactor: move scripts & josm to contrib dir * ci: add contrib label to labeler.yml * ci: separate frontend and backend tests during pr * ci: remove extract-vars (use auto-tagging) * build: update dockerfiles and compose to use COMMIT_REFs * ci: build backend images on tag and release events * ci: publish docs on changes to development branch * build: set default S3_ENDPOINT for entrypoint (if not set) * build: add healthchecks to dockerfiles * ci: enable backend smoketest using compose --wait * build: update odkcentral --> v2023.4.0 * build: healthcheck for minio service * ci(pytest): update pytest workflow to use img artifacts * build: update odkcentral img, add entrypoint + healthcheck * ci: fix pytest img tar downloading * ci(pytest): fix cached image loading from /tmp * ci(pytest): simplify image caching and loading * ci(pytest): remove image cache upload * ci(pytest): add image cache job to end of workflow * ci(pytest): set cache loading based on needs outputs * ci(pytest): cache images if download was unsuccessful * ci(pytest): fix operator != * build: use env vars for all image versions * build: ODK_CENTRAL_VERSION --> ODK_CENTRAL_TAG * ci(pytest): set image tags for caching from github vars * ci: replace deploy workflow with reusable * ci(pytest): image caching cache_name --> artifact_name * ci(deploy): set .env from var and secrets context (not manual) * ci(pytest): increase timeout for central wait-for-it 30s * ci(pytest): fix timeout syntax * build: add shebang to odkcentral entrypoint script * ci: update env to .env for pytest * ci(pytest): remove additional -alpine from postgis img * build: redact password in odk-central entrypoint * ci: fix to_envs single .env file parsing * ci: pass env var directly to jq, not github var * ci(pytest): fix by using scalar over literal syntax * build: hardcode WORKER_COUNT=1 for odk-central start * ci: update docs workflow to use new cahcing * docs: update info for testing workflows via act * ci(pytest): add caching img steps directly to workflow (no reuse) * ci(pytest): typo image --> images for cache key * refactor: pydantic deprecation FIeldValidationInfo --> ValidationInfo * ci: rewrite pytest to build pr image prior to test * ci: don't push,cache,multi_arch PR image builds * ci: add permissions: write to pytest build + scan=false * ci: remove permissions from pytest (handle downstream) * ci: update conditionals for building pr images * ci: update pytest cache-hit output * ci: get image_tag instead of image_name from output * ci(pytest): fix case where cache hit, skip build * ci(pytest): set BACKEND_IMG_TAG in all if cases * ci(pytest): replace BACKEND_IMG_TAG --> API_TAG_OVERRIDE * ci(pytest): fix getting backend image tag from docker img ls * ci(pytest): only run image caching steps if explicity cache=false * ci(pytest): revert ==false to !=true negation * ci: replace all refs to repo with gh vars * ci(pytest): prep pytest for moving to gh-workflows * ci(pytest): test with caching off * ci(pytest): remove redundant var build_test_img * ci(pytest): fix "" workflow syntax --> '' * ci(pytest): quote ci-development fallback * ci(pytest): move where default ci-development tag is set * ci(pytest): reenable caching for workflow images * ci(pytest): inputs.cache_imgs to array * ci(pytest): allow passing of image_tag to image build stage * ci: replace all reusable workflows with hotosm/gh-workflows * ci(pytest): use new format of reusable pytest workflow * build: rename API_TAG_OVERRIDE --> TAG_OVERRIDE
- Loading branch information
1 parent
a96ebaa
commit e45e05e
Showing
74 changed files
with
253 additions
and
422 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 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 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 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 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 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,31 @@ | ||
name: PR Test Backend | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- staging | ||
- development | ||
# Workflow is triggered only if src/backend changes | ||
paths: | ||
- src/backend/** | ||
# Allow manual trigger (workflow_dispatch) | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pytest: | ||
uses: hotosm/gh-workflows/.github/workflows/test_pytest_compose.yml@main | ||
with: | ||
image_name: ghcr.io/${{ github.repository }}/backend | ||
build_context: src/backend | ||
build_args: | | ||
APP_VERSION=${{ github.ref_name }} | ||
COMMIT_REF=${{ github.sha }} | ||
docker_compose_service: api | ||
cache_extra_imgs: | | ||
"docker.io/postgis/postgis:${{ vars.POSTGIS_TAG }}" | ||
"docker.io/minio/minio:${{ vars.MINIO_TAG }}" | ||
# For caching odk central images, add: | ||
# "ghcr.io/${{ github.repository }}/odkcentral:${{ vars.ODK_CENTRAL_TAG }}" | ||
# "ghcr.io/${{ github.repository }}/odkcentral-proxy:${{ vars.ODK_CENTRAL_TAG }}" | ||
secrets: inherit |
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,19 @@ | ||
name: PR Tests Frontend | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- staging | ||
- development | ||
# Workflow is triggered only if src/frontend changes | ||
paths: | ||
- src/frontend/** | ||
# Allow manual trigger (workflow_dispatch) | ||
workflow_dispatch: | ||
|
||
jobs: | ||
frontend-tests: | ||
uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@main | ||
with: | ||
working_dir: src/frontend |
Oops, something went wrong.