Skip to content

Commit

Permalink
Fix build scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Oct 23, 2023
1 parent c567671 commit 1c45aa5
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bin/go.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -e

JENKINS_HOME=../docker/volumes/jenkins-home

mvn clean install || { echo "Build failed"; exit 1; }

echo "Installing plugin in $JENKINS_HOME"

rm -rf $JENKINS_HOME/plugins/echarts-api-plugin*
cp -fv target/echarts-api.hpi $JENKINS_HOME/plugins/echarts-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
5 changes: 5 additions & 0 deletions bin/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

git pull
git push
mvn -B clean release:prepare release:perform
20 changes: 20 additions & 0 deletions bin/skip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -e

JENKINS_HOME=../docker/volumes/jenkins-home

mvn -o clean install -Pskip || { echo "Build failed"; exit 1; }

echo "Installing plugin in $JENKINS_HOME"

rm -rf $JENKINS_HOME/plugins/echarts-api-plugin*
cp -fv target/echarts-api.hpi $JENKINS_HOME/plugins/echarts-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

0 comments on commit 1c45aa5

Please sign in to comment.