From 57045506f4e5da8daa5b55ab26a1e749b0c66b63 Mon Sep 17 00:00:00 2001 From: Lihan Date: Sun, 28 Jul 2024 00:53:46 -0400 Subject: [PATCH] w/e --- Jenkinsfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index abf3d3ef3..9501332f3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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