mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 06:45:50 +00:00
w/e
This commit is contained in:
parent
b7bcdf16bd
commit
57045506f4
1 changed files with 10 additions and 1 deletions
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
|
@ -17,12 +17,21 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
stage('Prepare Environment') {
|
||||
steps {
|
||||
script {
|
||||
sh "pwd" // Prints the current working directory
|
||||
sh "ls -alh" // Lists all files in the current directory
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build Docker Image') {
|
||||
steps {
|
||||
script {
|
||||
echo "Building Docker Image..."
|
||||
// Correctly escape dollar signs in Groovy string
|
||||
def dockerImage = docker.build("spring-petclinic", "--build-arg CACHEBUSTER=\\$(date +%s) --no-cache .")
|
||||
def dockerImage = docker.build("spring-petclinic", "--no-cache --build-arg FORCE_REBUILD=$(date +%s) .")
|
||||
echo "Docker Image built: ${dockerImage.id}"
|
||||
// Store the Docker image ID in the environment if needed across stages
|
||||
env.DOCKER_IMAGE_ID = dockerImage.id
|
||||
|
|
Loading…
Reference in a new issue