-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
62 lines (57 loc) · 1.39 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
image: "${GLOBAL_IMAGE_NAME}:${GLOBAL_IMAGE_TAG}"
# https://gitlab.com/patoperpetua/pipelines-npm/tree/master/src
include:
- project: 'singletonsd/pipelines/npm'
file: '/src/.gitlab-ci-main.yml'
variables:
GLOBAL_IMAGE_NAME: "node"
GLOBAL_IMAGE_TAG: "8-alpine"
TEST_STATIC_ALL: "true"
TEST_DYNAMIC_EXECUTE_8: "true"
ORIGINAL_REPOSITORY: ravimosharksas/apis/client/documentation
stages:
- install
- test_static
- build
- test_dynamic
- package
- deploy
- notify
pages:
stage: deploy
before_script:
- if [ "${CI_COMMIT_REF_NAME}" == "master" ]; then
export TARGET_FOLDER=public;
else
export TARGET_FOLDER=public/${CI_COMMIT_REF_NAME};
fi
- echo "Saving html into ${TARGET_FOLDER} directory..."
script:
- rm -rf "${TARGET_FOLDER}"
- mkdir -p "${TARGET_FOLDER}"
- cp -r dist/* "${TARGET_FOLDER}"
artifacts:
paths:
- public
only:
refs:
- master
changes:
- src/**/*
- .gitlab-ci.yml
- "*.json"
trigger_libs:
stage: notify
before_script:
- apk add --no-cache curl
script:
- "curl -X POST -F token=${TRIGGER_RAVIMO_API_CLIENT_LIB_ANGULAR} -F ref=master https://gitlab.com/api/v4/projects/14826252/trigger/pipeline"
only:
refs:
- master
changes:
- src/**/*
- .gitlab-ci.yml
- "*.json"
variables:
- $CI_PROJECT_PATH == $ORIGINAL_REPOSITORY