Docker + Jenkfins File + v0.1

This commit is contained in:
Marco Santos
2024-11-18 10:42:44 +00:00
parent 964bad93f1
commit 048d3ea82f
32 changed files with 505 additions and 975 deletions

27
Jenkinsfile vendored
View File

@@ -12,12 +12,21 @@ pipeline {
environment {
now = new Date().format('yyyyMMdd-HHmm', TimeZone.getTimeZone('UTC'))
DOCKER_IMAGE = 'GeradoresWs/api'
DOCKER_TAG = "${env.BUILD_ID}"
DOCKER_REGISTRY = 'Shini89'
REMOTE_DOCKER_HOST = '192.168.2.20'
REMOTE_DOCKER_USER = 'admin'
REMOTE_DOCKER_PORT = '2375'
REACT_DIR = 'geradoresfe' // Diret<65>rio do frontend React
SERVICE_DIR = 'GeradoresService' // Diret<65>rio do projeto DLL
API_DIR = 'GeradoresWS' // Diret<65>rio do Web API
DOCKER_REGISTRY = 'your-docker-registry.com' // Registro Docker
}
stages {
/*******************************************************
Stage BUILD
*******************************************************/
stage('Check for Changes') {
steps {
script {
@@ -43,12 +52,20 @@ pipeline {
}
}
stage('Checkout Code') {
steps {
git branch: 'master', url: 'https://git.homeware.pt/Marco/Geradores.git'
}
}
/*******************************************************
Stage BUILD
*******************************************************/
stage('Build') {
stage('Build Service DLL') {
steps {
echo 'Construindo o projeto...'
echo 'Building Business Logic DLL...'
dir("${env.SERVICE_DIR}") {
sh 'dotnet build -c Release'
}
}
}
}