Skip to content

Commit

Permalink
Merge branch 'main' into enable-collector-sanity-check
Browse files Browse the repository at this point in the history
  • Loading branch information
shirmoran authored Nov 1, 2023
2 parents 3aedee7 + e0e8b8f commit 5eafbc8
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 81 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/preflight.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Preflight
'on':
schedule:
- cron: '0 0 * * *'
# pull_request:
# branches: [ main ]
workflow_dispatch:

jobs:
preflight-unstable:
runs-on: ubuntu-22.04
env:
SHELL: /bin/bash
IMAGE_NAME: quay.io/testnetworkfunction/cnf-certification-test:unstable

steps:
- uses: actions/checkout@v4

- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.21.3

- name: Disable default go problem matcher
run: echo "::remove-matcher owner=go::"

- name: Clone the preflight repository
uses: actions/checkout@v4
with:
repository: redhat-openshift-ecosystem/openshift-preflight
path: openshift-preflight

- name: Run preflight
working-directory: openshift-preflight
run: |
make build
./preflight check container ${{ env.IMAGE_NAME }} --artifacts ${GITHUB_WORKSPACE}/openshift-preflight/artifacts
ALLOWED_FAILURES=("HasLicense" "RunAsNonRoot")
FAILURES=$(cat ${GITHUB_WORKSPACE}/openshift-preflight/artifacts/amd64/results.json | jq -r '.results.failed[].name')
for FAILURE in $FAILURES; do
FAILURE=$(echo $FAILURE | tr -d '"')
if [[ ! "${ALLOWED_FAILURES[@]}" =~ "${FAILURE}" ]]; then
echo >&2 "ERROR: $FAILURE is not an allowed failure"
exit 1
fi
done
66 changes: 66 additions & 0 deletions .github/workflows/qe-ocp-intrusive.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: QE OCP Intrusive Testing

on:
# pull_request:
# branches: [ main ]
workflow_dispatch:
# Schedule a daily cron at midnight UTC
schedule:
- cron: '0 0 * * *'
env:
QE_REPO: test-network-function/cnfcert-tests-verification

jobs:
qe-ocp-intrusive-testing:
runs-on: qe-ocp
strategy:
fail-fast: false
matrix:
# Add more suites if more intrusive tests are added to the QE repo
suite: [lifecycle]
env:
SHELL: /bin/bash
KUBECONFIG: '/home/labuser/.kube/config'
PFLT_DOCKERCONFIG: '/home/labuser/.docker/config'
TEST_TNF_IMAGE_NAME: quay.io/testnetworkfunction/cnf-certification-test
TEST_TNF_IMAGE_TAG: localtest
DOCKER_CONFIG_DIR: '/home/labuser/.docker'

steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}

- name: Run initial setup
uses: ./.github/actions/setup

- name: Preemptively prune docker resources
run: docker system prune -f --volumes

- name: Build the test image
run: make build-image-local # quay.io/testnetworkfunction/cnf-certification-test:localtest

- name: Show pods
run: oc get pods -A

- name: Clone the QE repository
uses: actions/checkout@v4
with:
repository: ${{ env.QE_REPO }}
path: cnfcert-tests-verification

- name: Preemptively potential QE namespaces
run: ./scripts/delete-namespaces.sh
working-directory: cnfcert-tests-verification

- name: Preemptively delete report and config folders
shell: bash
run: |
sudo rm -rf /tmp/tnf_config/
sudo rm -rf /tmp/tnf_report/
# Setup is complete. Time to run the QE tests.
- name: Run the tests
run: FEATURES=${{matrix.suite}} TNF_REPO_PATH=${GITHUB_WORKSPACE} TNF_IMAGE=${{env.TEST_TNF_IMAGE_NAME}} TNF_IMAGE_TAG=${{env.TEST_TNF_IMAGE_TAG}} DISABLE_INTRUSIVE_TESTS=false ENABLE_PARALLEL=false ENABLE_FLAKY_RETRY=true make test-features
working-directory: cnfcert-tests-verification
3 changes: 3 additions & 0 deletions .github/workflows/qe-ocp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
- name: Run initial setup
uses: ./.github/actions/setup

- name: Preemptively prune docker resources
run: docker system prune -f --volumes

- name: Build the test image
run: make build-image-local # quay.io/testnetworkfunction/cnf-certification-test:localtest

Expand Down
2 changes: 1 addition & 1 deletion _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
iif = "iif"

[files]
extend-exclude = ["go.mod", "results.html", "cmd/tnf/claim/compare/testdata", "docs/assets/images/*.svg"]
extend-exclude = ["depends-on.json", "go.mod", "results.html", "cmd/tnf/claim/compare/testdata", "docs/assets/images/*.svg"]
30 changes: 14 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ require (
github.com/gorilla/mux v1.8.0 // indirect
github.com/gosuri/uitable v0.0.4 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
Expand Down Expand Up @@ -153,21 +153,20 @@ require (
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.41.1 // indirect
go.opentelemetry.io/otel v1.15.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.15.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.15.1 // indirect
go.opentelemetry.io/otel/metric v0.38.1 // indirect
go.opentelemetry.io/otel/sdk v1.15.1 // indirect
go.opentelemetry.io/otel/trace v1.15.1 // indirect
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 // indirect
go.opentelemetry.io/otel v1.19.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/sdk v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
go.uber.org/atomic v1.11.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
Expand All @@ -177,11 +176,10 @@ require (
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
google.golang.org/grpc v1.56.3 // indirect
google.golang.org/protobuf v1.30.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/grpc v1.58.3 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
k8s.io/apiserver v0.28.3 // indirect
Expand Down
Loading

0 comments on commit 5eafbc8

Please sign in to comment.