From b43611ad90b6991301c9bc2d325c306f8b83c8cb Mon Sep 17 00:00:00 2001 From: fernando Date: Fri, 4 Oct 2024 20:54:44 +0000 Subject: [PATCH] Update Jenkinsfile.groovy --- Jenkinsfile.groovy | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/Jenkinsfile.groovy b/Jenkinsfile.groovy index d196c4d..690fe14 100644 --- a/Jenkinsfile.groovy +++ b/Jenkinsfile.groovy @@ -1,30 +1,12 @@ pipeline { - agent any - environment { - PATH = "/var/lib/jenkins/bin:/var/lib/jenkins/.nvm/versions/node/v20.9.0/bin:${env.PATH}" + agent { + docker { image 'node:14-alpine' } } stages { - stage('Install deps') { + stage('Test') { steps { - sh 'pnpm i' - } - } - stage("Test") { - steps { - sh 'pnpm test' - } - } - stage('Build bundle') { - steps { - sh 'rm .env || true' - sh 'echo "THP_BINARY=/var/lib/jenkins/bin/thp" > .env' - sh 'pnpm build' - } - } - stage('Deploy') { - steps { - sh 'cp -r ./dist/* /var/www/thp-docs/' + sh 'node --version' } } } -} \ No newline at end of file +}