This repository has been archived by the owner on Jul 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
89 lines (88 loc) · 4.22 KB
/
.travis.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
addons:
apt:
packages:
- aria2
#- gnupg
- gnupg2
- graphviz
- openssl
- whois
before_install:
- set -ex;
#- whois $(curl ipinfo.io/ip);
# More options -> Settings -> Environment variables -> Add
# CI_OPT_GPG_KEYNAME
# CI_OPT_GPG_PASSPHRASE
# CI_OPT_OSSRH_NEXUS2_PASS
# CI_OPT_OSSRH_NEXUS2_USER
# on gpg-2.1.11 'pinentry-mode loopback' is invalid option
#- printf '%s\n' "pinentry-mode loopback" | tee -a ~/.gnupg/gpg.conf;
- export GPG_TTY=$(tty || echo "");
gpg2 --use-agent --batch=true --version;
mkdir -p ~/.gnupg && chmod 700 ~/.gnupg;
printf '%s\n' "use-agent" | tee ~/.gnupg/gpg.conf;
printf '%s\n' "allow-loopback-pinentry" | tee ~/.gnupg/gpg-agent.conf;
echo RELOADAGENT | gpg-connect-agent;
openssl aes-256-cbc -a -d -k ${CI_OPT_GPG_PASSPHRASE} -md md5 -in codesigning.asc.enc -out codesigning.asc;
ls -ahl;
if [[ -f codesigning.pub ]]; then
gpg2 --use-agent --batch=true --yes --import codesigning.pub;
gpg2 --use-agent --batch=true --list-keys;
fi;
if [[ -f codesigning.pub ]]; then
gpg2 --use-agent --batch=true --yes --import codesigning.asc;
elif [[ -z "$(gpg2 --use-agent --list-secret-keys | { grep ${CI_OPT_GPG_KEYNAME} || true; })" ]]; then
gpg2 --use-agent --batch=true --yes --fast-import codesigning.asc;
fi;
gpg2 --use-agent --batch=true --list-secret-keys;
gpg2 --use-agent --batch=true --list-keys;
printf 'trust\n5\ny\n' | gpg2 --use-agent --batch=true --command-fd 0 --edit-key ${CI_OPT_GPG_KEYNAME};
- if [[ -z "${MAVEN_OPTS}" ]]; then export MAVEN_OPTS="-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -Dgit.branch=${TRAVIS_BRANCH} -Dprofile=title -DprofileFormat=JSON,HTML"; fi;
## see: https://github.com/travis-ci/travis.rb
#- if [[ "${CLEAN_TRAVIS_LOGS}" == "true" ]]; then
# ruby -v; gem install travis -v 1.8.10 --no-rdoc --no-ri; travis version;
# travis login --github-token ${CI_OPT_OSSRH_GIT_AUTH_TOKEN} --org;
# LAST_BUILD_NUMBER=$(print '\n' | travis history --limit 10 --org | head -n1 | cut -d" " -f1 | cut -c2-);
# echo "LAST_BUILD_NUMBER [${LAST_BUILD_NUMBER}]";
# for bn in $(seq 1 ${LAST_BUILD_NUMBER} ); do print '\n' | travis logs ${bn} --delete --force --org; done;
# fi;
branches:
only:
#- master # do nothing on master branch
- develop # snapshots on develop branch
- /^feature\/.*$/ # build and test on feature branches
- /^hotfix\/.*$/ # release on hotfix branches
- /^release\/.*$/ # release on release branches
- /^support\/.*$/ # release on support branches
#- /^v\d+\.\d+(\.\d+)?(-\S*)?/ # build and publish a github release (can skip tests here) or do nothing on version tags
cache:
bundler: true
directories:
- "$HOME/.cache"
- "$HOME/.gradle"
- "$HOME/.m2/repository"
- "$HOME/.m2/wrapper"
- "$HOME/.sonar/cache"
dist: xenial
env:
global:
- MAVEN_SKIP_RC=true
group: edge
install: true
jdk:
- openjdk8
#language: java
language: ruby
rvm:
- 2.0
script:
# When prefixed with `travis_wait 30`, no log output until it is done.
# see: https://github.com/travis-ci/travis-ci/issues/4190 or https://github.com/HaxeFoundation/hxcpp/issues/709
- while sleep 9m; do echo "=====[ $SECONDS seconds still running ]====="; done &
# ./mvnw -e ${MAVEN_GLOBAL_SETTINGS} -s settings.xml -Dgpg.executable=gpg -Dgpg.loopback=true -Dnexus2.staging=true clean deploy;
- time ./mvnw -e ${MAVEN_GLOBAL_SETTINGS} -s settings.xml -Dgpg.executable=gpg2 -Dgpg.loopback=true -Dnexus2.staging=true clean deploy;
if type -p column > /dev/null; then find .mvn/profiler-report -name "*.json" | xargs cat | jq -r '.projects[]|"module:", .project, "plugins", (.mojos[]|[.mojo,.time]|@tsv)' | column -t; fi; rm -rf .mvn/profiler-report;
time ./mvnw -e ${MAVEN_GLOBAL_SETTINGS} -ntp -s settings.xml -Dcustom.nexus3=https://nexus3.infra.top/nexus/ -Dfast=true -Dinfrastructure=custom -Dmaven.clean.skip=true -Dmaven.install.skip=true -Dmaven.packages.skip=true -Dnexus2.staging=false deploy;
if type -p column > /dev/null; then find .mvn/profiler-report -name "*.json" | xargs cat | jq -r '.projects[]|"module:", .project, "plugins", (.mojos[]|[.mojo,.time]|@tsv)' | column -t; fi; rm -rf .mvn/profiler-report;
- kill %1
sudo: false