Update script.groovy
This commit is contained in:
@@ -1,14 +1,19 @@
|
|||||||
def buildApp() {
|
def buildJar() {
|
||||||
echo 'building the application...'
|
echo "building the application..."
|
||||||
|
sh 'mvn package'
|
||||||
}
|
}
|
||||||
|
|
||||||
def testApp() {
|
def buildImage() {
|
||||||
echo 'testing the application...'
|
echo "building the docker image..."
|
||||||
|
withCredentials([usernamePassword(credentialsId: 'docker-hub-repo', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
|
||||||
|
sh 'docker build -t nanajanashia/demo-app:jma-2.0 .'
|
||||||
|
sh "echo $PASS | docker login -u $USER --password-stdin"
|
||||||
|
sh 'docker push nanajanashia/demo-app:jma-2.0'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def deployApp() {
|
def deployApp() {
|
||||||
echo 'deplying the application...'
|
echo 'deploying the application...'
|
||||||
echo "deploying version ${params.VERSION}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this
|
return this
|
||||||
Reference in New Issue
Block a user