From b08f71a5189e32ab0ec3a5f368dec253f7c7045d Mon Sep 17 00:00:00 2001
From: Eesaan Atluri <atlurie@uab.edu>
Date: Tue, 29 Oct 2024 02:43:51 -0400
Subject: [PATCH] feat: Run clusterhooks at deploy time for proxies

We are providing hooks into the cluster we need at deploy time rather
than baking them at build time.
This will enable us to build once and deploy across multiple clusters.
Otherwise, we need to build image whenever you need to deploy to a
different cluster.
---
 .gitlab-ci.yml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 092d212..eba28fc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -149,6 +149,10 @@ deploy_http_proxy_node:
       cat > user_data.txt <<EOF
       #!/bin/bash
       echo "$DEV_KEY" >> /root/.ssh/authorized_keys
+      git clone ${CI_REPOSITORY_URL} /tmp/hpc-factory
+      cd /tmp/hpc-factory
+      git checkout ${CI_COMMIT_REF_NAME}
+      ansible-playbook -c local -i 127.0.0.1, ansible/cheaha.yml | tee -a ansible.log
       EOF
     - >
       export HTTP_PROXY_INSTANCE_ID=$(openstack server create
@@ -185,6 +189,10 @@ deploy_ssh_proxy_node:
       cat > user_data.txt <<EOF
       #!/bin/bash
       echo "$DEV_KEY" >> /root/.ssh/authorized_keys
+      git clone ${CI_REPOSITORY_URL} /tmp/hpc-factory
+      cd /tmp/hpc-factory
+      git checkout ${CI_COMMIT_REF_NAME}
+      ansible-playbook -c local -i 127.0.0.1, ansible/cheaha.yml | tee -a ansible.log
       EOF
     - >
       export SSH_PROXY_INSTANCE_ID=$(openstack server create
-- 
GitLab