diff --git a/Jenkinsfile b/Jenkinsfile index cb9a07e..2c5f531 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -55,38 +55,13 @@ pipeline { } } } - stage('Clean Old Container') { - steps { - catchError(buildResult: 'SUCCESS', message: 'Container doesn\'t exist on host, skipping...', stageResult: 'ABORTED') { - sh 'docker stop otomai' - sh 'docker rm otomai' - } - } - } - stage('Run new container') { - steps { - script { - // Define registry credentials and image name - def registryCredentialsId = '7e506860-ca64-47bd-92a8-1a591dd12cba' - def imageName = 'git.ruff.co.il/amai.ig/otomai:latest' - - // Login to registry - docker.withRegistry('https://git.ruff.co.il', registryCredentialsId) { - - // Run container - docker.image(imageName).run('-p 10002:80 --name otomai') - } - } - } - } } post { success { - // Trigger the deploy-prod-job on success of the build + // Trigger the deployment job on success of the build build job: 'otomai-prod', wait: false } failure { - // Optionally, you can handle failure scenarios (e.g., notify team, etc.) echo "Build failed, deployment not triggered." } }