-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPSEXP-715 Use latest openjdk-11 from distro (#6)
* OPSEXP-715 Use latest openjdk-11 from distro * split travis for java into java_config and maven_config * deprecated travis for docker dockermulti
- Loading branch information
Showing
9 changed files
with
51 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,2 @@ | ||
import: | ||
- source: Alfresco/alfresco-build-tools:.travis.java.yml@v1.0.0 | ||
- source: Alfresco/alfresco-build-tools:.travis.docker_login.yml@v1.0.0 | ||
jobs: | ||
include: | ||
- name: build application on openjdk8 | ||
stage: build | ||
jdk: openjdk8 | ||
script: | ||
- travis_wait ${TRAVIS_WAIT_TIMEOUT} mvn ${MAVEN_CLI_OPTS} clean install -Dlogging.root.level=off -Dspring.main.banner-mode=off | ||
if: env(BUILD_JAVA8) = true | ||
- name: build application | ||
stage: build | ||
script: | ||
- travis_wait ${TRAVIS_WAIT_TIMEOUT} mvn ${MAVEN_CLI_OPTS} clean install -Dlogging.root.level=off -Dspring.main.banner-mode=off | ||
- docker build --label "GIT_COMMIT=$TRAVIS_COMMIT" --label "GIT_BRANCH=$BRANCH" --tag "$DOCKER_IMAGE_REPOSITORY:$TRAVIS_BUILD_NUMBER" . | ||
- | | ||
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]] | ||
then | ||
for DOCKER_TAG in $BRANCH $BRANCH-$TRAVIS_BUILD_NUMBER | ||
do | ||
docker tag "$DOCKER_IMAGE_REPOSITORY:$TRAVIS_BUILD_NUMBER" "$DOCKER_REGISTRY/$DOCKER_IMAGE_REPOSITORY:$DOCKER_TAG" | ||
docker push "$DOCKER_REGISTRY/$DOCKER_IMAGE_REPOSITORY:$DOCKER_TAG" | ||
done | ||
else | ||
echo skip scan and push docker image on pull request | ||
fi | ||
before_install: | ||
- source ./build.properties | ||
# DEPRECATED | ||
import: Alfresco/alfresco-build-tools:.travis.java_docker.yml@v1.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,2 @@ | ||
import: | ||
- source: Alfresco/alfresco-build-tools:.travis.library.yml@v1.0.0 | ||
- source: Alfresco/alfresco-build-tools:.travis.docker_login.yml@v1.0.0 | ||
before_script: | ||
- | | ||
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]] | ||
then | ||
export MAVEN_CLI_OPTS="${MAVEN_CLI_OPTS} -Ddocker.tag=${BRANCH}" | ||
fi | ||
echo using MAVEN_CLI_OPTS=$MAVEN_CLI_OPTS | ||
# DEPRECATED | ||
import: Alfresco/alfresco-build-tools:.travis.java_docker.yml@v1.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
import: | ||
- source: Alfresco/alfresco-build-tools:.travis.common.yml@v1.0.0 | ||
language: java | ||
jdk: | ||
- openjdk11 | ||
env: | ||
global: | ||
- MAVEN_CLI_OPTS="$MAVEN_CLI_OPTS --batch-mode --quiet --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true -U" | ||
install: travis_wait $TRAVIS_WAIT_TIMEOUT mvn $MAVEN_CLI_OPTS dependency:resolve dependency:resolve-plugins || true | ||
cache: | ||
directories: | ||
- $HOME/.m2/repository | ||
- source: Alfresco/alfresco-build-tools:.travis.java_config.yml@v1.0.2 | ||
- source: Alfresco/alfresco-build-tools:.travis.maven_config.yml@v1.0.2 | ||
jobs: | ||
include: | ||
- name: build application | ||
stage: build | ||
script: travis_wait $TRAVIS_WAIT_TIMEOUT mvn $MAVEN_CLI_OPTS verify -Dlogging.root.level=off -Dspring.main.banner-mode=off | ||
- name: publish artifacts | ||
stage: publish | ||
script: travis_wait $TRAVIS_WAIT_TIMEOUT mvn $MAVEN_CLI_OPTS source:jar javadoc:jar deploy -DskipTests | ||
before_install: | ||
- mkdir -p $HOME/.m2 | ||
- cp settings.xml $HOME/.m2 | ||
script: travis_wait $TRAVIS_WAIT_TIMEOUT mvn $MAVEN_CLI_OPTS deploy -DskipTests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
os: linux | ||
dist: focal | ||
language: java | ||
jdk: | ||
- openjdk11 | ||
before_install: | ||
- |- | ||
if [[ "$TRAVIS_JDK_VERSION" == "openjdk11" ]] | ||
then | ||
echo "using latest OS provided openjdk11" | ||
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 | ||
export PATH=$JAVA_HOME/bin:$PATH | ||
else | ||
echo "using Travis provided jdk" | ||
fi | ||
which java | ||
java --version | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import: | ||
- source: Alfresco/alfresco-build-tools:.travis.java.yml@v1.0.2 | ||
- source: Alfresco/alfresco-build-tools:.travis.docker_login.yml@v1.0.2 | ||
before_script: | ||
- | | ||
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]] | ||
then | ||
export MAVEN_CLI_OPTS="${MAVEN_CLI_OPTS} -Ddocker.tag=${BRANCH}" | ||
fi | ||
echo using MAVEN_CLI_OPTS=$MAVEN_CLI_OPTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,2 @@ | ||
import: Alfresco/alfresco-build-tools:.travis.java.yml@v1.0.0 | ||
|
||
_shared_build_application_job: &shared_job | ||
stage: build | ||
script: travis_wait ${TRAVIS_WAIT_TIMEOUT} mvn ${MAVEN_CLI_OPTS} clean install -Dlogging.root.level=off -Dspring.main.banner-mode=off | ||
|
||
jobs: | ||
include: | ||
- name: build application on openjdk8 | ||
jdk: openjdk8 | ||
<<: *shared_job | ||
if: env(BUILD_JAVA8) = true | ||
- name: build application | ||
<<: *shared_job | ||
# DEPRECATED | ||
import: Alfresco/alfresco-build-tools:.travis.java.yml@v1.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cache: | ||
directories: | ||
- $HOME/.m2/repository | ||
before_install: | ||
- |- | ||
mkdir -p $HOME/.m2 | ||
cp settings.xml $HOME/.m2 | ||
export MAVEN_CLI_OPTS="$MAVEN_CLI_OPTS -B -q -e -fae -V -DinstallAtEnd=true -DdeployAtEnd=true -U" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters