Added Jenkinsfile
This commit is contained in:
parent
430849a00b
commit
49bee73796
54
Jenkinsfile
vendored
Normal file
54
Jenkinsfile
vendored
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
environment {
|
||||||
|
NODE_ENV = 'production'
|
||||||
|
PROJECT_NAME = 'tombutcher-auth'
|
||||||
|
}
|
||||||
|
|
||||||
|
tools {
|
||||||
|
nodejs 'Node23' // This should match the name of your NodeJS installation in Jenkins tools
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Checkout') {
|
||||||
|
steps {
|
||||||
|
checkout scm // Checkout the repository
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install dependencies') {
|
||||||
|
steps {
|
||||||
|
sh 'npm install --include dev' // Install project dependencies
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh 'npm run build' // Install project dependencies
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build theme') {
|
||||||
|
steps {
|
||||||
|
sh 'npx keycloakify build' // Install project dependencies
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Archive Artifacts') {
|
||||||
|
steps {
|
||||||
|
archiveArtifacts artifacts: 'dist_keycloak/*.jar', fingerprint: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
failure {
|
||||||
|
echo 'Build or deployment failed.'
|
||||||
|
}
|
||||||
|
success {
|
||||||
|
echo 'Successfully deployed to Cloudflare Pages.'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user