From b851af537be2a1325a6cca5ca1dfefcbc21ae1e5 Mon Sep 17 00:00:00 2001
From: Varac <varac@varac.net>
Date: Tue, 7 Apr 2020 13:18:31 +0200
Subject: [PATCH] Include debug_information anchor in gitlab ci file

---
 .gitlab-ci.yml                             | 26 +++++++++++++++++++++-
 .gitlab/ci_templates/debug_information.yml | 21 -----------------
 2 files changed, 25 insertions(+), 22 deletions(-)
 delete mode 100644 .gitlab/ci_templates/debug_information.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2dc098c2a..ead413ede 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,31 @@
+# YAML anchors
+#
+# We don't use a `before_script` definition here because `extend` doesn't merge
+# `before_script` but rather overwrites it.
+# So we rather use [yaml anchors for script](https://docs.gitlab.com/ce/ci/yaml/README.html#yaml-anchors-for-script)
+# here. Unfortunatly, anchors can't get included from files so we need to
+# define them here.
+.debug_information: &debug_information
+  - |
+    echo "Env vars:"
+    echo
+    echo "HOSTNAME:                  $HOSTNAME"
+    echo "SUBDOMAIN:                 $SUBDOMAIN"
+    echo "DOMAIN:                    $DOMAIN"
+    echo "FQDN:                      $FQDN"
+    echo "CLUSTER_DIR:               $CLUSTER_DIR"
+    echo "ANSIBLE_HOST_KEY_CHECKING: $ANSIBLE_HOST_KEY_CHECKING"
+    echo "KANIKO_BUILD_IMAGENAME:    $KANIKO_BUILD_IMAGENAME"
+    echo "SSH_KEY_ID:                $SSH_KEY_ID"
+    echo
+    [ -d $CLUSTER_DIR ] && find $CLUSTER_DIR || echo "directory ${CLUSTER_DIR} not found"
+    echo
+    echo
+
 include:
   - .gitlab/ci_templates/kaniko.yml
   - .gitlab/ci_templates/ssh_setup.yml
-  - .gitlab/ci_templates/debug_information.yml
+
 stages:
   - build
   - create-vps
diff --git a/.gitlab/ci_templates/debug_information.yml b/.gitlab/ci_templates/debug_information.yml
deleted file mode 100644
index c8e89aff0..000000000
--- a/.gitlab/ci_templates/debug_information.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-# We don't use a `before_script` definition here because `extend` doesn't merge
-# `before_script` but rather overwrites it.
-# So we rather use [yaml anchors for script](https://docs.gitlab.com/ce/ci/yaml/README.html#yaml-anchors-for-script)
-# here.
-
-.debug_information: &debug_information
-  - |
-    echo "Env vars:"
-    echo
-    echo "HOSTNAME:                  $HOSTNAME"
-    echo "SUBDOMAIN:                 $SUBDOMAIN"
-    echo "DOMAIN:                    $DOMAIN"
-    echo "FQDN:                      $FQDN"
-    echo "CLUSTER_DIR:               $CLUSTER_DIR"
-    echo "ANSIBLE_HOST_KEY_CHECKING: $ANSIBLE_HOST_KEY_CHECKING"
-    echo "KANIKO_BUILD_IMAGENAME:    $KANIKO_BUILD_IMAGENAME"
-    echo "SSH_KEY_ID:                $SSH_KEY_ID"
-    echo
-    [ -d $CLUSTER_DIR ] && find $CLUSTER_DIR || echo "directory ${CLUSTER_DIR} not found"
-    echo
-    echo
-- 
GitLab