Closed voatsap closed 4 years ago
.gitlab-ci.yml:
image: docker:19.03.0
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "/certs"
CLUSTER_DEV_BRANCH: "GitHub-dependency-removement"
services:
- docker:19.03.0-dind
before_script:
- apk update
- apk upgrade
- apk add --no-cache bash git
stages:
- build_cluster-dev
build_cluster-dev:
script:
- git clone -b "$CLUSTER_DEV_BRANCH" https://github.com/shalb/cluster.dev.git
- cd cluster.dev
- docker build --no-cache -t "cluster.dev:${CLUSTER_DEV_BRANCH}" .
- docker run --name cluster.dev-${CLUSTER_DEV_BRANCH} --workdir /gitlab/workspace --rm -e CI_PROJECT_PATH -e CI_PROJECT_DIR -e VERBOSE_LVL=DEBUG -v "${CI_PROJECT_DIR}:/gitlab/workspace" cluster.dev:${CLUSTER_DEV_BRANCH} "./.cluster.dev/" "AWSUSER" "AWSPASS"
stage: build_cluster-dev
Gitlab Support implemented: https://github.com/shalb/cluster.dev/blob/master/docs/OPTIONS.md#gitlab-cicd-pipeline-configuration
We need to create same workflow pipeline GitHub Action: https://github.com/voatsap/testrepo/blob/master/.github/workflows/main.yml in GitLab .gitlab-ci.yml That would pull and build cluster.dev repo.
To test - run AWS cluster with same manifest.