Commit 46183248 authored by Anton Borisov's avatar Anton Borisov

Update .gitlab-ci.yml

parent e7682015
Pipeline #142 canceled with stages
in 1 minute and 40 seconds
...@@ -16,8 +16,8 @@ build_dev: ...@@ -16,8 +16,8 @@ build_dev:
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
script: script:
- docker login -u "gitlab-ci-token" -p ${CI_JOB_TOKEN} ${CI_REGISTRY} - docker login -u "gitlab-ci-token" -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
- docker build -t ${CI_REGISTRY_IMAGE}:${CI_PIPELINE_ID} . - docker build -t ${CI_REGISTRY_IMAGE}/dev:${CI_PIPELINE_ID} .
- docker push ${CI_REGISTRY_IMAGE}:${CI_PIPELINE_ID} - docker push ${CI_REGISTRY_IMAGE}/dev:${CI_PIPELINE_ID}
environment: environment:
name: ${CI_COMMIT_REF_NAME} name: ${CI_COMMIT_REF_NAME}
url: https://xvideos.com url: https://xvideos.com
...@@ -116,10 +116,17 @@ deploy_to_prod: ...@@ -116,10 +116,17 @@ deploy_to_prod:
DOCKER_HOST: tcp://docker:2375 DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
script: script:
- sed 's|_IMAGE_NAME_|'"${CI_REGISTRY_IMAGE}/test"'|g; s|_VERSION_|'"${CI_PIPELINE_ID}"'|g' node.tpl.yml > node.yml; cat node.yml - sed 's|_IMAGE_NAME_|'"${CI_REGISTRY_IMAGE}/prod"'|g; s|_VERSION_|'"${CI_PIPELINE_ID}"'|g' node1.tpl.yml > node1.yml; cat node1.yml
- sed 's|_IMAGE_NAME_|'"${CI_REGISTRY_IMAGE}/prod"'|g; s|_VERSION_|'"${CI_PIPELINE_ID}"'|g' node2.tpl.yml > node2.yml; cat node2.yml
- sed 's|_IMAGE_NAME_|'"${CI_REGISTRY_IMAGE}/prod"'|g; s|_VERSION_|'"${CI_PIPELINE_ID}"'|g' node3.tpl.yml > node3.yml; cat node3.yml
- sed 's|_IMAGE_NAME_|'"${CI_REGISTRY_IMAGE}/prod"'|g; s|_VERSION_|'"${CI_PIPELINE_ID}"'|g' seed1.tpl.yml > seed1.yml; cat seed1.yml
- wget https://storage.googleapis.com/kubernetes-release/release/v1.13.3/bin/linux/amd64/kubectl && chmod +x ./kubectl - wget https://storage.googleapis.com/kubernetes-release/release/v1.13.3/bin/linux/amd64/kubectl && chmod +x ./kubectl
- wget https://github.com/garethr/kubeval/releases/download/0.7.3/kubeval-linux-amd64.tar.gz && tar xvf kubeval-linux-amd64.tar.gz && ./kubeval node.yml - wget https://github.com/garethr/kubeval/releases/download/0.7.3/kubeval-linux-amd64.tar.gz && tar xvf kubeval-linux-amd64.tar.gz
- ./kubectl apply -f node.yml - ./kubeval node1.yml && ./kubeval node2.yml && ./kubeval node3.yml && ./kubeval seed1.yml
- ./kubectl apply -f node1.yml
- ./kubectl apply -f node2.yml
- ./kubectl apply -f node3.yml
- ./kubectl apply -f seed1.yml
environment: environment:
name: ${CI_COMMIT_REF_NAME} name: ${CI_COMMIT_REF_NAME}
url: https://xvideos.com url: https://xvideos.com
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment