Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions helm_chart/values-openshift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions public/mongodb-kubernetes-openshift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
11 changes: 8 additions & 3 deletions release.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
],
Expand Down Expand Up @@ -65,7 +65,8 @@
"8.0.14",
"8.0.15",
"8.0.16",
"8.0.17"
"8.0.17",
"8.0.18"
],
"variants": [
"ubi"
Expand Down Expand Up @@ -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"
}
}
},
Expand Down
44 changes: 44 additions & 0 deletions scripts/evergreen/should_run_precommit_and_push.sh
Original file line number Diff line number Diff line change
@@ -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
Loading