From be626ebc0804bfdb823cdd9cb2d641750de9a3f1 Mon Sep 17 00:00:00 2001
From: Varac <varac@varac.net>
Date: Thu, 17 Jun 2021 10:21:24 +0200
Subject: [PATCH] Copy kustomization.yaml to cluster dir

---
 .gitlab-ci.yml | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e06d9b58b..23d7e60e9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -301,15 +301,16 @@ setup-openappstack:
     - *debug_information
     # Copy inventory files to ansible folder for use in install-apps step
     - chmod 700 ansible
-    - cp clusters/${CI_COMMIT_REF_SLUG}/inventory.yml ansible/
-    - cp clusters/${CI_COMMIT_REF_SLUG}/group_vars/all/settings.yml ansible/group_vars/all/
+    - cp ${CLUSTER_DIR}/inventory.yml ansible/
+    - cp ${CLUSTER_DIR}/group_vars/all/settings.yml ansible/group_vars/all/
     # Set up cluster
     # TODO: I set --no-install-openappstack to skip the old installation procedure, should be removed eventually
     - python3 -m openappstack $HOSTNAME install --install-kubernetes --no-install-openappstack
     # Customize env file, remove all comments and empty lines
-    - sed "s/1.2.3.4/$IP_ADDRESS/; s/example.org/$FQDN/; s/acme_staging=false/acme_staging=true/; s/acme-staging/acme/; /^\s*#.*$/d; /^\s*$/d" install/.env.example >> clusters/${CI_COMMIT_REF_SLUG}/.flux.env
-    - set -o allexport; source clusters/${CI_COMMIT_REF_SLUG}/.flux.env; set +o allexport
+    - sed "s/1.2.3.4/$IP_ADDRESS/; s/example.org/$FQDN/; s/acme_staging=false/acme_staging=true/; s/acme-staging/acme/; /^\s*#.*$/d; /^\s*$/d" install/.env.example >> ${CLUSTER_DIR}/.flux.env
+    - set -o allexport; source ${CLUSTER_DIR}/.flux.env; set +o allexport
     # Deploy secret/oas-cluster-variables
+    - cp install/kustomization.yaml ${CLUSTER_DIR}
     - kubectl apply -k ${CLUSTER_DIR}
     - bash ./install/install-openappstack.sh
     # TODO: Should also be removed or made up-to-date
-- 
GitLab