diff --git a/.tekton/managed-upgrade-operator-agentic-sdlc-check-pull-request.yaml b/.tekton/managed-upgrade-operator-agentic-sdlc-check-pull-request.yaml index 315a13c9..4abb546c 100644 --- a/.tekton/managed-upgrade-operator-agentic-sdlc-check-pull-request.yaml +++ b/.tekton/managed-upgrade-operator-agentic-sdlc-check-pull-request.yaml @@ -43,7 +43,7 @@ spec: - name: url value: https://github.com/openshift/boilerplate - name: revision - value: master + value: 663c1d851e3bcb533a7be50936a0d55c732b7321 - name: pathInRepo value: pipelines/agentic-sdlc-check/pipeline.yaml status: {} diff --git a/boilerplate/_data/last-boilerplate-commit b/boilerplate/_data/last-boilerplate-commit index 7789964c..3ae4abbc 100644 --- a/boilerplate/_data/last-boilerplate-commit +++ b/boilerplate/_data/last-boilerplate-commit @@ -1 +1 @@ -f77b555d5a5d76e465706b7a7c7a8d4df3806ea8 +663c1d851e3bcb533a7be50936a0d55c732b7321 diff --git a/boilerplate/openshift/golang-osd-e2e/gangway-bridge-template.yml b/boilerplate/openshift/golang-osd-e2e/gangway-bridge-template.yml index 41cd7232..ec701e6d 100644 --- a/boilerplate/openshift/golang-osd-e2e/gangway-bridge-template.yml +++ b/boilerplate/openshift/golang-osd-e2e/gangway-bridge-template.yml @@ -44,8 +44,8 @@ objects: GW="https://gangway-ci.apps.ci.l2s4.p1.openshiftapps.com/v1/executions" log() { echo "$(date +%H:%M:%S) $*" >&2; } - [[ "${TIMEOUT}" =~ ^[0-9]+$ ]] || { log "ERROR: TIMEOUT must be numeric"; exit 1; } - [[ "${POLL_INTERVAL}" =~ ^[0-9]+$ ]] || { log "ERROR: POLL_INTERVAL must be numeric"; exit 1; } + [[ "${TIMEOUT}" =~ ^[1-9][0-9]*$ ]] || { log "ERROR: TIMEOUT must be a positive integer"; exit 1; } + [[ "${POLL_INTERVAL}" =~ ^[1-9][0-9]*$ ]] || { log "ERROR: POLL_INTERVAL must be a positive integer"; exit 1; } BODY='{"job_execution_type":"1"}' if [[ -n "${JOB_ENVS:-}" ]]; then diff --git a/boilerplate/openshift/golang-osd-e2e/update b/boilerplate/openshift/golang-osd-e2e/update index 35ef416f..fbd86675 100755 --- a/boilerplate/openshift/golang-osd-e2e/update +++ b/boilerplate/openshift/golang-osd-e2e/update @@ -94,8 +94,7 @@ EOF tee "${E2E_SUITE_DIRECTORY}/README.md" </dev/null | head -1 | awk '{print $2}') COMPONENT_NAME=${COMPONENT_NAME:-${OPERATOR_NAME}} fi - ${SED?} "s/__OPERATOR_NAME__/${OPERATOR_NAME}/g; s/__DEFAULT_BRANCH__/${DEFAULT_BRANCH}/g; s/__TENANT_NAMESPACE__/${TENANT_NAMESPACE}/g; s/__SERVICE_ACCOUNT__/${SERVICE_ACCOUNT}/g; s/__APP_NAME__/${APP_NAME}/g; s/__COMPONENT_NAME__/${COMPONENT_NAME}/g" ${HERE}/agentic-sdlc-check-pull-request.yaml.tmpl > "${AGENTIC_CHECK}" + ${SED?} "s/__OPERATOR_NAME__/${OPERATOR_NAME}/g; s/__DEFAULT_BRANCH__/${DEFAULT_BRANCH}/g; s/__TENANT_NAMESPACE__/${TENANT_NAMESPACE}/g; s/__SERVICE_ACCOUNT__/${SERVICE_ACCOUNT}/g; s/__APP_NAME__/${APP_NAME}/g; s/__COMPONENT_NAME__/${COMPONENT_NAME}/g; s/__BOILERPLATE_REVISION__/${BOILERPLATE_COMMIT}/g" ${HERE}/agentic-sdlc-check-pull-request.yaml.tmpl > "${AGENTIC_CHECK}" fi # Check for pipeline files in .tekton directory and centralize them diff --git a/boilerplate/update b/boilerplate/update index c04389bd..c3f0cc40 100755 --- a/boilerplate/update +++ b/boilerplate/update @@ -165,6 +165,9 @@ if [[ -z "$LATEST_IMAGE_TAG" ]]; then export LATEST_IMAGE_TAG=$(cd $BP_CLONE; git describe --tags --abbrev=0 --match image-v*) fi +# The boilerplate commit hash. Export for convention `update` scripts. +export BOILERPLATE_COMMIT=$(cd ${BP_CLONE} && git rev-parse HEAD) + # Prepare the "nexus makefile include". NEXUS_MK="${CONVENTION_ROOT}/generated-includes.mk" cat <<'EOF'>"${NEXUS_MK}" diff --git a/build/Dockerfile b/build/Dockerfile index 9db5bdd1..07f3a14b 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -8,7 +8,7 @@ COPY . . RUN make go-build #### -FROM registry.access.redhat.com/ubi9/ubi-minimal:9.8-1784596070 +FROM registry.access.redhat.com/ubi9/ubi-minimal:9.8-1784705586 ENV USER_UID=1001 \ USER_NAME=managed-upgrade-operator diff --git a/build/Dockerfile.olm-registry b/build/Dockerfile.olm-registry index 0da4d97a..3de29c68 100644 --- a/build/Dockerfile.olm-registry +++ b/build/Dockerfile.olm-registry @@ -4,7 +4,7 @@ COPY ${SAAS_OPERATOR_DIR} manifests RUN initializer --permissive # ubi-micro does not work for clusters with fips enabled unless we make OpenSSL available -FROM registry.access.redhat.com/ubi9/ubi-minimal:9.8-1784596070 +FROM registry.access.redhat.com/ubi9/ubi-minimal:9.8-1784705586 COPY --from=builder /bin/registry-server /bin/registry-server COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe diff --git a/test/e2e/README.md b/test/e2e/README.md index ddf9b59e..16231b89 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -1,6 +1,5 @@ ## Locally running e2e test suite -When updating your operator it's beneficial to add e2e tests for new functionality AND ensure existing functionality is not breaking using e2e tests. -To do this, following steps are recommended +When updating your operator, add e2e tests for new functionality and ensure existing functionality continues to work. The following steps are recommended: 1. Run "make e2e-binary-build" to make sure e2e tests build 2. Deploy your new version of operator in a test cluster diff --git a/test/e2e/gangway-bridge-template.yml b/test/e2e/gangway-bridge-template.yml index 41cd7232..ec701e6d 100644 --- a/test/e2e/gangway-bridge-template.yml +++ b/test/e2e/gangway-bridge-template.yml @@ -44,8 +44,8 @@ objects: GW="https://gangway-ci.apps.ci.l2s4.p1.openshiftapps.com/v1/executions" log() { echo "$(date +%H:%M:%S) $*" >&2; } - [[ "${TIMEOUT}" =~ ^[0-9]+$ ]] || { log "ERROR: TIMEOUT must be numeric"; exit 1; } - [[ "${POLL_INTERVAL}" =~ ^[0-9]+$ ]] || { log "ERROR: POLL_INTERVAL must be numeric"; exit 1; } + [[ "${TIMEOUT}" =~ ^[1-9][0-9]*$ ]] || { log "ERROR: TIMEOUT must be a positive integer"; exit 1; } + [[ "${POLL_INTERVAL}" =~ ^[1-9][0-9]*$ ]] || { log "ERROR: POLL_INTERVAL must be a positive integer"; exit 1; } BODY='{"job_execution_type":"1"}' if [[ -n "${JOB_ENVS:-}" ]]; then