From c96dd4f56757e37870609f4896726ea6b19e6145 Mon Sep 17 00:00:00 2001 From: kargor8 Date: Thu, 10 Dec 2020 17:09:46 +0100 Subject: [PATCH] Jenkins now lets build frontend and backend --- Jenkinsfile | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index edc5f50..49e2716 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,20 +1,26 @@ pipeline { - agent any + agent { + docker { + image 'kargor8/sess-comp-base:v2' + } + } + environment { + DOTNET_CLI_HOME = '/tmp/App' + } stages { - stage('Build image') { + stage('Build app') { steps { - echo "Building docker image" - script { - dir('SessionCompanion/SessionCompanion'){ - def customImage = docker.build("session-companion:${env.BUILD_ID}") - //customImage.withRun('-p 5050:5050') + dir('SessionCompanion') { + sh "echo $USER" + withEnv(["HOME=${env.WORKSPACE}"]){ + sh 'dotnet build' } } - } + } } - stage('Delete image') { - steps { - sh "docker rmi session-companion:${env.BUILD_ID}" + stage('Clarify') { + steps { + sh "echo Dziala" } } }