Commit dd0f82e1 authored by Anton Borisov's avatar Anton Borisov

Update .gitlab-ci.yml

parent 8f3cad25
Pipeline #117 failed
stages:
- k8s
- build
- k8s_test
- deploy2test_and_tests
k8s:
stage: k8s
build:
stage: build
image: docker:stable
services:
- docker:dind
......@@ -12,21 +12,19 @@ k8s:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
script:
- 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 node1.yml
#- ./kubectl apply -f node1.yml
- ./kubectl get po --all-namespaces
# allow_failure: true
- docker login -u "gitlab-ci-token" -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
- docker build -t ${CI_REGISTRY_IMAGE}:${CI_PIPELINE_ID} .
- docker push ${CI_REGISTRY_IMAGE}:${CI_PIPELINE_ID}
environment:
name: dev
name: ${CI_COMMIT_REF_NAME}
url: https://xvideos.com
only:
- test
- dev
tags:
- kubernetes
- buidl1-dind
build:
stage: build
k8s_test:
stage: k8s
image: docker:stable
services:
- docker:dind
......@@ -34,16 +32,18 @@ build:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
script:
- docker login -u "gitlab-ci-token" -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
- docker build -t ${CI_REGISTRY_IMAGE} .
- docker push ${CI_REGISTRY_IMAGE}
- sed 's|_IMAGE_NAME_|'"${CI_REGISTRY_IMAGE}"'|g; s|_VERSION_|'"${CI_PIPELINE_ID}"'|g' app.tpl.yml > app.yml; cat app.yml
- 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 app.yml
- ./kubectl apply -f app.yml
# allow_failure: true
environment:
name: ${CI_COMMIT_REF_NAME}
url: https://xvideos.com
only:
- test
tags:
- buidl1-dind
- kubernetes
test:
stage: deploy2test_and_tests
......
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