From ad0c0fd53138d0c89f251edbe7f3eb13cfd19a4e Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 16 Apr 2024 18:46:53 +0200 Subject: [PATCH] Remove the original Jenkinsfile. --- Jenkinsfile | 64 ----------------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index e1af2b1..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,64 +0,0 @@ -// REMEMBER TO FILL THE environment section with your values. -// the following filed should be filled: imagename, git_url -// REMEMBER to put your Dockerfile in the root folder of your project -// The related jenkinsjob template is here: - - -pipeline { - agent { - label 'docker' - } - environment { - imagename = "d4science/rstudio-d4science" - registryCredential = 'e348bfab-5580-4db6-b0e0-d854966bde08' - dockerImage = '' - git_url='https://code-repo.d4science.org/gCubeSystem/rstudio-d4science.git' - } - stages { - // stage('Cloning Git') { - // steps { - // git([url: git_url, branch: '2023-03-R4-2', credentialsId: '88b54962-1c0e-49cb-8155-22276860f346']) - // } - // } - stage('Building image') { - steps{ - script { - dockerImage = docker.build imagename - } - } - } - stage('Deploy Image') { - steps{ - script { - docker.withRegistry( '', registryCredential ) { - dockerImage.push("$BUILD_NUMBER") - dockerImage.push('2023-03-R4-2') - } - } - } - } - stage('Remove Unused docker image') { - steps{ - sh "docker rmi $imagename:$BUILD_NUMBER" - sh "docker rmi $imagename:2023-03-R4-2" - - } - } - } - // post-build actions - post { - success { - echo 'The docker pipeline worked!' - emailext to: 'jenkinsbuilds@d4science.org', - subject: "[Jenkins DockerPipeline D4S] build ${currentBuild.fullDisplayName} worked", - body: "Build time: ${currentBuild.durationString}. See ${env.BUILD_URL}" - } - failure { - echo 'The docker pipeline has failed' - emailext attachLog: true, - to: 'jenkinsbuilds@d4science.org', - subject: "[Jenkins DockerPipeline D4S] build ${currentBuild.fullDisplayName} failed for image ${imagename}", - body: "Something is wrong with ${env.BUILD_URL}" - } - } -}