-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbitbucket-pipelines.yml
72 lines (71 loc) · 2.42 KB
/
bitbucket-pipelines.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
# bitbucket-pipelines.yml - Bitbucket Pipelines configuration
# Copyright (C) 2016-2018 Kaz Nishimura
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and
# this notice are preserved. This file is offered as-is, without any warranty.
# See <https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html>
# for details.
---
definitions:
caches:
openj9: /root/javasharedresources
steps:
- step: &test
name: Test
caches:
- maven
- openj9
script:
- export OPENJ9_JAVA_OPTIONS="-Xtune:virtualized"
- export MAVEN_OPTS="-Xgcpolicy:optthruput -Xshareclasses"
- mvn -B -s etc/settings.xml ${OSSRH_USERNAME+-P ossrh} test
- step: &deploy
name: Deploy
caches:
- maven
- openj9
script:
- apt-get update --quiet=2
- apt-get install --quiet=2 --no-install-recommends gpg gpg-agent
- export GNUPGHOME=`mktemp -d`
- sh etc/gpginit.sh
- export OPENJ9_JAVA_OPTIONS="-Xtune:virtualized"
- export MAVEN_OPTS="-Xgcpolicy:optthruput -Xshareclasses"
- mvn -B -s etc/settings.xml ${OSSRH_USERNAME+-P ossrh} -Dmaven.deploy.skip deploy
artifacts:
- target/*
image: adoptopenjdk/maven-openjdk8-openj9
pipelines:
branches:
default:
- step: *test
production:
- step:
deployment: production
caches:
- maven
script:
- apt-get update --quiet=2
- apt-get install --quiet=2 --no-install-recommends gpg gpg-agent
- export GNUPGHOME=`mktemp -d`
- sh etc/gpginit.sh
- export MAVEN_OPTS="-Xquickstart"
- mvn -B -s etc/settings.xml ${OSSRH_USERNAME+-P ossrh} -Dmaven.deploy.skip deploy
bookmarks:
staging:
- step:
deployment: staging
caches:
- maven
script:
- apt-get update --quiet=2
- apt-get install --quiet=2 --no-install-recommends gpg gpg-agent
- export GNUPGHOME=`mktemp -d`
- sh etc/gpginit.sh
- export MAVEN_OPTS="-Xquickstart"
- mvn -B -s etc/settings.xml ${OSSRH_USERNAME+-P ossrh} -Dmaven.deploy.skip deploy
deployment/test:
- step:
<<: *deploy
deployment: test