-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
32 lines (27 loc) · 958 Bytes
/
.gitlab-ci.yml
File metadata and controls
32 lines (27 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
image: docker:stable
services:
- docker:dind
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
stages:
- build
- run
build-docker:
stage: build
script:
- docker build -t programaker-docs .
- docker tag programaker-docs $CI_REGISTRY/programaker-project/programaker-docs:$CI_COMMIT_SHA
- docker push $CI_REGISTRY/programaker-project/programaker-docs:$CI_COMMIT_SHA
only:
- master
publish-docs:
stage: run
script:
# Install kubectl
- apk update && apk add --no-cache curl
- curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
- chmod +x kubectl
# Run kubeconfig
- KUBECONFIG="$PROGRAMAKER_DOCS_CI_KUBECONFIG" ./kubectl -n plaza-production set image deployment/plaza-docs docs=$CI_REGISTRY/programaker-project/programaker-docs:$CI_COMMIT_SHA
only:
- master