From 34cfc7b14a8b8f7a46684f49e41788b76b017791 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: Fri, 12 May 2023 03:27:20 +0000
Subject: [PATCH] Update .gitlab-ci.yml file add parent child trigger

---
 .gitlab-ci.yml | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2c792d0..71dd9c2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,11 +1,25 @@
 stages:
-  - deploy
+  - setup
+  - trigger
 
-re-tag:
-  stage: deploy
+generate-config:
+  stage: setup
+  before_script:
+    - docker login $CI_REGISTRY
   script:
-    - echo TRIGGER_PAYLOAD=$TRIGGER_PAYLOAD
-    - cat $TRIGGER_PAYLOAD
-
+    - bash ./generate-deploy-stages.sh
+  artifacts:
+    paths:
+      - deploy.yml
+  only:
+    refs:
+      - main
   tags:
-    - shell
\ No newline at end of file
+    - shell
+
+deploy_image_trigger:
+  stage: trigger
+  trigger:
+    include:
+      - artifact: deploy.yml
+        job: generate-config
-- 
GitLab