update Jenkinsfile
This commit is contained in:
36
Jenkinsfile
vendored
36
Jenkinsfile
vendored
@@ -5,31 +5,31 @@ pipeline {
|
||||
}
|
||||
stages {
|
||||
stage('Install Dependencies') {
|
||||
steps {
|
||||
sh '''
|
||||
# Install Hugo
|
||||
curl -sL https://github.com/gohugoio/hugo/releases/download/v0.146.0/hugo_extended_0.146.0_linux-amd64.tar.gz \
|
||||
-o hugo.tar.gz
|
||||
tar -xzf hugo.tar.gz hugo
|
||||
steps {
|
||||
sh '''
|
||||
# Install Hugo
|
||||
curl -sL https://github.com/gohugoio/hugo/releases/download/v0.146.0/hugo_extended_0.146.0_linux-amd64.tar.gz \
|
||||
-o hugo.tar.gz
|
||||
tar -xzf hugo.tar.gz hugo
|
||||
|
||||
# Install Go
|
||||
curl -sL https://go.dev/dl/go1.24.1.linux-amd64.tar.gz -o go.tar.gz
|
||||
tar -xzf go.tar.gz
|
||||
'''
|
||||
}
|
||||
}
|
||||
# Install Go
|
||||
curl -sL https://go.dev/dl/go1.24.1.linux-amd64.tar.gz -o go.tar.gz
|
||||
tar -xzf go.tar.gz
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'PATH=$PATH:$WORKSPACE/go/bin ./hugo --minify'
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
steps:
|
||||
sh '''
|
||||
scp -o StrictHostKeyChecking=no -r public/* root@172.17.0.1:${DEPLOY_PATH}/
|
||||
'''
|
||||
}
|
||||
}
|
||||
steps:
|
||||
sh '''
|
||||
scp -o StrictHostKeyChecking=no -r public/* root@172.17.0.1:${DEPLOY_PATH}/
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
|
||||
Reference in New Issue
Block a user