-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
95 lines (83 loc) · 1.79 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
default:
image: '$IMAGE_URL'
retry:
max: 2
stages:
- lint
- build
- validate
- deploy
- release
lint:php:
stage: lint
before_script:
- composer install
script:
- ./vendor/bin/parallel-lint --exclude vendor/ .
lint:php-codestyle:
stage: lint
before_script:
- composer install
script:
- ./vendor/bin/php-cs-fixer fix -v --dry-run --using-cache=no
lint:php-stan:
stage: lint
before_script:
- composer install
script:
- ./vendor/bin/phpstan --no-progress --memory-limit="2G" --error-format=gitlab > phpstan-report.json || (cat phpstan-report.json && exit 1)
lint:rector:
stage: lint
before_script:
- composer install
script:
- ./vendor/bin/rector process --no-progress-bar --dry-run
lint:composer:
stage: lint
script:
- composer validate --no-interaction --strict
lint:secretsscan:
image: '$IMAGE_URL_PYTHON'
stage: lint
script:
- ci/scan_secrets.sh
build:phar:
stage: build
before_script:
- composer global require humbug/box
- export PATH=/home/transip/.composer/vendor/bin:$PATH
script:
- composer install --no-dev --no-interaction --no-progress
- box compile
artifacts:
expire_in: 1 hour
paths:
- tipctl.phar
validate:tag-message:
stage: validate
only:
- tags
script:
- ci/validate_tag_message.sh $CI_COMMIT_TAG
validate:tag-version-consistency:
stage: validate
only:
- tags
script:
- composer dump-autoload
- php ci/ValidateTagVersionConsistency.php $CI_COMMIT_TAG
deploy:create-github-deploy:
stage: deploy
only:
- tags
script:
- ci/sync_to_github.sh
release:create-github-release:
image: '$IMAGE_URL_PYTHON'
stage: release
only:
- tags
except:
- merge_requests
script:
- ci/release_to_github.sh $CI_COMMIT_TAG ./tipctl.phar