-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
77 lines (67 loc) · 1.7 KB
/
.gitlab-ci.yml
File metadata and controls
77 lines (67 loc) · 1.7 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
image: docker:latest
variables:
CONTAINER_IMAGE: git-registry.emico.nl/$CI_PROJECT_PATH
CONTAINER_IMAGE_HUB: hipex/deploy
DOCKER_DRIVER: overlay2
COMPOSER_CACHE_DIR: composer-cache
stages:
- quality
- build
- test
- release
- publish
services:
- docker:dind
# General extends
.default:
only:
- tags
- merge_requests
include:
- '/gitlab/.gitlab-ci-variables-php.yml'
- '/gitlab/.gitlab-ci-variables-node.yml'
- '/gitlab/.gitlab-ci-build.yml'
- '/gitlab/.gitlab-ci-test.yml'
- '/gitlab/.gitlab-ci-publish.yml'
# Code quality step
quality:dockerfile:
extends: .default
stage: quality
image: hadolint/hadolint:latest-debian
script:
- find . -type f -name "Dockerfile" | xargs --max-lines=1 hadolint --config=hadolint.yaml
# Build include
.build:
extends: .default
stage: build
script:
- ./ci/build.sh
# Test include
.test:
extends: .default
image: docker:latest
stage: test
before_script:
- apk add curl
- curl -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64 && chmod +x container-structure-test-linux-amd64 && mkdir -p $HOME/bin && export PATH=$PATH:$HOME/bin && mv container-structure-test-linux-amd64 $HOME/bin/container-structure-test
script:
- ./ci/test.sh
# Publish include
.publish:
extends: .default
stage: publish
only:
- tags
script:
- ./ci/publish.sh
# Release step
release:
image: registry.hipex.cloud/hipex-services/release-cl
stage: release
script:
- semantic-release
only:
- master
- alpha
- beta
- next