From fb9956b95c06bb4f7e730c928abecfbdd040ea66 Mon Sep 17 00:00:00 2001 From: aranega Date: Mon, 9 Nov 2026 05:21:17 -0600 Subject: [PATCH 01/11] Fix spaces in image name --- tools/deployment-cli-tools/ch_cli_tools/model.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/deployment-cli-tools/ch_cli_tools/model.py b/tools/deployment-cli-tools/ch_cli_tools/model.py index 32782afb..6d62cb9c 100644 --- a/tools/deployment-cli-tools/ch_cli_tools/model.py +++ b/tools/deployment-cli-tools/ch_cli_tools/model.py @@ -457,11 +457,7 @@ def app_entrypoint(self) -> Path | None: @property def image_name(self): - return f"{self.project.base_image_name()} / { - resolve_path( - self.harness_config, 'image_name', default=self.dockerfile.app.name - ) - }" + return f"{self.project.base_image_name()}/{resolve_path(self.harness_config, 'image_name', default=self.dockerfile.app.name)}" @property def is_buildable(self) -> bool: From 1bbf6dbff35432a10230d7e1b385988e139490de Mon Sep 17 00:00:00 2001 From: aranega Date: Mon, 9 Nov 2026 05:50:57 -0600 Subject: [PATCH 02/11] Remove codefresh step creation for every base image --- tools/deployment-cli-tools/ch_cli_tools/codefresh.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/deployment-cli-tools/ch_cli_tools/codefresh.py b/tools/deployment-cli-tools/ch_cli_tools/codefresh.py index 1f85151f..90c0e7d3 100644 --- a/tools/deployment-cli-tools/ch_cli_tools/codefresh.py +++ b/tools/deployment-cli-tools/ch_cli_tools/codefresh.py @@ -352,8 +352,9 @@ def _collect_task_build_steps(self, app): def _collect_base_image_build_steps(self, project): build_steps, publish_steps = {}, {} - for base_image in project.base_images.values(): - if not base_image.dockerfile.exists(): + needed = project.all_task_images() + for name, base_image in project.base_images.items(): + if name not in needed or not base_image.dockerfile.exists(): continue key, step = self._collect_build_step(base_image) build_steps[key] = step From 90bfbd55a4ca8c70701eb3b3d5567813890fe41a Mon Sep 17 00:00:00 2001 From: aranega Date: Mon, 9 Nov 2026 05:53:40 -0600 Subject: [PATCH 03/11] Add test for codefresh step generation --- .../tests/test_codefresh.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tools/deployment-cli-tools/tests/test_codefresh.py b/tools/deployment-cli-tools/tests/test_codefresh.py index d230a036..50dd460b 100644 --- a/tools/deployment-cli-tools/tests/test_codefresh.py +++ b/tools/deployment-cli-tools/tests/test_codefresh.py @@ -129,6 +129,27 @@ def test_create_codefresh_configuration_build_steps(tmp_path): assert "myapp-mytask" in steps +def test_create_codefresh_configuration_excludes_base_images_nothing_depends_on( + tmp_path, +): + # Legacy regression: legacy scoped base/common-image build-step generation + # to include=task_images.keys() (same set write_env_file exports pipeline + # tag variables for); ng's rewrite iterated project.base_images + # unconditionally instead, scheduling a build step for every base image in + # the whole chain regardless of whether anything included actually + # depends on it. write_env_file stays correctly scoped, so such a step's + # tag reference is never exported - it fails at build time with an + # unsubstituted "${{..._TAG}}" placeholder. + cf, _ = _generate_cf(tmp_path, ["myapp"]) + steps = _build_steps(cf) + + # myapp's real build dependency must still get a build step. + assert "cloudharness-flask" in steps + # cloudharness-frontend-build: a real base image nothing included here + # depends on - must not get a build step with no tag variable behind it. + assert "cloudharness-frontend-build" not in steps + + def test_create_codefresh_configuration_app_without_build_dependency_still_builds( tmp_path, ): From 5b23be9f9a9272d07a0f72fcd0252b18dcc5e8b4 Mon Sep 17 00:00:00 2001 From: aranega Date: Mon, 9 Nov 2026 08:36:57 -0600 Subject: [PATCH 04/11] Fix registry doubling name in codefresh --- tools/deployment-cli-tools/ch_cli_tools/codefresh.py | 2 +- tools/deployment-cli-tools/tests/test_codefresh.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/deployment-cli-tools/ch_cli_tools/codefresh.py b/tools/deployment-cli-tools/ch_cli_tools/codefresh.py index 90c0e7d3..a401051a 100644 --- a/tools/deployment-cli-tools/ch_cli_tools/codefresh.py +++ b/tools/deployment-cli-tools/ch_cli_tools/codefresh.py @@ -272,7 +272,7 @@ def _collect_build_step(self, entity): "stage": "build", "registry": "${{CODEFRESH_REGISTRY}}", "buildkit": True, - "image_name": self.qualify(entity.image_name), + "image_name": entity.image_name, "working_directory": self._working_directory_for(context), "dockerfile": str(context.dockerfile.path), "tag": _tag_reference(entity.name), diff --git a/tools/deployment-cli-tools/tests/test_codefresh.py b/tools/deployment-cli-tools/tests/test_codefresh.py index 50dd460b..55ba06f1 100644 --- a/tools/deployment-cli-tools/tests/test_codefresh.py +++ b/tools/deployment-cli-tools/tests/test_codefresh.py @@ -106,6 +106,12 @@ def test_create_codefresh_configuration_build_steps(tmp_path): assert myapp_step["buildkit"] is True assert myapp_step["build_arguments"][0] == "NOCACHE=${{CF_BUILD_ID}}" + # image_name must stay bare, no "${{REGISTRY}}/" prefix: the build step + # auto-pushes through the registry integration named by CODEFRESH_REGISTRY, + # which adds its own host. Qualifying image_name here doubles it + # (observed in production as a rejected "us.gcr.io/us.gcr.io/..." push). + assert not myapp_step["image_name"].startswith("${{REGISTRY}}") + # cloudharness-base: overridden by RESOURCES, so it must build from the merged # .overrides directory, not straight from CLOUDHARNESS_ROOT's own tree - same # cross-layer merge CHSkaffold already relies on for its own artifacts. @@ -680,7 +686,7 @@ def test_create_codefresh_configuration_api_and_e2e_test_steps(tmp_path): # every other image reference embedded in codefresh.yaml. assert ( cf["steps"]["tests_api"]["image"] == - build_steps["test-api"]["image_name"] + ":${{TEST_API_TAG}}" + "${{REGISTRY}}/%s:${{TEST_API_TAG}}" % build_steps["test-api"]["image_name"] ) e2e_steps = cf["steps"]["tests_e2e"]["scale"] @@ -692,7 +698,7 @@ def test_create_codefresh_configuration_api_and_e2e_test_steps(tmp_path): ) assert ( cf["steps"]["tests_e2e"]["image"] == - build_steps["test-e2e"]["image_name"] + ":${{TEST_E2E_TAG}}" + "${{REGISTRY}}/%s:${{TEST_E2E_TAG}}" % build_steps["test-e2e"]["image_name"] ) From 8290bd18a27a49d8bd8d76e48e5f33a1dd89ce21 Mon Sep 17 00:00:00 2001 From: aranega Date: Mon, 9 Nov 2026 08:40:57 -0600 Subject: [PATCH 05/11] Fix context path copy for workflows --- applications/workflows/server/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/workflows/server/Dockerfile b/applications/workflows/server/Dockerfile index b4c3ddd3..c3380b32 100644 --- a/applications/workflows/server/Dockerfile +++ b/applications/workflows/server/Dockerfile @@ -4,12 +4,12 @@ FROM $CLOUDHARNESS_FLASK ENV MODULE_NAME=workflows_api -COPY ./requirements.txt /usr/src/app/ +COPY server/requirements.txt /usr/src/app/ RUN --mount=type=cache,target=/root/.cache python -m pip install --upgrade pip &&\ pip3 install --no-cache-dir -r requirements.txt -COPY . /usr/src/app +COPY server/. /usr/src/app EXPOSE 8080 RUN pip3 install -e . From 37ad4f10b59299d521f77712c51adacf834b52c3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Nov 2026 15:54:29 +0000 Subject: [PATCH 06/11] Remove leftover conflict markers Co-authored-by: filippomc <46561561+filippomc@users.noreply.github.com> --- tools/deployment-cli-tools/ch_cli_tools/model.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/deployment-cli-tools/ch_cli_tools/model.py b/tools/deployment-cli-tools/ch_cli_tools/model.py index 314c31f3..0c538be1 100644 --- a/tools/deployment-cli-tools/ch_cli_tools/model.py +++ b/tools/deployment-cli-tools/ch_cli_tools/model.py @@ -457,14 +457,10 @@ def app_entrypoint(self) -> Path | None: @property def image_name(self): -<<<<<<< HEAD - return f"{self.project.base_image_name()}/{resolve_path(self.harness_config, 'image_name', default=self.dockerfile.app.name)}" -======= name = resolve_path( self.harness_config, "image_name", default=self.dockerfile.app.name ) return f"{self.project.base_image_name()}/{name}" ->>>>>>> origin/develop @property def is_buildable(self) -> bool: From 5acb3b455269208b52f43670f6b25e528ea51efb Mon Sep 17 00:00:00 2001 From: aranega Date: Tue, 10 Nov 2026 12:21:05 -0600 Subject: [PATCH 07/11] Fix workflow image building --- applications/workflows/server/Dockerfile | 4 ++-- tools/deployment-cli-tools/ch_cli_tools/model.py | 2 +- tools/deployment-cli-tools/tests/test_model.py | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/applications/workflows/server/Dockerfile b/applications/workflows/server/Dockerfile index c3380b32..b4c3ddd3 100644 --- a/applications/workflows/server/Dockerfile +++ b/applications/workflows/server/Dockerfile @@ -4,12 +4,12 @@ FROM $CLOUDHARNESS_FLASK ENV MODULE_NAME=workflows_api -COPY server/requirements.txt /usr/src/app/ +COPY ./requirements.txt /usr/src/app/ RUN --mount=type=cache,target=/root/.cache python -m pip install --upgrade pip &&\ pip3 install --no-cache-dir -r requirements.txt -COPY server/. /usr/src/app +COPY . /usr/src/app EXPOSE 8080 RUN pip3 install -e . diff --git a/tools/deployment-cli-tools/ch_cli_tools/model.py b/tools/deployment-cli-tools/ch_cli_tools/model.py index 0c538be1..a41b0e55 100644 --- a/tools/deployment-cli-tools/ch_cli_tools/model.py +++ b/tools/deployment-cli-tools/ch_cli_tools/model.py @@ -277,7 +277,7 @@ def dockerfile(self) -> "CHDockerfile": @property def build_context(self) -> Path: - return self.path + return self.dockerfile.path.parent def __getitem__(self, key) -> "CHAppTask": try: diff --git a/tools/deployment-cli-tools/tests/test_model.py b/tools/deployment-cli-tools/tests/test_model.py index 76526796..2db3a566 100644 --- a/tools/deployment-cli-tools/tests/test_model.py +++ b/tools/deployment-cli-tools/tests/test_model.py @@ -258,6 +258,10 @@ def test_app_dockerfile_found_under_a_conventional_subdirectory(tmp_path): assert app.dockerfile.exists() assert app.dockerfile.path == app_dir / "server" / "Dockerfile" + # The build context must be the Dockerfile's own directory, not the app + # root: COPY instructions in every such Dockerfile (workflows, common, + # notifications, volumemanager) are written relative to that subdirectory. + assert app.build_context == app_dir / "server" def test_app_dockerfile_prefers_top_level_over_a_conventional_subdirectory(tmp_path): From a6a24d9e9cd36e634a923222ab33ce67d7111025 Mon Sep 17 00:00:00 2001 From: aranega Date: Tue, 10 Nov 2026 12:25:24 -0600 Subject: [PATCH 08/11] Regenerate the codefresh-test for cloudharness test pipeline --- deployment/codefresh-test.yaml | 528 ++++++++++++++++++++------------- 1 file changed, 316 insertions(+), 212 deletions(-) diff --git a/deployment/codefresh-test.yaml b/deployment/codefresh-test.yaml index 2315355e..69fd835f 100644 --- a/deployment/codefresh-test.yaml +++ b/deployment/codefresh-test.yaml @@ -1,3 +1,4 @@ +# Generated with: harness-deployment . -d '${{DOMAIN}}' -n 'test-${{NAMESPACE_BASENAME}}' -r reg -t 1 -rsn '${{REGISTRY_SECRET}}' -e test --write-env --cache-url '${{IMAGE_CACHE_URL}}' version: '1.0' stages: - prepare @@ -13,13 +14,26 @@ steps: repo: ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}} revision: ${{CF_BRANCH}} git: github + post_main_clone: + title: Post main clone + type: parallel + stage: prepare + steps: + clone_cloud_harness: + title: Cloning cloud-harness repository... + type: git-clone + stage: prepare + repo: https://github.com/MetaCell/cloud-harness.git + revision: ${{CLOUDHARNESS_BRANCH}} + working_directory: . + git: github prepare_deployment: title: Prepare helm chart image: python:3.12 stage: prepare working_directory: . commands: - - bash install.sh + - bash cloud-harness/install.sh - export HELM_NAME_ARG="$( [ -n "${{CHART_NAME}}" ] && printf -- "--name %s" "${{CHART_NAME}}" )" - export HELM_CHART_VERSION_ARG="$( [ -n "${{CHART_VERSION}}" ] && printf -- "--chart-version @@ -29,9 +43,9 @@ steps: "$APP_VERSION_RESOLVED" ] && printf -- "--app-version %s" "$APP_VERSION_RESOLVED" )" - export HELM_META_ARGS="$HELM_NAME_ARG $HELM_CHART_VERSION_ARG $HELM_APP_VERSION_ARG" - - harness-deployment . -n test-${{NAMESPACE_BASENAME}} -d ${{DOMAIN}} -r ${{REGISTRY}} - -rsn ${{REGISTRY_SECRET}} -e test --write-env --cache-url '${{IMAGE_CACHE_URL}}' - -N $HELM_META_ARGS -i samples + - 'harness-deployment . -n test-${{NAMESPACE_BASENAME}} -d ${{DOMAIN}} -r ${{REGISTRY}} + -rsn ${{REGISTRY_SECRET}} -e test --write-env --cache-url ''${{IMAGE_CACHE_URL}}'' + -N $HELM_META_ARGS ' - cat deployment/.env >> ${{CF_VOLUME_PATH}}/env_vars_to_export - cat ${{CF_VOLUME_PATH}}/env_vars_to_export prepare_deployment_view: @@ -48,25 +62,24 @@ steps: stage: build steps: accounts: + title: Building accounts type: build stage: build - dockerfile: Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/accounts + working_directory: applications/accounts + dockerfile: Dockerfile + tag: ${{ACCOUNTS_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/accounts - title: Accounts - working_directory: ./applications/accounts - tags: - - ${{ACCOUNTS_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -75,25 +88,24 @@ steps: forceNoCache: includes('${{ACCOUNTS_TAG_FORCE_BUILD}}', '{{ACCOUNTS_TAG_FORCE_BUILD}}') == false cloudharness-base: + title: Building cloudharness-base type: build stage: build - dockerfile: infrastructure/base-images/cloudharness-base/Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/cloudharness-base + working_directory: . + dockerfile: infrastructure/base-images/cloudharness-base/Dockerfile + tag: ${{CLOUDHARNESS_BASE_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/cloudharness-base - title: Cloudharness base - working_directory: ./. - tags: - - ${{CLOUDHARNESS_BASE_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -102,25 +114,24 @@ steps: forceNoCache: includes('${{CLOUDHARNESS_BASE_TAG_FORCE_BUILD}}', '{{CLOUDHARNESS_BASE_TAG_FORCE_BUILD}}') == false cloudharness-frontend-build: + title: Building cloudharness-frontend-build type: build stage: build - dockerfile: infrastructure/base-images/cloudharness-frontend-build/Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/cloudharness-frontend-build + working_directory: . + dockerfile: infrastructure/base-images/cloudharness-frontend-build/Dockerfile + tag: ${{CLOUDHARNESS_FRONTEND_BUILD_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/cloudharness-frontend-build - title: Cloudharness frontend build - working_directory: ./. - tags: - - ${{CLOUDHARNESS_FRONTEND_BUILD_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -129,25 +140,24 @@ steps: forceNoCache: includes('${{CLOUDHARNESS_FRONTEND_BUILD_TAG_FORCE_BUILD}}', '{{CLOUDHARNESS_FRONTEND_BUILD_TAG_FORCE_BUILD}}') == false nfsserver: + title: Building nfsserver type: build stage: build - dockerfile: Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/nfsserver + working_directory: applications/nfsserver + dockerfile: Dockerfile + tag: ${{NFSSERVER_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/nfsserver - title: Nfsserver - working_directory: ./applications/nfsserver - tags: - - ${{NFSSERVER_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -156,26 +166,24 @@ steps: forceNoCache: includes('${{NFSSERVER_TAG_FORCE_BUILD}}', '{{NFSSERVER_TAG_FORCE_BUILD}}') == false test-e2e: + title: Building test-e2e type: build stage: build - dockerfile: Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/test-e2e + working_directory: test/test-e2e + dockerfile: Dockerfile + tag: ${{TEST_E2E_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/test-e2e - title: Test e2e - working_directory: ./test/test-e2e - tags: - - ${{TEST_E2E_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} - - latest + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -189,26 +197,25 @@ steps: stage: build steps: cloudharness-django: + title: Building cloudharness-django type: build stage: build - dockerfile: Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/cloudharness-django + working_directory: infrastructure/common-images/cloudharness-django + dockerfile: Dockerfile + tag: ${{CLOUDHARNESS_DJANGO_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} - CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/cloudharness-django - title: Cloudharness django - working_directory: ./infrastructure/common-images/cloudharness-django - tags: - - ${{CLOUDHARNESS_DJANGO_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -217,26 +224,25 @@ steps: forceNoCache: includes('${{CLOUDHARNESS_DJANGO_TAG_FORCE_BUILD}}', '{{CLOUDHARNESS_DJANGO_TAG_FORCE_BUILD}}') == false cloudharness-flask: + title: Building cloudharness-flask type: build stage: build - dockerfile: Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/cloudharness-flask + working_directory: infrastructure/common-images/cloudharness-flask + dockerfile: Dockerfile + tag: ${{CLOUDHARNESS_FLASK_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} - CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/cloudharness-flask - title: Cloudharness flask - working_directory: ./infrastructure/common-images/cloudharness-flask - tags: - - ${{CLOUDHARNESS_FLASK_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -245,26 +251,25 @@ steps: forceNoCache: includes('${{CLOUDHARNESS_FLASK_TAG_FORCE_BUILD}}', '{{CLOUDHARNESS_FLASK_TAG_FORCE_BUILD}}') == false jupyterhub: + title: Building jupyterhub type: build stage: build - dockerfile: Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/jupyterhub + working_directory: applications/jupyterhub + dockerfile: Dockerfile + tag: ${{JUPYTERHUB_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} - CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/jupyterhub - title: Jupyterhub - working_directory: ./applications/jupyterhub - tags: - - ${{JUPYTERHUB_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -272,27 +277,53 @@ steps: == true forceNoCache: includes('${{JUPYTERHUB_TAG_FORCE_BUILD}}', '{{JUPYTERHUB_TAG_FORCE_BUILD}}') == false - samples-print-file: + notifications: + title: Building notifications type: build stage: build - dockerfile: Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/notifications + working_directory: applications/notifications/server + dockerfile: Dockerfile + tag: ${{NOTIFICATIONS_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} - CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 + when: + condition: + any: + buildDoesNotExist: includes('${{NOTIFICATIONS_TAG_EXISTS}}', '{{NOTIFICATIONS_TAG_EXISTS}}') + == true + forceNoCache: includes('${{NOTIFICATIONS_TAG_FORCE_BUILD}}', '{{NOTIFICATIONS_TAG_FORCE_BUILD}}') + == false + samples-print-file: + title: Building samples-print-file + type: build + stage: build + registry: ${{CODEFRESH_REGISTRY}} + buildkit: true image_name: cloud-harness/sampleapp-print-file - title: Samples print file - working_directory: ./applications/samples/tasks/print-file - tags: - - ${{SAMPLES_PRINT_FILE_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + working_directory: applications/samples/tasks/print-file + dockerfile: Dockerfile + tag: ${{SAMPLES_PRINT_FILE_TAG}} + build_arguments: + - NOCACHE=${{CF_BUILD_ID}} + - CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 + - GOLANG=golang:1.26 + - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal + - SENTRY=sentry:9.1.2 + - PYTHON=python:3.12-slim-trixie + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -301,26 +332,25 @@ steps: forceNoCache: includes('${{SAMPLES_PRINT_FILE_TAG_FORCE_BUILD}}', '{{SAMPLES_PRINT_FILE_TAG_FORCE_BUILD}}') == false samples-secret: + title: Building samples-secret type: build stage: build - dockerfile: Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/sampleapp-secret + working_directory: applications/samples/tasks/secret + dockerfile: Dockerfile + tag: ${{SAMPLES_SECRET_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} - CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/sampleapp-secret - title: Samples secret - working_directory: ./applications/samples/tasks/secret - tags: - - ${{SAMPLES_SECRET_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -329,27 +359,25 @@ steps: forceNoCache: includes('${{SAMPLES_SECRET_TAG_FORCE_BUILD}}', '{{SAMPLES_SECRET_TAG_FORCE_BUILD}}') == false test-api: + title: Building test-api type: build stage: build - dockerfile: test/test-api/Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/test-api + working_directory: test/test-api + dockerfile: Dockerfile + tag: ${{TEST_API_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} - CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/test-api - title: Test api - working_directory: ./. - tags: - - ${{TEST_API_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} - - latest + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -358,26 +386,25 @@ steps: forceNoCache: includes('${{TEST_API_TAG_FORCE_BUILD}}', '{{TEST_API_TAG_FORCE_BUILD}}') == false workflows-extract-download: + title: Building workflows-extract-download type: build stage: build - dockerfile: Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/workflows-extract-download + working_directory: applications/workflows/tasks/extract-download + dockerfile: Dockerfile + tag: ${{WORKFLOWS_EXTRACT_DOWNLOAD_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} - CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/workflows-extract-download - title: Workflows extract download - working_directory: ./applications/workflows/tasks/extract-download - tags: - - ${{WORKFLOWS_EXTRACT_DOWNLOAD_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -386,26 +413,25 @@ steps: forceNoCache: includes('${{WORKFLOWS_EXTRACT_DOWNLOAD_TAG_FORCE_BUILD}}', '{{WORKFLOWS_EXTRACT_DOWNLOAD_TAG_FORCE_BUILD}}') == false workflows-notify-queue: + title: Building workflows-notify-queue type: build stage: build - dockerfile: Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/workflows-notify-queue + working_directory: applications/workflows/tasks/notify-queue + dockerfile: Dockerfile + tag: ${{WORKFLOWS_NOTIFY_QUEUE_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} - CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/workflows-notify-queue - title: Workflows notify queue - working_directory: ./applications/workflows/tasks/notify-queue - tags: - - ${{WORKFLOWS_NOTIFY_QUEUE_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -414,26 +440,25 @@ steps: forceNoCache: includes('${{WORKFLOWS_NOTIFY_QUEUE_TAG_FORCE_BUILD}}', '{{WORKFLOWS_NOTIFY_QUEUE_TAG_FORCE_BUILD}}') == false workflows-send-result-event: + title: Building workflows-send-result-event type: build stage: build - dockerfile: Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/workflows-send-result-event + working_directory: applications/workflows/tasks/send-result-event + dockerfile: Dockerfile + tag: ${{WORKFLOWS_SEND_RESULT_EVENT_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} - CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/workflows-send-result-event - title: Workflows send result event - working_directory: ./applications/workflows/tasks/send-result-event - tags: - - ${{WORKFLOWS_SEND_RESULT_EVENT_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -447,26 +472,25 @@ steps: stage: build steps: common: + title: Building common type: build stage: build - dockerfile: Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/common + working_directory: applications/common/server + dockerfile: Dockerfile + tag: ${{COMMON_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} - CLOUDHARNESS_FLASK=${{REGISTRY}}/cloud-harness/cloudharness-flask:${{CLOUDHARNESS_FLASK_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/common - title: Common - working_directory: ./applications/common/server - tags: - - ${{COMMON_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -475,27 +499,27 @@ steps: forceNoCache: includes('${{COMMON_TAG_FORCE_BUILD}}', '{{COMMON_TAG_FORCE_BUILD}}') == false samples: + title: Building samples type: build stage: build - dockerfile: test.Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/sampleapp + working_directory: applications/samples + dockerfile: test.Dockerfile + tag: ${{SAMPLES_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} - - CLOUDHARNESS_FRONTEND_BUILD=${{REGISTRY}}/cloud-harness/cloudharness-frontend-build:${{CLOUDHARNESS_FRONTEND_BUILD_TAG}} - CLOUDHARNESS_FLASK=${{REGISTRY}}/cloud-harness/cloudharness-flask:${{CLOUDHARNESS_FLASK_TAG}} + - CLOUDHARNESS_FRONTEND_BUILD=${{REGISTRY}}/cloud-harness/cloudharness-frontend-build:${{CLOUDHARNESS_FRONTEND_BUILD_TAG}} + - CLOUDHARNESS_DJANGO=${{REGISTRY}}/cloud-harness/cloudharness-django:${{CLOUDHARNESS_DJANGO_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/sampleapp - title: Samples - working_directory: ./applications/samples - tags: - - ${{SAMPLES_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -503,27 +527,54 @@ steps: == true forceNoCache: includes('${{SAMPLES_TAG_FORCE_BUILD}}', '{{SAMPLES_TAG_FORCE_BUILD}}') == false - volumemanager: + test: + title: Building test type: build stage: build - dockerfile: Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/test + working_directory: applications/test/backend + dockerfile: Dockerfile + tag: ${{TEST_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} + - CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}} - CLOUDHARNESS_FLASK=${{REGISTRY}}/cloud-harness/cloudharness-flask:${{CLOUDHARNESS_FLASK_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 + when: + condition: + any: + buildDoesNotExist: includes('${{TEST_TAG_EXISTS}}', '{{TEST_TAG_EXISTS}}') + == true + forceNoCache: includes('${{TEST_TAG_FORCE_BUILD}}', '{{TEST_TAG_FORCE_BUILD}}') + == false + volumemanager: + title: Building volumemanager + type: build + stage: build + registry: ${{CODEFRESH_REGISTRY}} + buildkit: true image_name: cloud-harness/volumemanager - title: Volumemanager - working_directory: ./applications/volumemanager/server - tags: - - ${{VOLUMEMANAGER_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + working_directory: applications/volumemanager/server + dockerfile: Dockerfile + tag: ${{VOLUMEMANAGER_TAG}} + build_arguments: + - NOCACHE=${{CF_BUILD_ID}} + - CLOUDHARNESS_FLASK=${{REGISTRY}}/cloud-harness/cloudharness-flask:${{CLOUDHARNESS_FLASK_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 + - GOLANG=golang:1.26 + - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal + - SENTRY=sentry:9.1.2 + - PYTHON=python:3.12-slim-trixie + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -532,26 +583,25 @@ steps: forceNoCache: includes('${{VOLUMEMANAGER_TAG_FORCE_BUILD}}', '{{VOLUMEMANAGER_TAG_FORCE_BUILD}}') == false workflows: + title: Building workflows type: build stage: build - dockerfile: Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/workflows + working_directory: applications/workflows/server + dockerfile: Dockerfile + tag: ${{WORKFLOWS_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} - CLOUDHARNESS_FLASK=${{REGISTRY}}/cloud-harness/cloudharness-flask:${{CLOUDHARNESS_FLASK_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/workflows - title: Workflows - working_directory: ./applications/workflows/server - tags: - - ${{WORKFLOWS_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -565,26 +615,25 @@ steps: stage: build steps: samples-sum: + title: Building samples-sum type: build stage: build - dockerfile: Dockerfile registry: ${{CODEFRESH_REGISTRY}} buildkit: true + image_name: cloud-harness/sampleapp-sum + working_directory: applications/samples/tasks/sum + dockerfile: Dockerfile + tag: ${{SAMPLES_SUM_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} - SAMPLES=${{REGISTRY}}/cloud-harness/sampleapp:${{SAMPLES_TAG}} + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - NODE=node:22-alpine + - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - image_name: cloud-harness/sampleapp-sum - title: Samples sum - working_directory: ./applications/samples/tasks/sum - tags: - - ${{SAMPLES_SUM_TAG}} - - ${{DEPLOYMENT_PUBLISH_TAG}}-dev - - ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 when: condition: any: @@ -593,6 +642,37 @@ steps: forceNoCache: includes('${{SAMPLES_SUM_TAG_FORCE_BUILD}}', '{{SAMPLES_SUM_TAG_FORCE_BUILD}}') == false title: Build parallel step 4 + build_application_images_4: + type: parallel + stage: build + steps: + sentry: + title: Building sentry + type: build + stage: build + registry: ${{CODEFRESH_REGISTRY}} + buildkit: true + image_name: cloud-harness/sentry + working_directory: applications/sentry + dockerfile: Dockerfile + tag: ${{SENTRY_TAG}} + build_arguments: + - NOCACHE=${{CF_BUILD_ID}} + - SENTRY=sentry:9.1.2 + - KEYCLOAK=quay.io/keycloak/keycloak:26.5 + - GOLANG=golang:1.26 + - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal + - PYTHON=python:3.12-slim-trixie + - NODE=node:22-alpine + - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 + when: + condition: + any: + buildDoesNotExist: includes('${{SENTRY_TAG_EXISTS}}', '{{SENTRY_TAG_EXISTS}}') + == true + forceNoCache: includes('${{SENTRY_TAG_FORCE_BUILD}}', '{{SENTRY_TAG_FORCE_BUILD}}') + == false + title: Build parallel step 5 tests_unit: stage: unittest type: parallel @@ -618,8 +698,14 @@ steps: custom_value_files: - ./deployment/helm/values.yaml custom_values: - - 'apps_samples-instance1_harness_secrets_asecret="${{ASECRET}}"' - - 'apps_samples_harness_secrets_asecret="${{ASECRET}}"' + - apps_notifications_harness_secrets_email-user="${{EMAIL-USER}}" + - apps_notifications_harness_secrets_email-password="${{EMAIL-PASSWORD}}" + - apps_samples_harness_secrets_asecret="${{ASECRET}}" + - apps_samples-instance1_harness_secrets_asecret="${{ASECRET}}" + - apps_sentry_harness_secrets_email-server="${{EMAIL-SERVER}}" + - apps_sentry_harness_secrets_email-user="${{EMAIL-USER}}" + - apps_sentry_harness_secrets_email-password="${{EMAIL-PASSWORD}}" + - registry_secret_value="${{K8S_SA_JSON}}" wait_deployment: stage: qa title: Wait deployment to be ready @@ -628,11 +714,18 @@ steps: commands: - kubectl config use-context ${{CLUSTER_NAME}} - kubectl config set-context --current --namespace=test-${{NAMESPACE_BASENAME}} - - kubectl rollout status deployment/volumemanager - - kubectl rollout status deployment/samples-instance1 - kubectl rollout status deployment/accounts - - kubectl rollout status statefulset/samples + - kubectl rollout status deployment/argo-gk - kubectl rollout status deployment/common + - kubectl rollout status deployment/es-gk + - kubectl rollout status deployment/notifications + - kubectl rollout status statefulset/samples + - kubectl rollout status deployment/www-gk + - kubectl rollout status deployment/samples-instance1 + - kubectl rollout status deployment/samples1-gk + - kubectl rollout status deployment/sentry + - kubectl rollout status deployment/test + - kubectl rollout status deployment/volumemanager - kubectl rollout status deployment/workflows - sleep 60 tests_nfs_failover: @@ -675,16 +768,6 @@ steps: commands: - echo $APP_NAME scale: - workflows_api_test: - title: workflows api test - volumes: - - ${{CF_REPO_NAME}}/applications/workflows:/home/test - - ${{CF_REPO_NAME}}/deployment/helm/values.yaml:/opt/cloudharness/resources/allvalues.yaml - environment: - - APP_URL=https://workflows.${{DOMAIN}}/api - commands: - - st --pre-run cloudharness_test.apitest_init run api/openapi.yaml --base-url - https://workflows.${{DOMAIN}}/api -c all common_api_test: title: common api test volumes: @@ -711,6 +794,27 @@ steps: --hypothesis-suppress-health-check=too_slow --hypothesis-deadline=180000 --request-timeout=180000 --hypothesis-max-examples=2 --show-trace --exclude-checks=ignored_auth - pytest -v test/api + test_api_test: + title: test api test + volumes: + - ${{CF_REPO_NAME}}/applications/test:/home/test + - ${{CF_REPO_NAME}}/deployment/helm/values.yaml:/opt/cloudharness/resources/allvalues.yaml + environment: + - APP_URL=https://test.${{DOMAIN}}/api + commands: + - st --pre-run cloudharness_test.apitest_init run api/openapi.yaml --base-url + https://test.${{DOMAIN}}/api -c all + - pytest -v test/api + workflows_api_test: + title: workflows api test + volumes: + - ${{CF_REPO_NAME}}/applications/workflows:/home/test + - ${{CF_REPO_NAME}}/deployment/helm/values.yaml:/opt/cloudharness/resources/allvalues.yaml + environment: + - APP_URL=https://workflows.${{DOMAIN}}/api + commands: + - st --pre-run cloudharness_test.apitest_init run api/openapi.yaml --base-url + https://workflows.${{DOMAIN}}/api -c all hooks: on_fail: exec: From 64269447c3f3b2b8db72d6d7f3b3253a4b0c3f7f Mon Sep 17 00:00:00 2001 From: aranega Date: Tue, 10 Nov 2026 12:36:28 -0600 Subject: [PATCH 09/11] Add back secret escaping sequence --- deployment/codefresh-test.yaml | 10 ++--- .../ch_cli_tools/codefresh.py | 2 +- .../tests/test_codefresh.py | 44 +++++++++++++++++++ 3 files changed, 50 insertions(+), 6 deletions(-) diff --git a/deployment/codefresh-test.yaml b/deployment/codefresh-test.yaml index 69fd835f..68368935 100644 --- a/deployment/codefresh-test.yaml +++ b/deployment/codefresh-test.yaml @@ -698,13 +698,13 @@ steps: custom_value_files: - ./deployment/helm/values.yaml custom_values: - - apps_notifications_harness_secrets_email-user="${{EMAIL-USER}}" - - apps_notifications_harness_secrets_email-password="${{EMAIL-PASSWORD}}" + - apps_notifications_harness_secrets_email-user="${{EMAIL_USER}}" + - apps_notifications_harness_secrets_email-password="${{EMAIL_PASSWORD}}" - apps_samples_harness_secrets_asecret="${{ASECRET}}" - apps_samples-instance1_harness_secrets_asecret="${{ASECRET}}" - - apps_sentry_harness_secrets_email-server="${{EMAIL-SERVER}}" - - apps_sentry_harness_secrets_email-user="${{EMAIL-USER}}" - - apps_sentry_harness_secrets_email-password="${{EMAIL-PASSWORD}}" + - apps_sentry_harness_secrets_email-server="${{EMAIL_SERVER}}" + - apps_sentry_harness_secrets_email-user="${{EMAIL_USER}}" + - apps_sentry_harness_secrets_email-password="${{EMAIL_PASSWORD}}" - registry_secret_value="${{K8S_SA_JSON}}" wait_deployment: stage: qa diff --git a/tools/deployment-cli-tools/ch_cli_tools/codefresh.py b/tools/deployment-cli-tools/ch_cli_tools/codefresh.py index a401051a..5f62bd10 100644 --- a/tools/deployment-cli-tools/ch_cli_tools/codefresh.py +++ b/tools/deployment-cli-tools/ch_cli_tools/codefresh.py @@ -417,7 +417,7 @@ def _collect_deployment_secret_values(self, project) -> list[str]: ) values.append( 'apps_%s_harness_secrets_%s="${{%s}}"' - % (app_key, value_path, secret_name.upper()) + % (app_key, value_path, secret_name.replace("-", "_").upper()) ) if app.database.get("connect_string") == "": var_name = f"{_env_key(app.name)}_DB_CONNECT_STRING" diff --git a/tools/deployment-cli-tools/tests/test_codefresh.py b/tools/deployment-cli-tools/tests/test_codefresh.py index 55ba06f1..bb2995b5 100644 --- a/tools/deployment-cli-tools/tests/test_codefresh.py +++ b/tools/deployment-cli-tools/tests/test_codefresh.py @@ -658,6 +658,50 @@ def test_create_codefresh_configuration_secret_value_containing_quotes(tmp_path) ) +def test_create_codefresh_configuration_secret_name_with_hyphen(tmp_path): + # A hyphen is valid in a Helm --set key but not in a Codefresh pipeline + # variable name, so the reference must substitute it with an underscore - + # ${{EMAIL-PASSWORD}} is left unresolved by Codefresh and then breaks the + # shell ("bad substitution") when the deployment step actually runs. + override_root = write_tree_from_yaml( + tmp_path / "override", + """ + applications: + myapp: + deploy: + values.yaml: | + harness: + secrets: + email-password: null + """, + ) + + roots = [CLOUDHARNESS_ROOT, RESOURCES, override_root] + values = create_helm_chart( + roots, + output_path=tmp_path, + include=["myapp"], + exclude=["events"], + domain="my.local", + namespace="test", + env="dev", + local=False, + tag="1", + registry="reg", + ) + cf = create_codefresh_deployment_scripts( + roots, envs=["dev"], helm_values=values, save=False + ) + + custom_values = cf["steps"]["deployment"]["arguments"]["custom_values"] + entry = next( + v + for v in custom_values + if v.startswith("apps_myapp_harness_secrets_email-password=") + ) + assert entry == 'apps_myapp_harness_secrets_email-password="${{EMAIL_PASSWORD}}"' + + def test_create_codefresh_configuration_api_and_e2e_test_steps(tmp_path): # real cloud-harness samples app: subdomain=www, test.api/test.e2e both # enabled, a real api/openapi.yaml (servers: [{url: /api}]), and both a From d06dd35f8ac647064f907ba31a613bd66d5978bf Mon Sep 17 00:00:00 2001 From: aranega Date: Tue, 10 Nov 2026 12:59:10 -0600 Subject: [PATCH 10/11] Add special case for test-api image build --- deployment/codefresh-test.yaml | 137 +----------------- .../ch_cli_tools/model.py | 14 ++ .../deployment-cli-tools/tests/test_model.py | 25 ++++ 3 files changed, 45 insertions(+), 131 deletions(-) diff --git a/deployment/codefresh-test.yaml b/deployment/codefresh-test.yaml index 68368935..3840bb49 100644 --- a/deployment/codefresh-test.yaml +++ b/deployment/codefresh-test.yaml @@ -1,4 +1,4 @@ -# Generated with: harness-deployment . -d '${{DOMAIN}}' -n 'test-${{NAMESPACE_BASENAME}}' -r reg -t 1 -rsn '${{REGISTRY_SECRET}}' -e test --write-env --cache-url '${{IMAGE_CACHE_URL}}' +# Generated with: harness-deployment . -d '${{DOMAIN}}' -n 'test-${{NAMESPACE_BASENAME}}' -r reg -t 1 -rsn '${{REGISTRY_SECRET}}' -e test --write-env --cache-url '${{IMAGE_CACHE_URL}}' -i samples version: '1.0' stages: - prepare @@ -43,9 +43,9 @@ steps: "$APP_VERSION_RESOLVED" ] && printf -- "--app-version %s" "$APP_VERSION_RESOLVED" )" - export HELM_META_ARGS="$HELM_NAME_ARG $HELM_CHART_VERSION_ARG $HELM_APP_VERSION_ARG" - - 'harness-deployment . -n test-${{NAMESPACE_BASENAME}} -d ${{DOMAIN}} -r ${{REGISTRY}} - -rsn ${{REGISTRY_SECRET}} -e test --write-env --cache-url ''${{IMAGE_CACHE_URL}}'' - -N $HELM_META_ARGS ' + - harness-deployment . -n test-${{NAMESPACE_BASENAME}} -d ${{DOMAIN}} -r ${{REGISTRY}} + -rsn ${{REGISTRY_SECRET}} -e test --write-env --cache-url '${{IMAGE_CACHE_URL}}' + -N $HELM_META_ARGS -i samples - cat deployment/.env >> ${{CF_VOLUME_PATH}}/env_vars_to_export - cat ${{CF_VOLUME_PATH}}/env_vars_to_export prepare_deployment_view: @@ -76,7 +76,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -102,7 +101,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -128,7 +126,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -154,7 +151,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -180,7 +176,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -212,7 +207,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -239,7 +233,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -266,7 +259,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -277,33 +269,6 @@ steps: == true forceNoCache: includes('${{JUPYTERHUB_TAG_FORCE_BUILD}}', '{{JUPYTERHUB_TAG_FORCE_BUILD}}') == false - notifications: - title: Building notifications - type: build - stage: build - registry: ${{CODEFRESH_REGISTRY}} - buildkit: true - image_name: cloud-harness/notifications - working_directory: applications/notifications/server - dockerfile: Dockerfile - tag: ${{NOTIFICATIONS_TAG}} - build_arguments: - - NOCACHE=${{CF_BUILD_ID}} - - CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}} - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - GOLANG=golang:1.26 - - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - - PYTHON=python:3.12-slim-trixie - - NODE=node:22-alpine - - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 - when: - condition: - any: - buildDoesNotExist: includes('${{NOTIFICATIONS_TAG_EXISTS}}', '{{NOTIFICATIONS_TAG_EXISTS}}') - == true - forceNoCache: includes('${{NOTIFICATIONS_TAG_FORCE_BUILD}}', '{{NOTIFICATIONS_TAG_FORCE_BUILD}}') - == false samples-print-file: title: Building samples-print-file type: build @@ -320,7 +285,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -347,7 +311,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -365,8 +328,8 @@ steps: registry: ${{CODEFRESH_REGISTRY}} buildkit: true image_name: cloud-harness/test-api - working_directory: test/test-api - dockerfile: Dockerfile + working_directory: . + dockerfile: test/test-api/Dockerfile tag: ${{TEST_API_TAG}} build_arguments: - NOCACHE=${{CF_BUILD_ID}} @@ -374,7 +337,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -401,7 +363,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -428,7 +389,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -455,7 +415,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -487,7 +446,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -516,7 +474,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -527,34 +484,6 @@ steps: == true forceNoCache: includes('${{SAMPLES_TAG_FORCE_BUILD}}', '{{SAMPLES_TAG_FORCE_BUILD}}') == false - test: - title: Building test - type: build - stage: build - registry: ${{CODEFRESH_REGISTRY}} - buildkit: true - image_name: cloud-harness/test - working_directory: applications/test/backend - dockerfile: Dockerfile - tag: ${{TEST_TAG}} - build_arguments: - - NOCACHE=${{CF_BUILD_ID}} - - CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}} - - CLOUDHARNESS_FLASK=${{REGISTRY}}/cloud-harness/cloudharness-flask:${{CLOUDHARNESS_FLASK_TAG}} - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - GOLANG=golang:1.26 - - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - - PYTHON=python:3.12-slim-trixie - - NODE=node:22-alpine - - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 - when: - condition: - any: - buildDoesNotExist: includes('${{TEST_TAG_EXISTS}}', '{{TEST_TAG_EXISTS}}') - == true - forceNoCache: includes('${{TEST_TAG_FORCE_BUILD}}', '{{TEST_TAG_FORCE_BUILD}}') - == false volumemanager: title: Building volumemanager type: build @@ -571,7 +500,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -598,7 +526,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -630,7 +557,6 @@ steps: - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - GOLANG=golang:1.26 - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - SENTRY=sentry:9.1.2 - PYTHON=python:3.12-slim-trixie - NODE=node:22-alpine - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 @@ -642,37 +568,6 @@ steps: forceNoCache: includes('${{SAMPLES_SUM_TAG_FORCE_BUILD}}', '{{SAMPLES_SUM_TAG_FORCE_BUILD}}') == false title: Build parallel step 4 - build_application_images_4: - type: parallel - stage: build - steps: - sentry: - title: Building sentry - type: build - stage: build - registry: ${{CODEFRESH_REGISTRY}} - buildkit: true - image_name: cloud-harness/sentry - working_directory: applications/sentry - dockerfile: Dockerfile - tag: ${{SENTRY_TAG}} - build_arguments: - - NOCACHE=${{CF_BUILD_ID}} - - SENTRY=sentry:9.1.2 - - KEYCLOAK=quay.io/keycloak/keycloak:26.5 - - GOLANG=golang:1.26 - - ROCKYLINUX=rockylinux/rockylinux:10.1-minimal - - PYTHON=python:3.12-slim-trixie - - NODE=node:22-alpine - - GATEKEEPER=quay.io/gogatekeeper/gatekeeper:4.6.0 - when: - condition: - any: - buildDoesNotExist: includes('${{SENTRY_TAG_EXISTS}}', '{{SENTRY_TAG_EXISTS}}') - == true - forceNoCache: includes('${{SENTRY_TAG_FORCE_BUILD}}', '{{SENTRY_TAG_FORCE_BUILD}}') - == false - title: Build parallel step 5 tests_unit: stage: unittest type: parallel @@ -698,13 +593,8 @@ steps: custom_value_files: - ./deployment/helm/values.yaml custom_values: - - apps_notifications_harness_secrets_email-user="${{EMAIL_USER}}" - - apps_notifications_harness_secrets_email-password="${{EMAIL_PASSWORD}}" - apps_samples_harness_secrets_asecret="${{ASECRET}}" - apps_samples-instance1_harness_secrets_asecret="${{ASECRET}}" - - apps_sentry_harness_secrets_email-server="${{EMAIL_SERVER}}" - - apps_sentry_harness_secrets_email-user="${{EMAIL_USER}}" - - apps_sentry_harness_secrets_email-password="${{EMAIL_PASSWORD}}" - registry_secret_value="${{K8S_SA_JSON}}" wait_deployment: stage: qa @@ -717,14 +607,10 @@ steps: - kubectl rollout status deployment/accounts - kubectl rollout status deployment/argo-gk - kubectl rollout status deployment/common - - kubectl rollout status deployment/es-gk - - kubectl rollout status deployment/notifications - kubectl rollout status statefulset/samples - kubectl rollout status deployment/www-gk - kubectl rollout status deployment/samples-instance1 - kubectl rollout status deployment/samples1-gk - - kubectl rollout status deployment/sentry - - kubectl rollout status deployment/test - kubectl rollout status deployment/volumemanager - kubectl rollout status deployment/workflows - sleep 60 @@ -794,17 +680,6 @@ steps: --hypothesis-suppress-health-check=too_slow --hypothesis-deadline=180000 --request-timeout=180000 --hypothesis-max-examples=2 --show-trace --exclude-checks=ignored_auth - pytest -v test/api - test_api_test: - title: test api test - volumes: - - ${{CF_REPO_NAME}}/applications/test:/home/test - - ${{CF_REPO_NAME}}/deployment/helm/values.yaml:/opt/cloudharness/resources/allvalues.yaml - environment: - - APP_URL=https://test.${{DOMAIN}}/api - commands: - - st --pre-run cloudharness_test.apitest_init run api/openapi.yaml --base-url - https://test.${{DOMAIN}}/api -c all - - pytest -v test/api workflows_api_test: title: workflows api test volumes: diff --git a/tools/deployment-cli-tools/ch_cli_tools/model.py b/tools/deployment-cli-tools/ch_cli_tools/model.py index a41b0e55..821e26b6 100644 --- a/tools/deployment-cli-tools/ch_cli_tools/model.py +++ b/tools/deployment-cli-tools/ch_cli_tools/model.py @@ -819,6 +819,20 @@ class CHTestImage(CHBaseImage): def _lower_registry(self, lower: "CHProject") -> dict: return lower.test_images + @property + def build_context(self) -> Path: + # FIXME: test-api's Dockerfile COPYs library/tool sources from outside + # test/test-api, so it needs the project root as its build context, unlike + # test-e2e or any other test image. Legacy hardcoded this exact exception by + # name (old/codefresh.py, codefresh_steps_from_base_path(..., fixed_context=...) + # only for name == "test-api") instead of deriving it from the Dockerfile's own + # COPY instructions - ported as-is rather than introduced here, but still a + # hardcoded special case: a new test image with the same need won't get this + # automatically. + if self.name != "test-api": + return self.path + return self.containing_project.root + class CHAppTask: """A buildable task owned by an app or base image.""" diff --git a/tools/deployment-cli-tools/tests/test_model.py b/tools/deployment-cli-tools/tests/test_model.py index 2db3a566..73b0d0fc 100644 --- a/tools/deployment-cli-tools/tests/test_model.py +++ b/tools/deployment-cli-tools/tests/test_model.py @@ -1155,6 +1155,31 @@ def test_test_image_gets_a_content_hash_tag_that_follows_its_content(tmp_path): assert after != before +def test_test_api_builds_from_project_root_unlike_other_test_images(tmp_path): + # test-api's Dockerfile COPYs libraries/tools from outside test/test-api + # (it needs the whole repo as context); test-e2e's doesn't, same as any + # other test image - test-api is a hardcoded, legacy-matching exception. + write_tree_from_yaml( + tmp_path, + """ + deployment-configuration: + values-template.yaml: | + name: testproj + test: + test-api: + Dockerfile: | + FROM scratch + test-e2e: + Dockerfile: | + FROM scratch + """, + ) + project = chain(tmp_path, config=CHDeployConfig()) + + assert project.test_images["test-api"].build_context == tmp_path + assert project.test_images["test-e2e"].build_context == tmp_path / "test" / "test-e2e" + + def test_deploy_runs_helm_dependency_update_then_upgrade(tmp_path, monkeypatch): calls = [] monkeypatch.setattr( From 529da945fcad00c47d590017a3108c3de7a11547 Mon Sep 17 00:00:00 2001 From: aranega Date: Tue, 10 Nov 2026 13:05:45 -0600 Subject: [PATCH 11/11] Update test-deployment for codefresh --- deployment/codefresh-test.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deployment/codefresh-test.yaml b/deployment/codefresh-test.yaml index 3840bb49..0a0dc365 100644 --- a/deployment/codefresh-test.yaml +++ b/deployment/codefresh-test.yaml @@ -1,4 +1,4 @@ -# Generated with: harness-deployment . -d '${{DOMAIN}}' -n 'test-${{NAMESPACE_BASENAME}}' -r reg -t 1 -rsn '${{REGISTRY_SECRET}}' -e test --write-env --cache-url '${{IMAGE_CACHE_URL}}' -i samples +# Generated with: harness-deployment . -d '${{DOMAIN}}' -n 'test-${{NAMESPACE_BASENAME}}' -r reg -t 1 -e test --write-env --cache-url '${{IMAGE_CACHE_URL}}' -i samples version: '1.0' stages: - prepare @@ -595,7 +595,6 @@ steps: custom_values: - apps_samples_harness_secrets_asecret="${{ASECRET}}" - apps_samples-instance1_harness_secrets_asecret="${{ASECRET}}" - - registry_secret_value="${{K8S_SA_JSON}}" wait_deployment: stage: qa title: Wait deployment to be ready