-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
138 lines (126 loc) · 3.44 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
stages:
- prepare
- lint
- build
- tests
- sentry
- deploy
include:
# Prepare
- project: 'intern/runner-templates'
ref: "5.0"
file: '/symfony/install-dependencies.yml'
- project: 'intern/runner-templates'
ref: "5.0"
file: '/yarn/install-js-dependencies.yml'
# Lint
- project: 'intern/runner-templates'
ref: "5.0"
file: '/php/cve-check.yml'
- project: 'intern/runner-templates'
ref: "5.0"
file: '/php/composer-require-checker.yml'
- project: 'intern/runner-templates'
ref: "5.0"
file: '/php/composer-unused.yml'
- project: 'intern/runner-templates'
ref: "5.0"
file: '/shell/shellcheck.yml'
- project: 'intern/runner-templates'
ref: "5.0"
file: '/php/phan.yml'
- project: 'intern/runner-templates'
ref: "5.0"
file: '/yaml/yamllint.yml'
- project: 'intern/runner-templates'
ref: "5.0"
file: '/yarn/audit.yml'
- project: 'intern/runner-templates'
ref: "5.0"
file: '/sass/sasslint.yml'
- project: 'intern/runner-templates'
ref: "3.5"
file: '/vue/vuelint.yml'
# Build
- project: 'intern/runner-templates'
ref: "5.0"
file: '/yarn/build-prod.yml'
# Tests
- project: 'intern/runner-templates'
ref: "5.0"
file: '/php/phpunit.yml'
- project: 'intern/runner-templates'
ref: "5.0"
file: '/symfony/check-security.yml'
- project: 'intern/runner-templates'
ref: "5.0"
file: '/symfony/check-doctrine-mapping.yml'
# Sentry
- project: 'intern/runner-templates'
ref: "5.0"
file: '/sentry/sentry.yml'
# Deploy
- project: 'intern/runner-templates'
ref: "5.0"
file: '/deploy/deploy.yml'
composer-require-checker:
before_script:
- curl -JOL https://github.com/maglnet/ComposerRequireChecker/releases/download/${COMPOSER_REQUIRE_CHECKER_VERSION}/composer-require-checker.phar
# Remove files that are not used but break due to the usage of reserved keywords
- rm vendor/jms/serializer/src/Annotation/ReadOnly.php
sentry-release-staging:
only:
# Effectively disable the job, directly deploy production
- external
sentry-release-production:
script:
- sentry-cli releases new -p ${SENTRY_PROJECT} ${SENTRY_PROJECT}@${CI_COMMIT_SHA:0:8}
- sentry-cli releases set-commits --commit "intern / ${SENTRY_PROJECT}@${CI_COMMIT_SHA}" ${SENTRY_PROJECT}@${CI_COMMIT_SHA:0:8}
- sentry-cli releases finalize ${SENTRY_PROJECT}@${CI_COMMIT_SHA:0:8}
- sentry-cli releases deploys ${SENTRY_PROJECT}@${CI_COMMIT_SHA:0:8} new --env prod
only:
- master
except:
- schedules
deploy-staging:
only:
# Effectively disable the job, directly deploy production
- external
deploy-production:
only:
- master
except:
- schedules
deploy-docker:
stage: deploy
image: docker:latest
resource_group: deploy-docker
interruptible: true
needs:
- job: install-dependencies
artifacts: true
- job: build-assets
artifacts: true
cache:
key:
files:
- composer.lock
prefix: ${CI_PROJECT_PATH_SLUG}_composer
paths:
- vendor/
policy: pull
before_script:
- docker pull docker:latest
script:
- export VERSION=${CI_COMMIT_TAG:-latest}
- echo "Building drenso/argus:$VERSION"
- docker build -t drenso/argus:$VERSION -f docker/argus/Dockerfile .
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- docker push drenso/argus:$VERSION
tags:
- docker-build
only:
- master
- tags
except:
- schedules