TSK-1492: automatically update taskana dependency for wildfly during release build
This commit is contained in:
parent
fca56cfc10
commit
4883737e71
|
@ -81,7 +81,10 @@ jobs:
|
|||
- stage: Test
|
||||
install: skip
|
||||
env: DB=POSTGRES_10
|
||||
script: ci/test.sh "$DB" && export JAVA_HOME=/usr/local/lib/jvm/openjdk8 && ci/test.sh WILDFLY
|
||||
script: ci/test.sh "$DB"
|
||||
&& ./mvnw -q install -f history -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip -Dasciidoctor.skip
|
||||
&& export JAVA_HOME=/usr/local/lib/jvm/openjdk8
|
||||
&& ci/test.sh WILDFLY
|
||||
before_cache: rm -rf "$HOME/.m2/repository/pro/taskana"
|
||||
|
||||
- stage: Test
|
||||
|
@ -123,7 +126,9 @@ jobs:
|
|||
before_cache: rm -rf "$HOME/.m2/repository/pro/taskana"
|
||||
# travis_terminate is necessary since after_success is a job phase which can change the build result.
|
||||
# it is not documented, so this is a little hack. see: https://docs.travis-ci.com/user/job-lifecycle/#breaking-the-build
|
||||
after_success: ci/change_version.sh -i -m . && ci/commitPoms.sh || travis_terminate 1
|
||||
after_success: ci/change_version.sh -i -m .
|
||||
&& ci/update_taskana_dependency_for_wildfly.sh
|
||||
&& ci/commitPoms.sh || travis_terminate 1
|
||||
deploy:
|
||||
provider: cloudfoundry
|
||||
username: $BLUEMIX_ACCOUNT
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
set -e #fail fast
|
||||
|
||||
#H Usage:
|
||||
#H change_version.sh -h | change_version.sh --help
|
||||
#H %FILE% -h | %FILE% --help
|
||||
#H
|
||||
#H prints this help and exits
|
||||
#H
|
||||
#H change_version.sh <-m modules...> [-i]
|
||||
#H %FILE% <-m modules...> [-i]
|
||||
#H
|
||||
#H if a release version exists (extracted from TRAVIS_TAG)
|
||||
#H the maven versions of all modules will be changed to the given release version.
|
||||
|
@ -23,7 +23,7 @@ set -e #fail fast
|
|||
# Arguments:
|
||||
# $1: exit code
|
||||
function helpAndExit() {
|
||||
cat "$0" | grep "^#H" | cut -c4-
|
||||
cat "$0" | grep "^#H" | cut -c4- | sed -e "s/%FILE%/$(basename "$0")/g"
|
||||
exit "$1"
|
||||
}
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
set -e # fail fast
|
||||
|
||||
#H Usage:
|
||||
#H commitPoms.sh -h | commitPoms.sh --help
|
||||
#H %FILE% -h | %FILE% --help
|
||||
#H
|
||||
#H prints this help and exits
|
||||
#H
|
||||
#H commitPoms.sh [additional files...]
|
||||
#H %FILE% [additional files...]
|
||||
#H
|
||||
#H commits and pushes all *.pom files (+ additional files)
|
||||
#H
|
||||
|
@ -21,7 +21,7 @@ set -e # fail fast
|
|||
# Arguments:
|
||||
# $1: exit code
|
||||
function helpAndExit() {
|
||||
cat "$0" | grep "^#H" | cut -c4-
|
||||
cat "$0" | grep "^#H" | cut -c4- | sed -e "s/%FILE%/$(basename "$0")/g"
|
||||
exit "$1"
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/bin/bash
|
||||
set -e # fail fast
|
||||
#H Usage:
|
||||
#H compile.sh -h | compile.sh --help
|
||||
#H %FILE% -h | %FILE% --help
|
||||
#H
|
||||
#H prints this help and exits
|
||||
#H
|
||||
#H compile.sh <module>
|
||||
#H %FILE% <module>
|
||||
#H
|
||||
#H compiles the taskana application. Does not package and install artifacts.
|
||||
#H
|
||||
|
@ -18,7 +18,7 @@ set -e # fail fast
|
|||
# Arguments:
|
||||
# $1: exit code
|
||||
function helpAndExit() {
|
||||
cat "$0" | grep "^#H" | cut -c4-
|
||||
cat "$0" | grep "^#H" | cut -c4- | sed -e "s/%FILE%/$(basename "$0")/g"
|
||||
exit "$1"
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
set -e #fail fast
|
||||
|
||||
#H Usage:
|
||||
#H %FILE% -h | %FILE% --help
|
||||
#H
|
||||
#H prints this help and exits
|
||||
#H
|
||||
#H %FILE%
|
||||
#H
|
||||
#H if a release version exists (extracted from TRAVIS_TAG environment variable)
|
||||
#H the taskana dependency in our wildfly example project will be incremented to the new version snapshot.
|
||||
#H
|
||||
# Arguments:
|
||||
# $1: exit code
|
||||
function helpAndExit() {
|
||||
cat "$0" | grep "^#H" | cut -c4- | sed -e "s/%FILE%/$(basename "$0")/g"
|
||||
exit "$1"
|
||||
}
|
||||
|
||||
# takes a version (without leading v) and increments its
|
||||
# last number by one.
|
||||
# Arguments:
|
||||
# $1: version (without leading v) which will be patched
|
||||
# Return:
|
||||
# version with last number incremented
|
||||
function increment_version() {
|
||||
if [[ ! "$1" =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then
|
||||
echo "'$1' does not match tag pattern." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "${1%\.*}.$(expr ${1##*\.*\.} + 1)"
|
||||
}
|
||||
|
||||
function main() {
|
||||
[[ "$1" == '-h' || "$1" == '--help' ]] && helpAndExit 0
|
||||
if [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
REL=$(dirname "$0")
|
||||
FILES=(
|
||||
$REL/../rest/taskana-rest-spring-example-wildfly/pom.xml
|
||||
)
|
||||
for file in ${FILES[@]}; do
|
||||
sed -i "s/[0-9]\+\.[0-9]\+\.[0-9]\+-SNAPSHOT/$(increment_version "${TRAVIS_TAG##v}")-SNAPSHOT/g" $file
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
|
@ -11,7 +11,7 @@
|
|||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-rest-parent</artifactId>
|
||||
<version>4.2.1-SNAPSHOT</version>
|
||||
<version>4.3.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ import pro.taskana.workbasket.rest.models.WorkbasketSummaryRepresentationModel;
|
|||
|
||||
public class AbstractAccTest {
|
||||
|
||||
protected static final String DEPENDENCY_VERSION = "4.1.1-SNAPSHOT";
|
||||
private static final String AUTHORIZATION_TEAMLEAD_1 = "Basic dGVhbWxlYWQtMTp0ZWFtbGVhZC0x";
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,7 +47,7 @@ public class TaskanaWildflyWithHistoryLoggerEnabledTest extends AbstractAccTest
|
|||
MavenCoordinates.createCoordinate(
|
||||
"pro.taskana.history",
|
||||
"taskana-loghistory-provider",
|
||||
DEPENDENCY_VERSION,
|
||||
"${project.version}",
|
||||
PackagingType.JAR,
|
||||
null);
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ public class TaskanaWildflyWithSimpleHistoryAndHistoryLoggerEnabledTest extends
|
|||
MavenCoordinates.createCoordinate(
|
||||
"pro.taskana.history",
|
||||
"taskana-simplehistory-rest-spring",
|
||||
DEPENDENCY_VERSION,
|
||||
"${project.version}",
|
||||
PackagingType.JAR,
|
||||
null);
|
||||
|
||||
|
@ -64,7 +64,7 @@ public class TaskanaWildflyWithSimpleHistoryAndHistoryLoggerEnabledTest extends
|
|||
MavenCoordinates.createCoordinate(
|
||||
"pro.taskana.history",
|
||||
"taskana-loghistory-provider",
|
||||
DEPENDENCY_VERSION,
|
||||
"${project.version}",
|
||||
PackagingType.JAR,
|
||||
null);
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ public class TaskanaWildflyWithSimpleHistoryEnabledTest extends AbstractAccTest
|
|||
MavenCoordinates.createCoordinate(
|
||||
"pro.taskana.history",
|
||||
"taskana-simplehistory-rest-spring",
|
||||
DEPENDENCY_VERSION,
|
||||
"${project.version}",
|
||||
PackagingType.JAR,
|
||||
null);
|
||||
|
||||
|
|
Loading…
Reference in New Issue