diff --git a/Jenkinsfile b/Jenkinsfile index c658940..1563684 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,14 +1,6 @@ pipeline { agent any - tools { - nodejs 'nodejs' - } - -environment { - DEPLOY_DIR = '/opt/1panel/www/sites/workstation.xiaozhou233.cn/index' -} - options { timestamps() disableConcurrentBuilds() @@ -30,66 +22,21 @@ environment { } } - stage('Install') { + stage('Build Images') { steps { - // Install frontend dependencies - dir('dashboard') { - sh 'npm ci' + script { + env.BUILD_TIME = sh(script: "date '+%Y-%m-%d %H:%M:%S'", returnStdout: true).trim() + env.COMMIT_SHORT = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim() } - } - } - - stage('Build') { - steps { - // Build frontend - dir('dashboard') { - sh 'npm run build' - } - } - } - - stage('Version') { - steps { - dir('dashboard') { - sh ''' -cat > dist/version.json <