69 lines
1.9 KiB
Plaintext
69 lines
1.9 KiB
Plaintext
pipeline {
|
|
agent any
|
|
|
|
// environment {
|
|
// DOTNET_CLI_HOME = "/tmp/DOTNET_CLI_HOME"
|
|
// }
|
|
|
|
stages {
|
|
stage('Build C#') {
|
|
// agent {
|
|
// docker {
|
|
// image 'mcr.microsoft.com/dotnet/sdk:7.0'
|
|
// }
|
|
// }
|
|
steps {
|
|
// dotnetRestore project: "Selector.Core.sln", packages: './packages'
|
|
// sh 'dotnet build --packages ./packages Selector.Core.sln'
|
|
dotnetRestore project: "Selector.Core.sln"
|
|
dotnetBuild project: 'Selector.Core.sln'
|
|
}
|
|
}
|
|
|
|
stage('Build Javascript') {
|
|
// agent {
|
|
// docker {
|
|
// image 'node:16'
|
|
// reuseNode true
|
|
// }
|
|
// }
|
|
steps {
|
|
dir ('Selector.Web') {
|
|
sh "npm ci"
|
|
sh "npm run build --if-present"
|
|
}
|
|
}
|
|
}
|
|
stage('Test') {
|
|
// agent {
|
|
// docker {
|
|
// image 'mcr.microsoft.com/dotnet/sdk:7.0'
|
|
// reuseNode true
|
|
// }
|
|
// }
|
|
steps {
|
|
dotnetTest project: "Selector.Core.sln"
|
|
}
|
|
}
|
|
stage('Deploy') {
|
|
when { branch 'master' }
|
|
steps {
|
|
script {
|
|
docker.withRegistry('https://registry.sarsoo.xyz', 'git-registry-creds') {
|
|
|
|
docker.build("sarsoo/selector-cli:latest",
|
|
"-f Dockerfile.CLI .").push()
|
|
|
|
docker.build("sarsoo/selector-web:latest",
|
|
"-f Dockerfile.Web .").push()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
cleanWs()
|
|
}
|
|
}
|
|
} |