Branch test
This commit is contained in:
parent
b12383b97a
commit
fc6ee7bf2d
@ -3,6 +3,7 @@ RUN apt-get update
|
||||
RUN apt-get -y upgrade
|
||||
RUN apt-get -y install openjdk-8-jre openjdk-8-jdk curl wget
|
||||
WORKDIR /bot_src
|
||||
ENV BRANCH_NAME=$BRANCH_NAME
|
||||
ADD DownloadLast.sh /bot_src/
|
||||
RUN chmod +x DownloadLast.sh
|
||||
RUN ./DownloadLast.sh
|
||||
|
@ -4,8 +4,14 @@
|
||||
data=$(curl -g "https://jenkins.seb6596.ovh/job/Bot%20Discord%20Gradle/lastStableBuild/api/xml?xpath=/freeStyleBuild/artifact&wrapper=artifacts")
|
||||
relativePath=$(grep -oPm1 "(?<=<relativePath>)[^<]+" <<< "$data")
|
||||
jarFile=$(grep -oPm1 "(?<=<fileName>)[^<]+" <<< "$data")
|
||||
url="https://jenkins.seb6596.ovh/job/Bot%20Discord%20Gradle/lastStableBuild/artifact/"${relativePath}
|
||||
|
||||
if [[ $BRANCH_NAME=="master" ]]; then
|
||||
url="https://jenkins.seb6596.ovh/job/Bot%20Discord%20Gradle/lastStableBuild/artifact/"${relativePath}
|
||||
else
|
||||
url="https://jenkins.seb6596.ovh/job/Bot%20Discord%20Gradle%20Devel/lastStableBuild/artifact/"${relativePath}
|
||||
fi
|
||||
echo ${url}
|
||||
|
||||
wget ${url} -O bot.jar
|
||||
|
||||
|
||||
|
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -12,8 +12,14 @@ node {
|
||||
}
|
||||
|
||||
}
|
||||
stage('Gradle Buil'){
|
||||
build job: 'Bot Discord Gradle', wait: true
|
||||
stage('Gradle Build'){
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'master') {
|
||||
build job: 'Bot Discord Gradle', wait: true
|
||||
} else {
|
||||
build job: 'Bot Discord Gradle devel', wait: true
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build image') {
|
||||
/* This builds the actual image; synonymous to
|
||||
|
Loading…
Reference in New Issue
Block a user