Skip to content

Commit 623d3fc

Browse files
committed
Changes to commiting snippets
1 parent 4583f24 commit 623d3fc

File tree

7 files changed

+32
-3
lines changed

7 files changed

+32
-3
lines changed

.evergreen.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,6 +1870,15 @@ buildvariants:
18701870
tasks:
18711871
- name: kind_code_snippets_task_group
18721872

1873+
- name: public_kind_code_snippets
1874+
display_name: public_kind_code_snippets
1875+
allowed_requesters: ["patch", "github_pr"]
1876+
run_on:
1877+
- ubuntu2204-large
1878+
<<: *base_om8_dependency
1879+
tasks:
1880+
- name: kind_code_snippets_task_group
1881+
18731882
### Build variants for manual patch only
18741883

18751884
- name: publish_om60_images
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export K8S_CLUSTER_0_CONTEXT_NAME="${CLUSTER_NAME}"
2+
export PRIVATE_PREVIEW_IMAGE_PULLSECRET="${COMMUNITY_PRIVATE_PREVIEW_PULLSECRET_DOCKERCONFIGJSON}"

scripts/code_snippets/sample_commit_output.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -Eeou pipefail
44
source scripts/dev/set_env_context.sh
55

6-
if [ "${COMMIT_OUTPUT:-false}" = true ]; then
6+
if [[ "${CODE_SNIPPETS_COMMIT_OUTPUT:-"false"}" == "true" ]]; then
77
echo "Pushing output files"
88
branch="meko-snippets-update-$(date "+%Y%m%d%H%M%S")"
99
git checkout -b "${branch}"

scripts/dev/contexts/evg-private-context

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ export RUNNING_IN_EVG="true"
101101

102102
export DELETE_KIND_NETWORK="true"
103103

104+
# code_snippets_commit_output can be set in evergreen patch by --param code_snippets_commit_output=true
105+
# it's also set explicitly in public_*_snippets variants
106+
export CODE_SNIPPETS_COMMIT_OUTPUT=${code_snippets_commit_output:-"false"}
107+
104108
# MCO
105109
# shellcheck disable=SC2154
106110
export READINESS_PROBE_IMAGE="268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes-readinessprobe:${version_id}"

scripts/dev/contexts/prerelease_gke_code_snippets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ source "${script_dir}/root-context"
1111

1212
export MDB_GKE_PROJECT="scratch-kubernetes-team"
1313
export K8S_CLUSTER_SUFFIX="-${version_id}-${RANDOM}"
14-
export COMMIT_OUTPUT=true
14+
export CODE_SNIPPETS_COMMIT_OUTPUT=true
1515

1616
# we reset evg host to use a default ~/.kube/config for GKE instead of the one from evg host
1717
export EVG_HOST_NAME=""

scripts/dev/contexts/public_gke_code_snippets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ export EVG_HOST_NAME=""
1818
# ENV_VARIABLES.SH overrides
1919
export OPERATOR_ADDITIONAL_HELM_VALUES=""
2020
export OPERATOR_HELM_CHART=""
21-
export COMMIT_OUTPUT=true
21+
export CODE_SNIPPETS_COMMIT_OUTPUT=true
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
# this context file is for code snippets running on GKE clusters
4+
set -Eeou pipefail
5+
6+
# overrides of public env_variables.sh
7+
script_name=$(readlink -f "${BASH_SOURCE[0]}")
8+
script_dir=$(dirname "${script_name}")
9+
10+
source "${script_dir}/root-context"
11+
12+
export NAMESPACE=mongodb
13+
export CODE_SNIPPETS_FLAVOR=e2e_private
14+
export CODE_SNIPPETS_COMMIT_OUTPUT=true

0 commit comments

Comments
 (0)