mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 14:55: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') {
|
stage('Build Docker Image') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
echo "Building Docker Image..."
|
echo "Building Docker Image..."
|
||||||
// Correctly escape dollar signs in Groovy string
|
// 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}"
|
echo "Docker Image built: ${dockerImage.id}"
|
||||||
// Store the Docker image ID in the environment if needed across stages
|
// Store the Docker image ID in the environment if needed across stages
|
||||||
env.DOCKER_IMAGE_ID = dockerImage.id
|
env.DOCKER_IMAGE_ID = dockerImage.id
|
||||||
|
|
Loading…
Reference in a new issue