forked from ctco/cukes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
71 lines (67 loc) · 2.33 KB
/
wercker.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
box: maven:3.5-jdk-8
test:
steps:
- script:
name: maven test
code: |
mvn --batch-mode test
deploy:
steps:
- install-packages:
packages: secure-delete gnupg2 gnupg-agent
- script:
name: import gpg keys
code: |
shopt -s xpg_echo
echo $GPGKEY_PUB > ~/gpgkey_pub.gpg
gpg2 --import --no-tty ~/gpgkey_pub.gpg
echo $GPGKEY_SEC > ~/gpgkey_sec.gpg
gpg2 --import --batch --no-tty ~/gpgkey_sec.gpg
echo $GPG_AGENT_CONFIG > ~/.gnupg/gpg-agent.conf
srm -vz ~/gpgkey_sec.gpg ~/gpgkey_pub.gpg
- script:
name: saving settings.xml
code: |
mkdir -p ~/.m2
shopt -s xpg_echo
echo $MAVEN_SETTINGS > ~/.m2/settings.xml
- script:
name: deploy snapshot
code: |
mvn --batch-mode -Dmaven.test.skip=true deploy -P release -s ~/.m2/settings.xml
release:
steps:
- install-packages:
packages: secure-delete gnupg2 gnupg-agent
- add-ssh-key:
keyname: GITHUB_KEY
- add-to-known_hosts:
hostname: github.com
fingerprint: SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
type: rsa
local: true
- script:
name: import gpg keys
code: |
shopt -s xpg_echo
echo $GPGKEY_PUB > ~/gpgkey_pub.gpg
gpg2 --import --no-tty ~/gpgkey_pub.gpg
echo $GPGKEY_SEC > ~/gpgkey_sec.gpg
gpg2 --import --batch --no-tty ~/gpgkey_sec.gpg
echo $GPG_AGENT_CONFIG > ~/.gnupg/gpg-agent.conf
srm -vz ~/gpgkey_sec.gpg ~/gpgkey_pub.gpg
- script:
name: saving settings.xml
code: |
mkdir -p ~/.m2
shopt -s xpg_echo
echo $MAVEN_SETTINGS > ~/.m2/settings.xml
- script:
name: run release
code: |
git checkout $WERCKER_GIT_BRANCH
git reset --hard $WERCKER_GIT_COMMIT
git remote set-url origin [email protected]:ctco/cukes.git
git config --global user.name "C.T.Co SCM"
git config --global user.email "[email protected]"
mvn --batch-mode -Dmaven.test.skip=true -DuseReleaseProfile=false -DscmCommentPrefix="[maven-release-plugin][skip ci]" --batch-mode release:prepare compile exec:java@create-docs scm:add scm:checkin release:perform -P release -s ~/.m2/settings.xml