-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release v1.5.0
- Loading branch information
Showing
44 changed files
with
1,017 additions
and
103 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
########################### | ||
## Required Jobs Success ## | ||
########################### | ||
|
||
### Features | ||
# single Status to simplify populating and maintaining Github Required Checks | ||
|
||
# To simplify adding "Job Statuses" to Github Required Checks, provide just this | ||
# Job to Github Required Checks and declare your "Job Statuses" as job.needs of | ||
# a caller of this. | ||
|
||
# To require ALL "Job Statuses" GREEN, from caller's job.needs, supply | ||
# only the 'needs_json' input, with '${{ toJSON(needs) }}' as value | ||
|
||
# To have the "logic" of the 'Status Signal' be configurable at runtime for | ||
# each of your CI/CD Pipeline runs, add the maximal set of available/implemented | ||
# QA CI Jobs (ie unit-test, lint, e2e-test, integration-tests, audit, etc) in | ||
# this caller's job.needs section and then control "severity" using the | ||
# 'allowed-failures' and 'allowed-skips' Workflow inputs. | ||
|
||
# If you have separate CI and CD Workflows, then add this to the CI Workflow. | ||
|
||
# Useful when populating and maintaining Github Required Checks, which involve many | ||
# "Job Statuses", as for example if you do Git Ops involving Github Auto Merge | ||
|
||
# Useful to dynamically control the Acceptance Criteria of PR Auto Merge | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
needs_json: | ||
type: string | ||
description: "Always supply \\$\\{\\{ toJSON(needs) \\}\\} as value. It's a JSON array of caller job.needs." | ||
required: true | ||
## OPTIONAL INPUTS | ||
allowed-failures: | ||
description: 'Job names that are allowed to fail and not affect the outcome, as a comma-separated list or serialized as a JSON string (ie with toJSON)' | ||
default: >- | ||
[] | ||
type: string | ||
required: false | ||
allowed-skips: | ||
description: >- | ||
Job names that are allowed to be skipped and not affect the outcome, | ||
as a comma-separated list or serialized as a JSON string | ||
default: >- | ||
[] | ||
type: string | ||
required: false | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Emit Acceptance Signal as Job Status | ||
# uses: re-actors/alls-green@cf9edfcf932a0ed6b431433fa183829c68b30e3f | ||
uses: boromir674/ga-acceptance@dev | ||
with: | ||
# only jobs, means ALL Jobs Green | ||
allowed-failures: ${{ inputs.allowed-failures }} | ||
allowed-skips: ${{ inputs.allowed-skips }} | ||
jobs: ${{ inputs.needs_json }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
### BASE ENVS ### | ||
# Base Env 1: For copying (ie from host) | ||
FROM scratch AS strach_env | ||
WORKDIR /workspace | ||
|
||
# Base Env 2: For providing app runtime | ||
FROM python:3.12.4-slim-bullseye AS python_env | ||
|
||
### BUILDER ENVS ### | ||
# Builder 1: Tooling for Docs development | ||
FROM python_env AS install_tox | ||
RUN pip install --user tox==3.27.1 | ||
|
||
# Builder 2: Pinned dependency versions, satisfying constraints, in /workspace | ||
FROM strach_env AS dependencies | ||
COPY pyproject.toml . | ||
COPY poetry.lock . | ||
|
||
|
||
FROM python_env AS install_docs | ||
# Normally, we do a `poetry install` here, but we're using `tox` to manage the environment | ||
# Instead copy the tox distribution from the install_tox image | ||
COPY --from=install_tox /root/.local /root/.local | ||
WORKDIR /workspace | ||
COPY --from=dependencies /workspace . | ||
COPY tox.ini . | ||
RUN /root/.local/bin/tox -e pin-deps -- -E docs | ||
RUN /root/.local/bin/tox -e docs-live --notest | ||
|
||
|
||
### RUNTIME ENVS ### | ||
FROM python_env AS docs | ||
COPY --from=install_docs /workspace . | ||
COPY --from=install_tox /root/.local /root/.local | ||
|
||
FROM docs AS docs_gen | ||
# requires run with volumes | ||
# apt get install some py yaml | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
python3-yaml && \ | ||
apt-get clean all | ||
|
||
# RUN /.tox/docs-live/bin/python -m pip install pyyaml | ||
RUN pip install pyyaml | ||
|
||
FROM docs AS docs_live | ||
# requires run with volumes: | ||
# - ./docs/:/workspace/docs/ | ||
# - ./mkdocs.yml:/workspace/mkdocs.yml | ||
CMD [ "/root/.local/bin/tox", "-e", "docs-live", "--", "-w", "docs", "-w", "mkdocs.yml", "-a", "0.0.0.0:8020"] | ||
|
||
|
||
# Runtime Env 1: Docs |
Oops, something went wrong.