mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Remove Travis CI configuration (#9343)
* Remove all files used with Travis CI only * Update README.md to display Jenkins build status badge Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
parent
1eccc4c6fc
commit
3a4d9ec89f
28
.travis.yml
28
.travis.yml
@ -1,28 +0,0 @@
|
||||
os: linux
|
||||
dist: focal
|
||||
|
||||
language: java
|
||||
jdk: openjdk11
|
||||
|
||||
branches:
|
||||
only:
|
||||
# We run tests on Jenkins for the main branch, so let's have Travis only in place for 2.5.x
|
||||
- 2.5.x
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.m2
|
||||
|
||||
before_cache:
|
||||
# remove resolver-status.properties, they change with each run and invalidate the cache
|
||||
- find $HOME/.m2 -name resolver-status.properties -exec rm {} \;
|
||||
|
||||
notifications:
|
||||
webhooks: https://www.travisbuddy.com/
|
||||
|
||||
travisBuddy:
|
||||
insertMode: update
|
||||
successBuildLog: true
|
||||
|
||||
install: true
|
||||
script: ./buildci.sh "$TRAVIS_COMMIT_RANGE"
|
@ -2,7 +2,7 @@
|
||||
|
||||
<img align="right" width="220" src="./logo.png" />
|
||||
|
||||
[![Build Status](https://travis-ci.com/openhab/openhab-addons.svg)](https://travis-ci.com/openhab/openhab-addons)
|
||||
[![Build Status](https://ci.openhab.org/job/openHAB-Addons/badge/icon)](https://ci.openhab.org/job/openHAB-Addons/)
|
||||
[![EPL-2.0](https://img.shields.io/badge/license-EPL%202-green.svg)](https://opensource.org/licenses/EPL-2.0)
|
||||
[![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=2164344)](https://www.bountysource.com/teams/openhab/issues?tracker_ids=2164344)
|
||||
|
||||
|
84
buildci.sh
84
buildci.sh
@ -1,84 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o pipefail # exit build with error when pipes fail
|
||||
|
||||
function prevent_timeout() {
|
||||
local i=0
|
||||
while [[ -e /proc/$1 ]]; do
|
||||
# print zero width char every 3 minutes while building
|
||||
if [[ "$i" -eq "180" ]]; then printf %b '\u200b'; i=0; else i=$((i+1)); fi
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
function print_reactor_summary() {
|
||||
sed -ne '/\[INFO\] Reactor Summary.*:/,$ p' "$1" | sed 's/\[INFO\] //'
|
||||
}
|
||||
|
||||
function mvnp() {
|
||||
local command=(mvn $@)
|
||||
exec "${command[@]}" 2>&1 | # execute, redirect stderr to stdout
|
||||
stdbuf -o0 grep -vE "Download(ed|ing) from [a-z.]+: https:" | # filter out downloads
|
||||
tee .build.log | # write output to log
|
||||
stdbuf -oL grep -aE '^\[INFO\] Building .+ \[.+\]$' | # filter progress
|
||||
stdbuf -o0 sed -uE 's/^\[INFO\] Building (.*[^ ])[ ]+\[([0-9]+\/[0-9]+)\]$/\2| \1/' | # prefix project name with progress
|
||||
stdbuf -o0 sed -e :a -e 's/^.\{1,6\}|/ &/;ta' & # right align progress with padding
|
||||
local pid=$!
|
||||
prevent_timeout ${pid} &
|
||||
wait ${pid}
|
||||
}
|
||||
|
||||
COMMITS=${1:-"master...HEAD"}
|
||||
|
||||
# Determine if this is a single changed addon -> Perform build with tests + integration tests and all SAT checks
|
||||
CHANGED_BUNDLE_DIR=`git diff --dirstat=files,0 ${COMMITS} bundles/ | sed 's/^[ 0-9.]\+% bundles\///g' | grep -o -P "^([^/]*)" | uniq`
|
||||
# Determine if this is a single changed itest -> Perform build with tests + integration tests and all SAT checks
|
||||
# for this we have to remove '.tests' from the folder name.
|
||||
CHANGED_ITEST_DIR=`git diff --dirstat=files,0 ${COMMITS} itests/ | sed 's/^[ 0-9.]\+% itests\///g' | sed 's/\.tests\///g' | uniq`
|
||||
CDIR=`pwd`
|
||||
|
||||
# if a bundle and (optionally the linked itests) where changed build the module and its tests
|
||||
if [[ ! -z "$CHANGED_BUNDLE_DIR" && -e "bundles/$CHANGED_BUNDLE_DIR" && ( "$CHANGED_BUNDLE_DIR" == "$CHANGED_ITEST_DIR" || -z "$CHANGED_ITEST_DIR" ) ]]; then
|
||||
CHANGED_DIR="$CHANGED_BUNDLE_DIR"
|
||||
fi
|
||||
|
||||
# if no bundle was changed but only itests
|
||||
if [[ -z "$CHANGED_BUNDLE_DIR" ]] && [[ -e "bundles/$CHANGED_ITEST_DIR" ]]; then
|
||||
CHANGED_DIR="$CHANGED_ITEST_DIR"
|
||||
fi
|
||||
|
||||
if [[ ! -z "$CHANGED_DIR" ]] && [[ -e "bundles/$CHANGED_DIR" ]]; then
|
||||
echo "Single addon pull request: Building $CHANGED_DIR"
|
||||
echo "MAVEN_OPTS='-Xms1g -Xmx2g -Dorg.slf4j.simpleLogger.log.org.openhab.tools.analysis.report.ReportUtility=DEBUG -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN'" > ~/.mavenrc
|
||||
ARTIFACT_ID=$(mvn -f bundles/${CHANGED_DIR}/pom.xml help:evaluate -Dexpression=project.artifactId -q -DforceStdout)
|
||||
mvn clean install -B -am -pl ":$ARTIFACT_ID" 2>&1 |
|
||||
stdbuf -o0 grep -vE "Download(ed|ing) from [a-z.]+: https:" | # Filter out Download(s)
|
||||
stdbuf -o0 grep -v "target/code-analysis" | # filter out some debug code from reporting utility
|
||||
tee ${CDIR}/.build.log
|
||||
if [[ $? -ne 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# add the postfix to make sure we actually find the correct itest
|
||||
if [[ -e "itests/$CHANGED_DIR.tests" ]]; then
|
||||
echo "Single addon pull request: Building itest $CHANGED_DIR"
|
||||
cd "itests/$CHANGED_DIR.tests"
|
||||
mvn clean install -B 2>&1 |
|
||||
stdbuf -o0 grep -vE "Download(ed|ing) from [a-z.]+: https:" | # Filter out Download(s)
|
||||
stdbuf -o0 grep -v "target/code-analysis" | # filter out some debug code from reporting utility
|
||||
tee -a ${CDIR}/.build.log
|
||||
if [[ $? -ne 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Build all"
|
||||
echo "MAVEN_OPTS='-Xms1g -Xmx2g -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'" > ~/.mavenrc
|
||||
mvnp clean install -B -DskipChecks=true
|
||||
if [[ $? -eq 0 ]]; then
|
||||
print_reactor_summary .build.log
|
||||
else
|
||||
tail -n 1000 .build.log
|
||||
exit 1
|
||||
fi
|
||||
fi
|
@ -1,22 +0,0 @@
|
||||
## Travis tests have failed
|
||||
Hey @{{pullRequestAuthor}},
|
||||
please read the following log in order to understand the failure reason. There might also be some helpful tips along the way.
|
||||
It will be awesome if you fix what is wrong and commit the changes.
|
||||
|
||||
{{#jobs}}
|
||||
### {{displayName}}
|
||||
{{#scripts}}
|
||||
<details>
|
||||
<summary>
|
||||
<strong>
|
||||
Expand here
|
||||
</strong>
|
||||
</summary>
|
||||
|
||||
```
|
||||
{{&contents}}
|
||||
```
|
||||
</details>
|
||||
<br />
|
||||
{{/scripts}}
|
||||
{{/jobs}}
|
@ -1,21 +0,0 @@
|
||||
## Travis tests were successful
|
||||
Hey @{{pullRequestAuthor}},
|
||||
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.
|
||||
|
||||
{{#jobs}}
|
||||
### {{displayName}}
|
||||
{{#scripts}}
|
||||
<details>
|
||||
<summary>
|
||||
<strong>
|
||||
{{command}}
|
||||
</strong>
|
||||
</summary>
|
||||
|
||||
```
|
||||
{{&contents}}
|
||||
```
|
||||
</details>
|
||||
<br />
|
||||
{{/scripts}}
|
||||
{{/jobs}}
|
Loading…
Reference in New Issue
Block a user