-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
83 lines (76 loc) · 1.93 KB
/
.gitlab-ci.yml
File metadata and controls
83 lines (76 loc) · 1.93 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
include:
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/collect@$CI_COMMIT_SHA
inputs:
artifacts:
- name: "Example JSON 1"
path: "report1.json"
- name: "Example JSON 2"
path: "report2.json"
- name: "Build Output"
path: "dist/bundle.js"
- name: "Test Results"
path: "test-results.xml"
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/report@$CI_COMMIT_SHA
inputs:
stage: report
api_token: $GITLAB_API_TOKEN
commit_comment: true
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/connect@$CI_COMMIT_SHA
inputs:
tailscale_auth_key: $TAILSCALE_AUTH_KEY
install_tailscale: true
install_ssh_server: true
generate_ssh_key: true
stages:
- generate
- report
- release
first-json:
stage: generate
extends: .stoat-collect
script:
- echo '{"message":"hello from job 1"}' > report1.json
artifacts:
paths:
- report1.json
second-json:
stage: generate
extends: .stoat-collect
script:
- echo '{"random":12345}' > report2.json
artifacts:
paths:
- report2.json
build-app:
stage: generate
extends: .stoat-collect
script:
- mkdir -p dist
- echo "console.log('app');" > dist/bundle.js
artifacts:
paths:
- dist/
test-suite:
stage: generate
extends: .stoat-collect
script:
- echo '<?xml version="1.0"?><testsuites></testsuites>' > test-results.xml
artifacts:
paths:
- test-results.xml
test-connect:
stage: generate
extends: .stoat-connect
script:
- echo "Testing Tailscale connect component"
# To test the connect component, increase the sleep time as needed
- sleep 5
create-release:
stage: release
image: registry.gitlab.com/gitlab-org/cli:latest
script: echo "Creating release $CI_COMMIT_TAG"
rules:
- if: $CI_COMMIT_TAG
release:
tag_name: $CI_COMMIT_TAG
description: "Release $CI_COMMIT_TAG of components in $CI_PROJECT_PATH"