From f3c55bf7e37d7fdba70ceb23f467e1b41411b7b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20G=C3=B3rzy=C5=84ski?= Date: Wed, 2 Dec 2020 18:52:16 +0100 Subject: [PATCH] SES-79 Try configs for Dockerfile and Jenkinsfile --- SessionCompanion/Dockerfile | 8 ++++++++ SessionCompanion/Jenkinsfile | 11 +++++++++++ 2 files changed, 19 insertions(+) create mode 100644 SessionCompanion/Dockerfile create mode 100644 SessionCompanion/Jenkinsfile diff --git a/SessionCompanion/Dockerfile b/SessionCompanion/Dockerfile new file mode 100644 index 0000000..d34dc0f --- /dev/null +++ b/SessionCompanion/Dockerfile @@ -0,0 +1,8 @@ +FROM mcr.microsoft.com/dotnet/sdk:5.0 + +ADD . /App +WORKDIR /App + +EXPOSE 5001 + +CMD 'dotnet' 'build' diff --git a/SessionCompanion/Jenkinsfile b/SessionCompanion/Jenkinsfile new file mode 100644 index 0000000..2e1c547 --- /dev/null +++ b/SessionCompanion/Jenkinsfile @@ -0,0 +1,11 @@ +pipeline { + def app + + stage('Build image') { + checkout scm + app = docker.build("session-companion:${env.BUILD_ID}") + } + stage('Build app') { + docker.image("session-companion:${env.BUILD_ID}").withRun(-p 8080:8080) + } +}