-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
55 lines (48 loc) · 1.53 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
# based on the template from
# https://gitlab.com/gitlab-org/gitlab-foss/-/blob/master/lib/gitlab/ci/templates/Maven.gitlab-ci.yml
image: maven:3.6-jdk-11
cache:
paths:
- .m2/repository
# For merge requests do not `deploy` but only run `verify`.
.verify: &verify
stage: test
script:
- './mvnw $MAVEN_CLI_OPTS generate-sources'
- './mvnw $MAVEN_CLI_OPTS verify'
except:
- main
# Verify merge requests
verify:jdk11:
<<: *verify
# deploy using .gitlab_ci_settings.xml as maven settings
# see https://gitlab.com/help/user/packages/maven_repository/index.md#creating-maven-packages-with-gitlab-cicd-using-maven
deploy:jdk11:
script:
- ./mvnw -Drevision=$CI_COMMIT_TAG -Dchangelist="" generate-sources
- ./mvnw -Drevision=$CI_COMMIT_TAG -Dchangelist="" verify
- ./mvnw -Drevision=$CI_COMMIT_TAG -Dchangelist="" deploy -s .gitlab_ci_settings.xml
- ./mvnw -Drevision=$CI_COMMIT_TAG -Dchangelist="" help:evaluate -Dexpression=settings.localRepository -q -DforceStdout
artifacts:
paths:
- bindings/target
- oxygen/target
only:
# https://gitlab.com/gitlab-org/gitlab-foss/-/issues/27818
variables:
- $CI_COMMIT_TAG =~ /^\d+.\d+.\d+$/
pages:
image: busybox:latest
stage: deploy
script:
- mkdir -p public
- ls -la
- cp -v oxygen/target/*-plugin.jar public/
- cp -v oxygen/target/descriptor.xml public/
artifacts:
paths:
- public
only:
# https://gitlab.com/gitlab-org/gitlab-foss/-/issues/27818
variables:
- $CI_COMMIT_TAG =~ /^\d+.\d+.\d+$/