Commit dd0f82e1 authored by Anton Borisov's avatar Anton Borisov

Update .gitlab-ci.yml

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