jenkinsfile

This commit is contained in:
Araozu 2023-09-26 17:22:20 -05:00
parent abd9f789d3
commit 5341628c0c

View File

@ -3,17 +3,24 @@ pipeline {
stages { stages {
stage('Build backend') { stage('Build backend') {
agent {
docker {
image 'rust:buster'
args '-v /srv/jenkins/.cargo:/root/.cargo'
// reuseNode true
}
}
steps { steps {
sh "whoami" sh "sh cargo --version"
sh "echo $PATH"
sh 'export PATH="$PATH:/var/lib/jenkins/.local/share:/var/lib/jenkins/.cargo/bin/"'
sh "echo $PATH"
sh "which cargo"
sh "cd ${env.WORKSPACE}/backend" sh "cd ${env.WORKSPACE}/backend"
sh "cargo build --release" sh "cargo build --release"
} }
} }
stage('Build frontend') { stage('Build frontend') {
agent {
docker { image 'node:18.18.0-alpine3.18' }
}
steps { steps {
sh "cd ${env.WORKSPACE}/frontend" sh "cd ${env.WORKSPACE}/frontend"
sh "pnpm i" sh "pnpm i"