From 49bee73796fcd2a9abbbd46683e8e302fc5753e5 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Mon, 7 Apr 2025 00:25:17 +0100 Subject: [PATCH] Added Jenkinsfile --- Jenkinsfile | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..9f6fca4 --- /dev/null +++ b/Jenkinsfile @@ -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.' + } + } +}