From ebf9926809013903b6ca1ccb30f7288115073e8b Mon Sep 17 00:00:00 2001 From: Mondo Diaz Date: Thu, 29 Jan 2026 11:37:57 -0600 Subject: [PATCH] Fix YAML anchor ordering in CI pipeline --- .gitlab-ci.yml | 172 ++++++++++++++++++++++++------------------------- 1 file changed, 86 insertions(+), 86 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c523a9e..0b96989 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -201,92 +201,6 @@ release: sys.exit(0) PYTEST_SCRIPT -# Ephemeral test deployment in stage namespace (main branch only) -# Runs integration tests before promoting to long-running stage -deploy_test: - <<: *deploy_template - variables: - NAMESPACE: orch-stage-namespace - VALUES_FILE: helm/orchard/values-dev.yaml - BASE_URL: https://orchard-test.common.global.bsf.tools - before_script: - - kubectl config use-context esv/bsf/bsf-integration/orchard/orchard-mvp:orchard-stage - - *helm_setup - script: - - echo "Deploying ephemeral test environment" - - cd $CI_PROJECT_DIR - - | - helm upgrade --install orchard-test ./helm/orchard \ - --namespace $NAMESPACE \ - -f $VALUES_FILE \ - --set image.tag=git.linux-amd64-$CI_COMMIT_SHA \ - --set orchard.auth.adminPassword=$STAGE_ADMIN_PASSWORD \ - --set ingress.hosts[0].host=orchard-test.common.global.bsf.tools \ - --set ingress.tls[0].hosts[0]=orchard-test.common.global.bsf.tools \ - --set ingress.tls[0].secretName=orchard-test-tls \ - --set minioIngress.host=minio-test.common.global.bsf.tools \ - --set minioIngress.tls.secretName=minio-test-tls \ - --wait \ - --atomic \ - --timeout 10m - - kubectl rollout status deployment/orchard-test-server -n $NAMESPACE --timeout=10m - - *verify_deployment - environment: - name: test - url: https://orchard-test.common.global.bsf.tools - on_stop: cleanup_test - kubernetes: - agent: esv/bsf/bsf-integration/orchard/orchard-mvp:orchard-stage - rules: - - if: '$CI_COMMIT_BRANCH == "main"' - when: on_success - -# Cleanup ephemeral test deployment after integration tests -cleanup_test: - stage: deploy - needs: [integration_test_main] - image: deps.global.bsf.tools/registry-1.docker.io/alpine/k8s:1.29.12 - timeout: 5m - variables: - NAMESPACE: orch-stage-namespace - GIT_STRATEGY: none - before_script: - - kubectl config use-context esv/bsf/bsf-integration/orchard/orchard-mvp:orchard-stage - script: - - echo "Cleaning up ephemeral test deployment orchard-test" - - helm uninstall orchard-test --namespace $NAMESPACE || true - environment: - name: test - action: stop - kubernetes: - agent: esv/bsf/bsf-integration/orchard/orchard-mvp:orchard-stage - rules: - - if: '$CI_COMMIT_BRANCH == "main"' - when: on_success - allow_failure: true - -# Integration tests for ephemeral test deployment (main branch) -# Runs against orchard-test before promoting to long-running stage -integration_test_main: - <<: *integration_test_template - needs: [deploy_test] - variables: - ORCHARD_TEST_URL: https://orchard-test.common.global.bsf.tools - ORCHARD_TEST_PASSWORD: $STAGE_ADMIN_PASSWORD - rules: - - if: '$CI_COMMIT_BRANCH == "main"' - when: on_success - -# Smoke test for long-running stage (after promotion) -smoke_test_stage: - <<: *smoke_test_template - needs: [deploy_stage] - variables: - ORCHARD_TEST_URL: $STAGE_URL - rules: - - if: '$CI_COMMIT_BRANCH == "main"' - when: on_success - # Integration tests for feature deployment (full suite) # Uses DEV_ADMIN_PASSWORD CI variable (same as deploy_feature) integration_test_feature: @@ -397,6 +311,82 @@ frontend_tests: echo "Health check failed after 30 attempts" exit 1 +# Ephemeral test deployment in stage namespace (main branch only) +# Runs integration tests before promoting to long-running stage +deploy_test: + <<: *deploy_template + variables: + NAMESPACE: orch-stage-namespace + VALUES_FILE: helm/orchard/values-dev.yaml + BASE_URL: https://orchard-test.common.global.bsf.tools + before_script: + - kubectl config use-context esv/bsf/bsf-integration/orchard/orchard-mvp:orchard-stage + - *helm_setup + script: + - echo "Deploying ephemeral test environment" + - cd $CI_PROJECT_DIR + - | + helm upgrade --install orchard-test ./helm/orchard \ + --namespace $NAMESPACE \ + -f $VALUES_FILE \ + --set image.tag=git.linux-amd64-$CI_COMMIT_SHA \ + --set orchard.auth.adminPassword=$STAGE_ADMIN_PASSWORD \ + --set ingress.hosts[0].host=orchard-test.common.global.bsf.tools \ + --set ingress.tls[0].hosts[0]=orchard-test.common.global.bsf.tools \ + --set ingress.tls[0].secretName=orchard-test-tls \ + --set minioIngress.host=minio-test.common.global.bsf.tools \ + --set minioIngress.tls.secretName=minio-test-tls \ + --wait \ + --atomic \ + --timeout 10m + - kubectl rollout status deployment/orchard-test-server -n $NAMESPACE --timeout=10m + - *verify_deployment + environment: + name: test + url: https://orchard-test.common.global.bsf.tools + on_stop: cleanup_test + kubernetes: + agent: esv/bsf/bsf-integration/orchard/orchard-mvp:orchard-stage + rules: + - if: '$CI_COMMIT_BRANCH == "main"' + when: on_success + +# Integration tests for ephemeral test deployment (main branch) +# Runs against orchard-test before promoting to long-running stage +integration_test_main: + <<: *integration_test_template + needs: [deploy_test] + variables: + ORCHARD_TEST_URL: https://orchard-test.common.global.bsf.tools + ORCHARD_TEST_PASSWORD: $STAGE_ADMIN_PASSWORD + rules: + - if: '$CI_COMMIT_BRANCH == "main"' + when: on_success + +# Cleanup ephemeral test deployment after integration tests +cleanup_test: + stage: deploy + needs: [integration_test_main] + image: deps.global.bsf.tools/registry-1.docker.io/alpine/k8s:1.29.12 + timeout: 5m + variables: + NAMESPACE: orch-stage-namespace + GIT_STRATEGY: none + before_script: + - kubectl config use-context esv/bsf/bsf-integration/orchard/orchard-mvp:orchard-stage + script: + - echo "Cleaning up ephemeral test deployment orchard-test" + - helm uninstall orchard-test --namespace $NAMESPACE || true + environment: + name: test + action: stop + kubernetes: + agent: esv/bsf/bsf-integration/orchard/orchard-mvp:orchard-stage + rules: + - if: '$CI_COMMIT_BRANCH == "main"' + when: on_success + allow_failure: true + # Deploy to long-running stage (main branch, after ephemeral tests pass) deploy_stage: stage: deploy @@ -433,6 +423,16 @@ deploy_stage: - if: '$CI_COMMIT_BRANCH == "main"' when: on_success +# Smoke test for long-running stage (after promotion) +smoke_test_stage: + <<: *smoke_test_template + needs: [deploy_stage] + variables: + ORCHARD_TEST_URL: $STAGE_URL + rules: + - if: '$CI_COMMIT_BRANCH == "main"' + when: on_success + # Deploy feature branch to dev namespace deploy_feature: <<: *deploy_template