diff --git a/.evergreen.yml b/.evergreen.yml index f39693d58..1795e0dc1 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -15,7 +15,7 @@ variables: - &ops_manager_70_latest 7.0.20 # The order/index is important, since these are anchors. Please do not change - - &ops_manager_80_latest 8.0.17 # The order/index is important, since these are anchors. Please do not change + - &ops_manager_80_latest 8.0.18 # The order/index is important, since these are anchors. Please do not change # The dependency unification between static and non-static is intentional here. # Even though some images are exclusive, in EVG they all are built once and in parallel. @@ -335,6 +335,16 @@ tasks: working_dir: src/github.com/mongodb/mongodb-kubernetes binary: scripts/evergreen/precommit_bump.sh + - name: run_conditionally_precommit_and_push + tags: [ "patch-run" ] + commands: + - func: clone + - func: run_task_conditionally + vars: + condition_script: scripts/evergreen/should_run_precommit_and_push.sh + variant: run_pre_commit + task: run_precommit_and_push + - name: rebuild_all_agents # this enables us to run this manually (patch) and rebuild all agent versions to verify # Dockerfile, script changes etc. @@ -1831,7 +1841,7 @@ buildvariants: run_on: - ubuntu2404-small tasks: - - name: run_precommit_and_push + - name: run_conditionally_precommit_and_push - name: init_tests_with_olm display_name: init_tests_with_olm diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 2ce5819c9..d415ec05a 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -154,6 +154,8 @@ spec: value: "quay.io/mongodb/mongodb-agent:108.0.15.8888-1" - name: RELATED_IMAGE_AGENT_IMAGE_108_0_16_8895_1 value: "quay.io/mongodb/mongodb-agent:108.0.16.8895-1" + - name: RELATED_IMAGE_AGENT_IMAGE_108_0_18_8921_1 + value: "quay.io/mongodb/mongodb-agent:108.0.18.8921-1" - name: RELATED_IMAGE_AGENT_IMAGE_108_0_2_8729_1 value: "quay.io/mongodb/mongodb-agent:108.0.2.8729-1" - name: RELATED_IMAGE_AGENT_IMAGE_108_0_3_8758_1 @@ -220,6 +222,8 @@ spec: value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:8.0.16" - name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_8_0_17 value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:8.0.17" + - name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_8_0_18 + value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:8.0.18" # since the official server images end with a different suffix we can re-use the same $mongodbImageEnv - name: RELATED_IMAGE_MONGODB_IMAGE_4_4_0_ubi8 value: "quay.io/mongodb/mongodb-enterprise-server:4.4.0-ubi8" diff --git a/helm_chart/values-openshift.yaml b/helm_chart/values-openshift.yaml index 3c1f413dc..afe949e88 100644 --- a/helm_chart/values-openshift.yaml +++ b/helm_chart/values-openshift.yaml @@ -56,6 +56,7 @@ relatedImages: - 8.0.15 - 8.0.16 - 8.0.17 + - 8.0.18 mongodb: - 4.4.0-ubi8 - 4.4.1-ubi8 @@ -120,6 +121,7 @@ relatedImages: - 108.0.13.8870-1 - 108.0.15.8888-1 - 108.0.16.8895-1 + - 108.0.18.8921-1 - 108.0.2.8729-1 - 108.0.3.8758-1 - 108.0.4.8770-1 diff --git a/public/mongodb-kubernetes-openshift.yaml b/public/mongodb-kubernetes-openshift.yaml index 076e1f504..dfb55f123 100644 --- a/public/mongodb-kubernetes-openshift.yaml +++ b/public/mongodb-kubernetes-openshift.yaml @@ -458,6 +458,8 @@ spec: value: "quay.io/mongodb/mongodb-agent:108.0.15.8888-1" - name: RELATED_IMAGE_AGENT_IMAGE_108_0_16_8895_1 value: "quay.io/mongodb/mongodb-agent:108.0.16.8895-1" + - name: RELATED_IMAGE_AGENT_IMAGE_108_0_18_8921_1 + value: "quay.io/mongodb/mongodb-agent:108.0.18.8921-1" - name: RELATED_IMAGE_AGENT_IMAGE_108_0_2_8729_1 value: "quay.io/mongodb/mongodb-agent:108.0.2.8729-1" - name: RELATED_IMAGE_AGENT_IMAGE_108_0_3_8758_1 @@ -524,6 +526,8 @@ spec: value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:8.0.16" - name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_8_0_17 value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:8.0.17" + - name: RELATED_IMAGE_OPS_MANAGER_IMAGE_REPOSITORY_8_0_18 + value: "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi:8.0.18" # since the official server images end with a different suffix we can re-use the same $mongodbImageEnv - name: RELATED_IMAGE_MONGODB_IMAGE_4_4_0_ubi8 value: "quay.io/mongodb/mongodb-enterprise-server:4.4.0-ubi8" diff --git a/release.json b/release.json index b87b5c6fb..5301adadb 100644 --- a/release.json +++ b/release.json @@ -31,8 +31,8 @@ }, { "8": { - "opsManagerVersion": "8.0.17", - "agentVersion": "108.0.16.8895-1" + "opsManagerVersion": "8.0.18", + "agentVersion": "108.0.18.8921-1" } } ], @@ -65,7 +65,8 @@ "8.0.14", "8.0.15", "8.0.16", - "8.0.17" + "8.0.17", + "8.0.18" ], "variants": [ "ubi" @@ -215,6 +216,10 @@ "8.0.17": { "agent_version": "108.0.16.8895-1", "tools_version": "100.13.0" + }, + "8.0.18": { + "agent_version": "108.0.18.8921-1", + "tools_version": "100.13.0" } } }, diff --git a/scripts/evergreen/should_run_precommit_and_push.sh b/scripts/evergreen/should_run_precommit_and_push.sh new file mode 100755 index 000000000..8fa217a30 --- /dev/null +++ b/scripts/evergreen/should_run_precommit_and_push.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +# This file is a condition script used for conditionally executing evergreen task for running precommit and pushing (run_precommit_and_push). +# It checks if the branch matches patterns that require auto-bump functionality. +# Exit code 0 means the task should run, exit code != 0 means it should be skipped. + +set -Eeou pipefail +source scripts/dev/set_env_context.sh + +ORIGINAL_BRANCH="" +# Detect the original branch (same commit, but not the evg-pr-test-* branch which evg creates) +ORIGINAL_BRANCH=$(git for-each-ref --format='%(refname:short) %(objectname)' refs/remotes/origin | grep "$(git rev-parse HEAD)" | grep -v "evg-pr-test-" | awk '{print $1}' | sed 's|^origin/||' | head -n 1 || true) + +if [[ -z "${ORIGINAL_BRANCH}" ]]; then + echo "Fork: Could not determine the original branch. Skipping precommit_and_push task." + exit 1 +fi +echo "Detected original branch: ${ORIGINAL_BRANCH}" + +REQUIRED_PATTERNS=( + "^dependabot/" + "_version_bump$" + "^enterprise-operator-release-" +) + +echo "Checking branch '${ORIGINAL_BRANCH}' against required patterns:" + +MATCH_FOUND=false +for pattern in "${REQUIRED_PATTERNS[@]}"; do + if [[ "${ORIGINAL_BRANCH}" =~ ${pattern} ]]; then + MATCH_FOUND=true + echo "Match found: '${ORIGINAL_BRANCH}' matches pattern '${pattern}'" + break + fi +done + +if [[ "${MATCH_FOUND}" == false ]]; then + echo "Branch '${ORIGINAL_BRANCH}' does not match any required patterns. Skipping precommit_and_push task." + printf " - %s\n" "${REQUIRED_PATTERNS[@]}" + exit 1 +fi + +echo "Branch matches required patterns. Precommit and push task should run." +exit 0