-
Notifications
You must be signed in to change notification settings - Fork 14
CLOUDP-295785 - staging support for image building #336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
6649987
675bee4
833e25f
15e7f51
120c1af
c9ceabf
fb87f4d
c05e180
747c4ba
03fd9b8
1fbb8d5
e9a524f
fa6b899
426e522
6890858
aab9592
33173bb
74e867c
b13b054
832ce61
bc23827
03062c3
4d4e4e9
7c9967a
a7c63c9
742e784
1f0a21b
813d539
c06061b
5f9d49a
f390dc9
a47341d
972b23c
4ae4034
291f043
88c76bc
0fd4db8
ee86ebf
5f5940f
6dd208f
493d4d6
a21b254
a7db180
52b8662
e465582
8a4e4b7
5bfacf6
9733b45
5ab9c08
e6d67ca
7a34092
a71ccf6
3be7731
1aae28b
e00b0e3
f894e5b
b140220
7b5a064
8df2ce4
b6b05aa
c5ad3c5
031dd5b
8183ec5
e7ab93b
2ec7587
1badff0
9e2815a
e17b323
075fcae
afc9b79
3ef9e2c
d2a6153
c6fc163
347b44b
e2a4126
715c4ad
e117f79
2125cb7
d047de5
2ea1e3d
46367e9
e18d87f
7e2497f
c8b66fe
fa9c7ee
e56591c
597edf2
857f705
59e4420
2eebf0f
82b387c
bec8626
e4d2def
5302f40
9d9701e
a31ee49
1e21add
7a99de5
8fa0e98
c4f4999
6d7cbfb
b1fabb4
91f7054
5b9a006
907e1c4
2a0438c
ee7d8ad
c8945e9
51a554d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,13 @@ | |
"sign": true, | ||
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes", | ||
"platforms": [ | ||
"linux/arm64", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. q: Why no arm64 images on staging? Doesn't this conflict with multi-arch tests? cc @nammn There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know if "linux/arm64" will work for staging. I will leave this to @nammn to add when he will provide his PR with multi-arch support. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why shouldn't it work? atomic_pipeline just reads platform and passes it as it is to docker whale? |
||
"linux/amd64" | ||
] | ||
}, | ||
"release": { | ||
"sign": true, | ||
"repository": "quay.io/mongodb/mongodb-kubernetes", | ||
"platforms": [ | ||
"linux/arm64", | ||
"linux/amd64" | ||
] | ||
} | ||
|
@@ -35,17 +33,16 @@ | |
}, | ||
"staging": { | ||
"sign": true, | ||
"latest-tag": true, | ||
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-init-database", | ||
"platforms": [ | ||
"linux/arm64", | ||
"linux/amd64" | ||
] | ||
}, | ||
"release": { | ||
"sign": true, | ||
"repository": "quay.io/mongodb/mongodb-kubernetes-init-database", | ||
"platforms": [ | ||
"linux/arm64", | ||
"linux/amd64" | ||
] | ||
} | ||
|
@@ -60,17 +57,16 @@ | |
}, | ||
"staging": { | ||
"sign": true, | ||
"latest-tag": true, | ||
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-init-appdb", | ||
"platforms": [ | ||
"linux/arm64", | ||
"linux/amd64" | ||
] | ||
}, | ||
"release": { | ||
"sign": true, | ||
"repository": "quay.io/mongodb/mongodb-kubernetes-init-appdb", | ||
"platforms": [ | ||
"linux/arm64", | ||
"linux/amd64" | ||
] | ||
} | ||
|
@@ -85,17 +81,16 @@ | |
}, | ||
"staging": { | ||
"sign": true, | ||
"latest-tag": true, | ||
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-init-ops-manager", | ||
"platforms": [ | ||
"linux/arm64", | ||
"linux/amd64" | ||
] | ||
}, | ||
"release": { | ||
"sign": true, | ||
"repository": "quay.io/mongodb/mongodb-kubernetes-init-ops-manager", | ||
"platforms": [ | ||
"linux/arm64", | ||
"linux/amd64" | ||
] | ||
} | ||
|
@@ -110,17 +105,16 @@ | |
}, | ||
"staging": { | ||
"sign": true, | ||
"latest-tag": true, | ||
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-database", | ||
"platforms": [ | ||
"linux/arm64", | ||
"linux/amd64" | ||
] | ||
}, | ||
"release": { | ||
"sign": true, | ||
"repository": "quay.io/mongodb/mongodb-kubernetes-database", | ||
"platforms": [ | ||
"linux/arm64", | ||
"linux/amd64" | ||
] | ||
} | ||
|
@@ -165,9 +159,9 @@ | |
}, | ||
"staging": { | ||
"sign": true, | ||
"latest-tag": true, | ||
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-readinessprobe", | ||
"platforms": [ | ||
"linux/arm64", | ||
"linux/amd64" | ||
] | ||
}, | ||
|
@@ -176,7 +170,6 @@ | |
"sign": true, | ||
"repository": "quay.io/mongodb/mongodb-kubernetes-readinessprobe", | ||
"platforms": [ | ||
"linux/arm64", | ||
"linux/amd64" | ||
] | ||
} | ||
|
@@ -191,9 +184,9 @@ | |
}, | ||
"staging": { | ||
"sign": true, | ||
"latest-tag": true, | ||
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-operator-version-upgrade-post-start-hook", | ||
"platforms": [ | ||
"linux/arm64", | ||
"linux/amd64" | ||
] | ||
}, | ||
|
@@ -202,7 +195,6 @@ | |
"sign": true, | ||
"repository": "quay.io/mongodb/mongodb-kubernetes-operator-version-upgrade-post-start-hook", | ||
"platforms": [ | ||
"linux/arm64", | ||
"linux/amd64" | ||
] | ||
} | ||
|
@@ -219,15 +211,13 @@ | |
"sign": true, | ||
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-agent-ubi", | ||
"platforms": [ | ||
"linux/arm64", | ||
"linux/amd64" | ||
] | ||
}, | ||
"release": { | ||
"sign": true, | ||
"repository": "quay.io/mongodb/mongodb-agent-ubi", | ||
"platforms": [ | ||
"linux/arm64", | ||
"linux/amd64" | ||
] | ||
} | ||
|
@@ -236,23 +226,23 @@ | |
"dockerfile-path": "docker/mongodb-enterprise-ops-manager/Dockerfile.atomic", | ||
"patch": { | ||
"version": "om-version-from-release.json", | ||
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-enterprise-ops-manager", | ||
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-enterprise-ops-manager-ubi", | ||
"platforms": [ | ||
"linux/amd64" | ||
] | ||
}, | ||
"staging": { | ||
"version": "om-version-from-release.json", | ||
"sign": true, | ||
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-enterprise-ops-manager", | ||
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-enterprise-ops-manager-ubi", | ||
"platforms": [ | ||
"linux/amd64" | ||
] | ||
}, | ||
"release": { | ||
"version": "om-version-from-release.json", | ||
"sign": true, | ||
"repository": "quay.io/mongodb/mongodb-enterprise-ops-manager", | ||
"repository": "quay.io/mongodb/mongodb-enterprise-ops-manager-ubi", | ||
"platforms": [ | ||
"linux/amd64" | ||
] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,19 @@ else | |
fi | ||
export NAMESPACE | ||
|
||
export BASE_REPO_URL="268558157000.dkr.ecr.us-east-1.amazonaws.com/dev" | ||
DEV_REPO_URL="268558157000.dkr.ecr.us-east-1.amazonaws.com/dev" | ||
STAGING_REPO_URL="268558157000.dkr.ecr.us-east-1.amazonaws.com/staging" | ||
COMMIT_SHA_SHORT=$(git rev-parse --short=8 HEAD) | ||
|
||
if [ "${is_patch:-false}" = "true" ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should have a way to test this change without doing these hacks to verify it. Otherwise, we will run into the same problem like the last pipeline |
||
echo "is_patch is set, setting BASE_REPO_URL=${STAGING_REPO_URL}" | ||
export BASE_REPO_URL="${STAGING_REPO_URL}" | ||
Comment on lines
+41
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. change to DEV_REPO_URL before merging There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and remove override_version_id |
||
export OVERRIDE_VERSION_ID="${COMMIT_SHA_SHORT}" | ||
else | ||
echo "is_patch is not set, setting BASE_REPO_URL=${STAGING_REPO_URL}, OVERRIDE_VERSION_ID=${COMMIT_SHA_SHORT}" | ||
export BASE_REPO_URL="${STAGING_REPO_URL}" | ||
export OVERRIDE_VERSION_ID="${COMMIT_SHA_SHORT}" | ||
fi | ||
|
||
export REGISTRY="${BASE_REPO_URL}" | ||
export QUAY_REGISTRY=quay.io/mongodb | ||
|
@@ -107,8 +119,8 @@ export CODE_SNIPPETS_COMMIT_OUTPUT=${code_snippets_commit_output:-"false"} | |
|
||
# MCO | ||
# shellcheck disable=SC2154 | ||
export READINESS_PROBE_IMAGE="268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes-readinessprobe:${version_id}" | ||
export VERSION_UPGRADE_HOOK_IMAGE="268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes-operator-version-upgrade-post-start-hook:${version_id}" | ||
export READINESS_PROBE_IMAGE="${REGISTRY}/mongodb-kubernetes-readinessprobe:${version_id}" | ||
export VERSION_UPGRADE_HOOK_IMAGE="${REGISTRY}/mongodb-kubernetes-operator-version-upgrade-post-start-hook:${version_id}" | ||
|
||
# TODO to be removed at public preview stage of community-search | ||
export COMMUNITY_PRIVATE_PREVIEW_PULLSECRET_DOCKERCONFIGJSON="${community_private_preview_pullsecret_dockerconfigjson}" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,10 @@ export CUSTOM_OM_VERSION | |
export CUSTOM_MDB_VERSION=6.0.21 | ||
export CUSTOM_MDB_PREV_VERSION=5.0.7 | ||
|
||
export AGENT_VERSION=12.0.33.7866-1 | ||
export AGENT_VERSION=12.0.34.7888-1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this had to change, because the previously used agent version does not appear in |
||
export AGENT_IMAGE="${MDB_AGENT_IMAGE_REPOSITORY}:${AGENT_VERSION}" | ||
|
||
export CUSTOM_APPDB_VERSION=6.0.21-ent | ||
export TEST_MODE=opsmanager | ||
export OPS_MANAGER_REGISTRY=268558157000.dkr.ecr.us-east-1.amazonaws.com/dev | ||
export APPDB_REGISTRY=268558157000.dkr.ecr.us-east-1.amazonaws.com/dev | ||
export OPS_MANAGER_REGISTRY="${BASE_REPO_URL}" | ||
export APPDB_REGISTRY="${BASE_REPO_URL}" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,14 +49,12 @@ def build_image( | |
span.set_attribute("mck.platforms", build_configuration.platforms) | ||
|
||
# Build docker registry URI and call build_image | ||
image_full_uri = f"{build_configuration.registry}:{build_configuration.version}" | ||
|
||
logger.info( | ||
f"Building {image_full_uri} for platforms={build_configuration.platforms}, dockerfile args: {build_args}" | ||
) | ||
tags = [f"{build_configuration.registry}:{build_configuration.version}"] | ||
if build_configuration.latest_tag: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to handle tags as a list in the build configuration instead of treating There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for latests yes, but not for the |
||
tags.append(f"{build_configuration.registry}:{"latest"}") | ||
|
||
execute_docker_build( | ||
tag=image_full_uri, | ||
tags=tags, | ||
dockerfile=build_configuration.dockerfile_path, | ||
path=build_path, | ||
args=build_args, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q: It seems like this was already configured. What specifically in this PR enables staging support?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was configured but unused. Please check -> https://github.com/mongodb/mongodb-kubernetes/pull/336/files#r2273696424