1 | image: hub.xxx.cc/library/base-node:1.0.2
|
2 |
|
3 | variables:
|
4 | GROUP: library
|
5 | DOCKER_DRIVER: overlay
|
6 | DC_REGISTRY_PROXY: https://harbor-proxy.xxx.cc
|
7 |
|
8 | stages:
|
9 | - deploy
|
10 |
|
11 | deploy_job:
|
12 | stage: deploy
|
13 | only:
|
14 | - ci
|
15 | before_script:
|
16 | - export PROJECT_IMAGE_NAME=$(cat package.json | grep name | head -1 | awk -F "[\"]" '/name/{print$4}')
|
17 | # - export BUILD_TAG=$(cat package.json | grep version | head -1 | awk -F "[\"]" '/version/{print$4}')
|
18 | - export BUILD_TAG=$CI_COMMIT_TAG
|
19 | - echo $BUILD_TAG
|
20 | script:
|
21 |
|
22 | - npm install --registry=https://npm.xxx.cc/repository/npm-all/
|
23 | - npm run test
|
24 | - npm run build
|
25 | - npm config set //npm.xxx.cc/repository/npm-inner/:_authToken=${INNER_TOKEN}
|
26 | - npm publish --verbose
|
27 | - npm run demo
|
28 | - curl -o ci-tool https://gitlab.xxx.cc/DevOpsGroup/ci-common/raw/master/ci-tool?inline=false
|
29 | - chmod +x ci-tool && ./ci-tool run -g $GROUP -p $PROJECT_IMAGE_NAME --other-tags="latest"
|
30 | cache:
|
31 | paths:
|
32 | - node_modules/
|
33 | tags:
|
34 | - rancher_docker |
\ | No newline at end of file |