forked from jenkinsci/analysis-model-api-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgo.sh
More file actions
executable file
·27 lines (21 loc) · 769 Bytes
/
go.sh
File metadata and controls
executable file
·27 lines (21 loc) · 769 Bytes
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
#!/bin/bash
set -e
JENKINS_HOME=../docker/volumes/jenkins-home
if [ $# -eq 1 ]
then
echo "Using analysis-model version $1"
mvn clean install -Danalysis-model.version=$1 || { echo "Build failed"; exit 1; }
else
echo "Using built-in analysis-model version from pom.xml"
mvn clean install || { echo "Build failed"; exit 1; }
fi
echo "Installing plugin in $JENKINS_HOME"
rm -rf $JENKINS_HOME/plugins/analysis-model*
cp -fv target/analysis-model-api.hpi $JENKINS_HOME/plugins/analysis-model-api.jpi
CURRENT_UID="$(id -u):$(id -g)"
export CURRENT_UID
IS_RUNNING=$(docker-compose ps -q jenkins-controller)
if [[ "$IS_RUNNING" != "" ]]; then
docker-compose restart
echo "Restarting Jenkins (docker compose with user ID ${CURRENT_UID}) ..."
fi