Skip to content

Commit

Permalink
Merge pull request #308 from garethahealy/main
Browse files Browse the repository at this point in the history
added renovate env for schema tag and fixed renovate not bumping
  • Loading branch information
garethahealy authored Jul 23, 2024
2 parents e4f2b58 + f048246 commit 0529260
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/conftest-unittests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Conftest
uses: redhat-cop/github-actions/confbatstest@e4729075dcd3f34946b80df6b1bfb952b9fee166 # v4
uses: redhat-cop/github-actions/confbatstest@e4729075dcd3f34946b80df6b1bfb952b9fee166 # v4.2
with:
tests: _test/conftest-unittests.sh
policies: '[]' # An empty array is provided as the policies are already cloned via source.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Generate konstraint docs
uses: redhat-cop/github-actions/confbatstest@e4729075dcd3f34946b80df6b1bfb952b9fee166 # v4
uses: redhat-cop/github-actions/confbatstest@e4729075dcd3f34946b80df6b1bfb952b9fee166 # v4.2
with:
raw: konstraint doc -o POLICIES.md

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/gatekeeper-k8s-integrationtests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,18 @@ jobs:
echo "files=$(find policy/* -regex '.*test_data\/integration\/.*$' | xargs)" >> "$GITHUB_OUTPUT"
- name: Validate integration test data via kubeconform
env:
# renovate: datasource=github-releases depName=garethahealy/openshift-json-schema
OCP_SCHEMA_VERSION: "4.16.0"
uses: docker://ghcr.io/yannh/kubeconform:v0.6.6@sha256:e4c69e6966a4842196ad3babc6f4c869d4ee51dc306fcf012faf10b25bb63a9c
with:
args: -summary -schema-location "https://raw.githubusercontent.com/garethahealy/openshift-json-schema/main/4.13/schemas/{{ .ResourceKind }}{{ .KindSuffix }}.json" ${{ steps.data.outputs.files }}
args: -summary -kubernetes-version ${{ env.OCP_SCHEMA_VERSION }} -schema-location "https://raw.githubusercontent.com/garethahealy/openshift-json-schema/main/{{ .NormalizedKubernetesVersion }}/schemas/{{ .ResourceKind }}{{ .KindSuffix }}.json" ${{ steps.data.outputs.files }}

- name: Create k8s Kind Cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0

- name: Setup confbatstest
uses: redhat-cop/github-actions/confbatstest@e4729075dcd3f34946b80df6b1bfb952b9fee166 # v4
uses: redhat-cop/github-actions/confbatstest@e4729075dcd3f34946b80df6b1bfb952b9fee166 # v4.2
with:
raw: echo "Needed for next stage"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/opa-profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Opa eval --profile
uses: redhat-cop/github-actions/confbatstest@e4729075dcd3f34946b80df6b1bfb952b9fee166 # v4
uses: redhat-cop/github-actions/confbatstest@e4729075dcd3f34946b80df6b1bfb952b9fee166 # v4.2
with:
tests: _test/opa-profile.sh
policies: '[]' # An empty array is provided as the policies are already cloned via source.
Expand Down
5 changes: 4 additions & 1 deletion _test/opa-profile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ load bats-support-clone
load test_helper/bats-support/load
load test_helper/redhatcop-bats-library/load

# renovate: datasource=github-releases depName=garethahealy/openshift-json-schema
ocp_schema_version="4.16.0"

setup_file() {
rm -rf /tmp/rhcop
rm -f opa-profile.log
Expand All @@ -15,7 +18,7 @@ setup_file() {
# Download openshift-json-schema dynamically so it doesnt need to be added into source
git clone https://github.com/garethahealy/openshift-json-schema.git /tmp/openshift-json-schema --depth 1

mv /tmp/openshift-json-schema/4.13/schemas/* _test/schema-generation/openshift-json-schema
mv /tmp/openshift-json-schema/v${ocp_schema_version}/schemas/* _test/schema-generation/openshift-json-schema
fi
}

Expand Down

0 comments on commit 0529260

Please sign in to comment.