Skip to content

Commit 365f97e

Browse files
committed
add release for agent support back to pipeline.py
1 parent 937e953 commit 365f97e

File tree

5 files changed

+15
-42
lines changed

5 files changed

+15
-42
lines changed

.evergreen-functions.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -526,28 +526,6 @@ functions:
526526
working_dir: src/github.com/mongodb/mongodb-kubernetes
527527
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name} ${all_agents}
528528

529-
release_pipeline:
530-
- *switch_context
531-
- command: shell.exec
532-
type: setup
533-
params:
534-
shell: bash
535-
script: |
536-
# Docker Hub workaround
537-
# docker buildx needs the moby/buildkit image when setting up a builder so we pull it from our mirror
538-
docker buildx create --driver=docker-container --driver-opt=image=268558157000.dkr.ecr.eu-west-1.amazonaws.com/docker-hub-mirrors/moby/buildkit:buildx-stable-1 --use
539-
docker buildx inspect --bootstrap
540-
- command: subprocess.exec
541-
retry_on_failure: true
542-
type: setup
543-
params:
544-
shell: bash
545-
<<: *e2e_include_expansions_in_env
546-
working_dir: src/github.com/mongodb/mongodb-kubernetes
547-
env:
548-
git_tag: ${triggered_by_git_tag}
549-
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py ${image_name} --build-scenario release ${git_tag|--version ${git_tag}}
550-
551529
# TODO: CLOUDP-335471 ; once all image builds are made with the new atomic pipeline, remove the following function
552530
legacy_pipeline:
553531
- *switch_context

.evergreen.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ tasks:
356356
- func: setup_building_host
357357
- func: quay_login
358358
- func: setup_docker_sbom
359-
- func: release_pipeline
359+
- func: legacy_pipeline
360360
vars:
361361
image_name: agent
362362

@@ -1787,17 +1787,17 @@ buildvariants:
17871787
tags: [ "release_agent" ]
17881788
run_on:
17891789
- release-ubuntu2204-large # This is required for CISA attestation https://jira.mongodb.org/browse/DEVPROD-17780
1790-
depends_on:
1791-
- variant: init_test_run
1792-
name: build_agent_images_ubi # this ensures the agent gets released to ECR as well
1793-
- variant: e2e_multi_cluster_kind
1794-
name: '*'
1795-
- variant: e2e_static_multi_cluster_2_clusters
1796-
name: '*'
1797-
- variant: e2e_mdb_kind_ubi_cloudqa
1798-
name: '*'
1799-
- variant: e2e_static_mdb_kind_ubi_cloudqa
1800-
name: '*'
1790+
# depends_on:
1791+
## - variant: init_test_run
1792+
## name: build_agent_images_ubi # this ensures the agent gets released to ECR as well
1793+
## - variant: e2e_multi_cluster_kind
1794+
## name: '*'
1795+
## - variant: e2e_static_multi_cluster_2_clusters
1796+
## name: '*'
1797+
## - variant: e2e_mdb_kind_ubi_cloudqa
1798+
## name: '*'
1799+
## - variant: e2e_static_mdb_kind_ubi_cloudqa
1800+
## name: '*'
18011801
tasks:
18021802
- name: release_agent
18031803

inventories/agent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ vars:
33
s3_bucket: s3://enterprise-operator-dockerfiles/dockerfiles/mongodb-agent
44

55
images:
6-
- name: mongodb-agent-ubi
6+
- name: mongodb-agent
77
vars:
88
context: .
99
template_context: docker/mongodb-agent

lib/sonar/template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def render(path: str, template_name: str, parameters: Dict[str, str]) -> str:
1313
"""
1414
env = jinja2.Environment(loader=jinja2.FileSystemLoader(path), undefined=jinja2.StrictUndefined)
1515

16-
template = "Dockerfile"
16+
template = "Dockerfile.old"
1717
if template_name is not None:
1818
template = "Dockerfile.{}".format(template_name)
1919

pipeline.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,6 @@ def build_multi_arch_agent_in_sonar(
12031203
"""
12041204

12051205
logger.info(f"building multi-arch base image for: {image_version}")
1206-
is_release = build_configuration.is_release_step_executed()
12071206
args = {
12081207
"version": image_version,
12091208
"tools_version": tools_version,
@@ -1233,7 +1232,7 @@ def build_multi_arch_agent_in_sonar(
12331232

12341233
build_image_generic(
12351234
config=build_configuration,
1236-
image_name="mongodb-agent-ubi",
1235+
image_name="mongodb-agent",
12371236
inventory_file="inventories/agent.yaml",
12381237
multi_arch_args_list=joined_args,
12391238
with_image_base=False,
@@ -1315,18 +1314,14 @@ def _build_agents(
13151314
tasks_queue: Queue,
13161315
):
13171316
agent_version = agent_tools_version[0]
1318-
agent_distro = "rhel9_x86_64"
13191317
tools_version = agent_tools_version[1]
1320-
tools_distro = get_tools_distro(tools_version)["amd"]
13211318

13221319
tasks_queue.put(
13231320
executor.submit(
13241321
build_multi_arch_agent_in_sonar,
13251322
build_configuration,
13261323
agent_version,
1327-
agent_distro,
13281324
tools_version,
1329-
tools_distro,
13301325
)
13311326
)
13321327

0 commit comments

Comments
 (0)