These are chat archives for fiji/fiji

29th
Mar 2017
Curtis Rueden
@ctrueden
Mar 29 2017 13:59 UTC
@tinevez Switched it over. FWIW, the secrets in question are the password for the ImageJ Maven repository's travis account, and the Jenkins token for triggering the Travis-Success and Travis-Failure build hooks.
The script I use to switch from Jenkins to Travis, minus those secrets, is:
#!/bin/sh
set -e
dir="$1"
test -d "$dir"

# install the Travis boilerplate config + scripts
cp -r .travis.yml .travis "$dir"
cd "$dir" && pwd

# update the POM
sed -i '' -e 's/Jenkins/Travis CI/' pom.xml
sed -E -i '' -e "s@https?://jenkins.imagej.net/job/.*</url>@https://travis-ci.org/$dir</url>@" pom.xml

# update the README
if [ -f "README.md" ]
then
  sed -E -i '' -e "s@https?://jenkins.imagej.net/job/.*/lastBuild/badge/icon@https://travis-ci.org/$dir.svg?branch=master@" README.md
  sed -E -i '' -e "s@https?://jenkins.imagej.net/job/.*/@https://travis-ci.org/$dir@" README.md
fi

# add encrypted vars
echo yes | travis encrypt MAVEN_PASS=... --add env.global
travis encrypt TOKEN_NAME=... --add env.global

# commit to git
git add .travis .travis.yml
git commit -a -m 'Switch from Jenkins to Travis CI'