-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy path.gitlab-ci.yml
37 lines (32 loc) · 1.26 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
34
35
36
37
image: registry.cn-shanghai.aliyuncs.com/c7n/cibase:0.10.0
stages:
- docker_build
- broken_link_check
docker_build:
stage: docker_build
script:
- docker build -t ${DOCKER_REGISTRY}/${GROUP_NAME}/${PROJECT_NAME}:${CI_COMMIT_TAG} .
- docker tag ${DOCKER_REGISTRY}/${GROUP_NAME}/${PROJECT_NAME}:${CI_COMMIT_TAG} ${DOCKER_REGISTRY}/${CI_PROJECT_PATH}:${CI_BUILD_REF_NAME}
- docker push ${DOCKER_REGISTRY}/${GROUP_NAME}/${PROJECT_NAME}:${CI_COMMIT_TAG}
- docker push ${DOCKER_REGISTRY}/${CI_PROJECT_PATH}:${CI_BUILD_REF_NAME}
- chart_build
broken_link_check:
services:
- ${DOCKER_REGISTRY}/${CI_PROJECT_PATH}:${CI_BUILD_REF_NAME}
stage: broken_link_check
script:
- npm install cnpm -g --registry=https://r.npm.taobao.org
- cnpm config set unsafe-perm true
- cnpm install broken-link-checker -g
- blc "http://localhost/zh/" -roe --exclude "http://localhost/en/"
.auto_devops: &auto_devops |
http_status_code=`curl -o .auto_devops.sh -s -m 10 --connect-timeout 10 -w %{http_code} "${CHOERODON_URL}/devops/ci?token=${Token}&type=front"`
if [ "$http_status_code" != "200" ]; then
cat .auto_devops.sh
exit 1
fi
source .auto_devops.sh
before_script:
- git submodule sync --recursive
- git submodule update --init --recursive --remote
- *auto_devops