From 33ef193ff9c0b90bf0916fd3c0fb0ef896169a1e Mon Sep 17 00:00:00 2001 From: Kimsongwu <282741857@qq.com> Date: Wed, 16 Apr 2025 11:16:54 +0800 Subject: [PATCH] archiveArtifacts --- Jenkinsfile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 40c4160..62b5b85 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,17 +14,31 @@ pipeline { } } - stage('๐Ÿ› ๏ธๆž„ๅปบ') { + stage('๐Ÿ› ๏ธๆž„ๅปบ้กน็›ฎ') { steps { withDockerContainer('node:18-alpine') { sh 'npm -v' sh 'npm config set registry https://registry.npmmirror.com' sh 'npm install' sh 'npm run build' - sh 'ls -al' + sh 'ls -al' } } } + + stage('๐ŸŽๆ‰“ๅŒ…ๅˆถๅ“'){ + steps { + dir('dist') { + sh 'ls -al' + sh 'tar -zcvf gofishingweb.tar.gz *' + archiveArtifacts artifacts: 'gofishingweb.tar.gz', + allowEmptyArchive: true, + fingerprint: true, + onlyIfSuccessful: true + sh 'ls -al' + } + } + } } post {