Automate policy source freshness and inventory
Some checks failed
Build and publish policy-nexus image / build-and-push (push) Failing after 2s
Some checks failed
Build and publish policy-nexus image / build-and-push (push) Failing after 2s
This commit is contained in:
parent
78d096bdd5
commit
03a4fab9e0
17 changed files with 1647 additions and 42 deletions
|
|
@ -1,10 +1,14 @@
|
|||
ARG SOURCE_SET_DIGEST=unknown
|
||||
|
||||
FROM docker.io/nginxinc/nginx-unprivileged@sha256:65e3e85dbaed8ba248841d9d58a899b6197106c23cb0ff1a132b7bfe0547e4c0 AS runtime-base
|
||||
|
||||
ARG VCS_REVISION=unknown
|
||||
ARG SOURCE_SET_DIGEST
|
||||
LABEL org.opencontainers.image.title="policy-nexus" \
|
||||
org.opencontainers.image.description="Canonical Coulomb policy publication surface" \
|
||||
org.opencontainers.image.source="https://forgejo.coulomb.social/coulomb/policy-nexus" \
|
||||
org.opencontainers.image.revision="$VCS_REVISION"
|
||||
org.opencontainers.image.revision="$VCS_REVISION" \
|
||||
org.coulomb.policy.source-set-digest="$SOURCE_SET_DIGEST"
|
||||
|
||||
COPY --chown=101:101 deploy/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
|
|
@ -16,13 +20,19 @@ COPY --chown=101:101 build/ /usr/share/nginx/html/
|
|||
|
||||
FROM docker.io/library/python@sha256:d09d15e60962ca365d1cd544a48773bac9d33f2fb1b00f2aa0deec78ade7dc31 AS release-builder
|
||||
ARG NETKINGDOM_REVISION
|
||||
ARG SOURCE_SET_DIGEST
|
||||
ENV POLICY_NEXUS_SOURCE_REVISION_NET_KINGDOM=$NETKINGDOM_REVISION
|
||||
ENV POLICY_NEXUS_SOURCE_ROOT=/workspace/_sources
|
||||
WORKDIR /workspace/policy-nexus
|
||||
COPY . /workspace/policy-nexus
|
||||
COPY _sources/net-kingdom /workspace/net-kingdom
|
||||
RUN rm -rf build \
|
||||
&& python3 -m unittest discover -s tests -p 'test_*.py' \
|
||||
COPY _sources /workspace/_sources
|
||||
RUN python3 -m unittest discover -s tests -p 'test_*.py' \
|
||||
&& python3 tools/build_site.py publication.json --output build \
|
||||
&& python3 tools/source_inventory.py check \
|
||||
--source-root /workspace/_sources \
|
||||
--lock /workspace/_sources/source-lock.json \
|
||||
--report build/source-inventory.json \
|
||||
&& test "$(python3 -c 'import json; print(json.load(open("/workspace/_sources/source-lock.json"))["source_set_digest"])')" = "$SOURCE_SET_DIGEST" \
|
||||
&& python3 tools/verify_release.py build \
|
||||
&& python3 tools/check_currency.py publication.json
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue