From 4a3642fd70b78652db3a1f8adc8c0defa363fa32 Mon Sep 17 00:00:00 2001
From: Tancho Mihov <tancho.mihov@cleverpine.com>
Date: Thu, 16 Jun 2022 14:26:29 +0300
Subject: [PATCH] init

---
 .gitlab-ci.yml     | 45 +++++++++++++++++++++++++++++++++++++--------
 .gitlab-ci.yml.old | 25 +++++++++++++++++++++++++
 2 files changed, 62 insertions(+), 8 deletions(-)
 create mode 100644 .gitlab-ci.yml.old

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e5a6f57..d9ceea5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,9 +1,19 @@
+variables:
+  APP_HELM_NAME: task
+  DOCKER_FILE: deployment/ci/Dockerfile
+  GOOGLE_IMAGE: ${GOOGLE_LIGHT_REGISTRY_URL}/gaiax/$CI_PROJECT_NAME:$CI_COMMIT_REF_NAME
+
 stages:
+  - compile
   - test
+  - build
+  - manifest
+  - deploy
 
-before_script:
-  - ln -s /builds /go/src/code.vereign.com
-  - cd /go/src/code.vereign.com/${CI_PROJECT_PATH}
+include:
+  - project: 'gaiax/tsa/ci-helpers'
+    file: 'docker-build.yml'
+  - template: 'Workflows/Branch-Pipelines.gitlab-ci.yml'
 
 lint:
   image: golangci/golangci-lint:v1.44.2
@@ -13,13 +23,32 @@ lint:
   script:
     - golangci-lint --version
     - golangci-lint run
+  before_script:
+    - ln -s /builds /go/src/code.vereign.com
+    - cd /go/src/code.vereign.com/${CI_PROJECT_PATH}
 
 unit tests:
-  image: golang:1.17.8
+  image: golang:1.17.7
+  extends: .gotest
   stage: test
   tags:
     - amd64-docker
-  script:
-    - go version
-    - go test -race ./... -coverprofile=coverage.out
-    - go tool cover -func=coverage.out
+  before_script: []
+
+amd64:
+  extends: .docker-build
+  stage: build
+  tags:
+    - amd64-docker
+
+manifest:
+  extends: .manifest-amd64
+  stage: manifest
+
+cloud:
+  extends: .manifest-cloud
+  stage: manifest
+
+release:
+  extends: .manifest-release
+  stage: manifest
diff --git a/.gitlab-ci.yml.old b/.gitlab-ci.yml.old
new file mode 100644
index 0000000..e5a6f57
--- /dev/null
+++ b/.gitlab-ci.yml.old
@@ -0,0 +1,25 @@
+stages:
+  - test
+
+before_script:
+  - ln -s /builds /go/src/code.vereign.com
+  - cd /go/src/code.vereign.com/${CI_PROJECT_PATH}
+
+lint:
+  image: golangci/golangci-lint:v1.44.2
+  stage: test
+  tags:
+    - amd64-docker
+  script:
+    - golangci-lint --version
+    - golangci-lint run
+
+unit tests:
+  image: golang:1.17.8
+  stage: test
+  tags:
+    - amd64-docker
+  script:
+    - go version
+    - go test -race ./... -coverprofile=coverage.out
+    - go tool cover -func=coverage.out
-- 
GitLab