-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
33 lines (31 loc) · 1 KB
/
.gitlab-ci.yml
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
33
stages:
- build
#####################################################
# common steps #
#####################################################
.shared_hidden_key: &build_anchor
image: docker:latest
tags:
- docker
services:
- docker:dind
before_script:
- docker version
- docker info
- docker login -u $CI_BUILD_LOGIN -p $CI_BUILD_TOKEN $CI_REGISTRY
after_script:
- docker logout $CI_REGISTRY
#####################################################
# build docker image #
#####################################################
build_staging:
stage: build
<<: *build_anchor
script:
- export SLACK_CHANNEL=${CHANNEL}
- export VK_CONFIRMATION_TOKEN=${CONFIRMATION_TOKEN}
- export SLACK_BOT_SECRET=${SLACK_BOT_SECRET}
- export SLACK_TEXT=${TEXT}
- export SERVER_PATH=${PATH}
- docker build -t ${CI_REGISTRY}/${CI_PROJECT_PATH}:latest --pull .
- docker push ${CI_REGISTRY}/${CI_PROJECT_PATH}:latest