mirror of
https://github.com/DarkflameUniverse/NexusDashboard.git
synced 2024-11-10 03:58:20 +00:00
single quotes to fix insecure string interpolation
This commit is contained in:
parent
d6d8bb085d
commit
6deb02b11d
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -34,18 +34,18 @@ node('worker'){
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
def tag = ''
|
def tag = ''
|
||||||
stage("Build Container"){
|
stage('Build Container'){
|
||||||
if (params.BRANCH.contains('main')){
|
if (params.BRANCH.contains('main')){
|
||||||
tag = 'latest'
|
tag = 'latest'
|
||||||
} else {
|
} else {
|
||||||
tag = params.BRANCH.replace('\\', '-')
|
tag = params.BRANCH.replace('\\', '-')
|
||||||
}
|
}
|
||||||
sh "docker build -t aronwk/nexus-dashboard:${tag} ."
|
sh 'docker build -t aronwk/nexus-dashboard:${tag} .'
|
||||||
}
|
}
|
||||||
stage("Push Container"){
|
stage('Push Container'){
|
||||||
withCredentials([usernamePassword(credentialsId: 'docker-hub-token', passwordVariable: 'password', usernameVariable: 'username')]) {
|
withCredentials([usernamePassword(credentialsId: 'docker-hub-token', passwordVariable: 'password', usernameVariable: 'username')]) {
|
||||||
sh "docker login -u ${username} -p ${password}"
|
sh 'docker login -u ${username} -p ${password}'
|
||||||
sh "docker push aronwk/nexus-dashboard:${tag}"
|
sh 'docker push aronwk/nexus-dashboard:${tag}'
|
||||||
sh 'docker logout'
|
sh 'docker logout'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user