From 99321de6cb5d4aa90ba7729eb160d36534af32ba Mon Sep 17 00:00:00 2001 From: Douglas DUTEIL Date: Wed, 7 Apr 2021 16:45:01 +0200 Subject: [PATCH] fix(k8s): trigger UPDATE_PREPROD jobs should run on the prod cluster --- targets/ingester-elasticsearch/.gitlab-ci.yml | 2 +- targets/ingester/.gitlab-ci.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/targets/ingester-elasticsearch/.gitlab-ci.yml b/targets/ingester-elasticsearch/.gitlab-ci.yml index 20912e548..f98b5f449 100644 --- a/targets/ingester-elasticsearch/.gitlab-ci.yml +++ b/targets/ingester-elasticsearch/.gitlab-ci.yml @@ -162,7 +162,7 @@ variables: INGESTER_ELASTICSEARCH_TARGET: preprod # kosko options - KOSKO_GENERATE_ARGS: --env preprod jobs/ingester-elasticsearch + KOSKO_GENERATE_ARGS: --env prod jobs/ingester-elasticsearch 🎉 ingester-elasticsearch (prod => es prod): extends: diff --git a/targets/ingester/.gitlab-ci.yml b/targets/ingester/.gitlab-ci.yml index 609be418d..015e5ab9b 100644 --- a/targets/ingester/.gitlab-ci.yml +++ b/targets/ingester/.gitlab-ci.yml @@ -100,9 +100,10 @@ .trigger_ingester_cron: needs: - job: 🛂 k8s test - script: + before_script: - echo "kubectl config set-context --current --namespace=${K8S_NAMESPACE}" - kubectl config set-context --current --namespace=${K8S_NAMESPACE} + script: - JOB_NAME="triggered-from-job-${CI_JOB_ID}-${RANDOM}" - kubectl create job --from=cronjob.batch/ingester "${JOB_NAME}"