forked from jtl-software/connector-shopware5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
83 lines (74 loc) · 1.77 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
variables:
FF_USE_FASTZIP: 1
COMPOSER_CACHE_DIR: ${CI_PROJECT_DIR}/.composer-cache
default:
image: gitlab.jtl-software.com:4567/connector/connector-utils/ci-docker/php/cli:8.0
tags:
- docker
before_script:
- composer update --no-interaction --no-progress
cache:
key: vendor
paths:
- vendor
- .composer-cache
- composer.lock
include:
- project: 'connector/connector-utils/CI-Templates'
file:
- 'auto-create-mr/ci.yaml'
- 'code-quality/ci.yaml'
- 'update-changelog/ci.yaml'
stages:
- createMR
- test
- build
- deploy
- extract-changelog
- update-changelog
code_quality:
before_script: []
test:unit:
parallel:
matrix:
- VERSION: [ '7.2','7.3','7.4','8.0' ]
image: gitlab.jtl-software.com:4567/connector/connector-utils/ci-docker/php/cli:${VERSION}
stage: test
script:
- vendor/bin/phpunit --configuration phpunit.xml --log-junit junit.xml
artifacts:
reports:
junit: junit.xml
build:
image: gitlab.jtl-software.com:4567/connector/connector-utils/ci-docker/php/cli:7.4
stage: build
only:
- tags
script:
- composer update --no-dev --no-interaction --no-progress
- php ./vendor/bin/phing release -Dversion=$CI_COMMIT_TAG -Dtmpdir=.
artifacts:
paths:
- jtl-connector-*.zip
deploy:
stage: deploy
only:
- tags
needs:
- build
script:
- php upload.php "$SW_USERNAME" "$SW_PASSWORD" "$CI_COMMIT_TAG"
extractChangelog:
stage: extract-changelog
when: on_success
variables:
CHANGELOG_FILE: 'CHANGELOG.md'
CHANGELOG_JSON: 'shopware5.json'
CONTEXT_FILE: '/tmp/target/storage/systems/shopware5.json'
updateChangelogRepo:
only:
- tags
stage: update-changelog
when: on_success
variables:
COPY_FILE: "shopware5.json"