diff --git a/Jenkinsfile b/Jenkinsfile index 79764a9..8cda718 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,23 @@ -buildPlugin( - useContainerAgent: true, // Set to `false` if you need to use Docker for containerized tests - configurations: [ - [platform: 'linux', jdk: 17], - [platform: 'windows', jdk: 11], -]) \ No newline at end of file + +// Note: Visual studio is using the solution root folder as build context +// docker build -f "" -t some-name "" + +// Define variable +def CI_REGISTRY = "https://hcrsrv0001.corp.maks-it.com" +def PROJECT_NAME = "reactredux" +def DOCKERHUB_CACHE= "dockerhub_cache/library" + +node { + checkout scm + + docker.withRegistry("${CI_REGISTRY}", "harbor-credentials-id") { + def clientApp = docker.build("${PROJECT_NAME}/clientapp:${env.BUILD_ID}", "./src/ -f ./src/ClientApp/Dockerfile") + clientApp.push() + + def reverseProxy = docker.build("${PROJECT_NAME}/reverseproxy:${env.BUILD_ID}", "./src/ -f ./src/ReverseProxy/Dockerfile") + reverseProxy.push() + + def weatherForecast = docker.build("${PROJECT_NAME}/weatherforecast:${env.BUILD_ID}", "./src/ -f ./src/WeatherForecast/Dockerfile") + weatherForecast.push() + } +} \ No newline at end of file