add task.pdf for lab1
This commit is contained in:
23
Jenkinsfile
vendored
23
Jenkinsfile
vendored
@@ -4,21 +4,34 @@ pipeline {
|
||||
DEPLOY_HOST = 'web@23.26.156.61'
|
||||
DEPLOY_PATH = '/srv/www/masha-site'
|
||||
SSH_CRED_ID = 'web-ssh'
|
||||
HUGO_VERSION = '0.128.1'
|
||||
}
|
||||
triggers {
|
||||
githubPush()
|
||||
}
|
||||
stages {
|
||||
stage('Checkout') { steps { checkout scm } }
|
||||
stage('Build site') {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
checkout scm
|
||||
sh 'git submodule update --init --recursive'
|
||||
}
|
||||
}
|
||||
stage('Setup Hugo') {
|
||||
steps {
|
||||
sh '''
|
||||
if [ ! -f go.mod ]; then docker run --rm -u $(id -u):$(id -g) -v "$PWD":/src -w /src klakegg/hugo:ext-alpine hugo mod init site; fi
|
||||
docker run --rm -u $(id -u):$(id -g) -v "$PWD":/src -w /src klakegg/hugo:ext-alpine hugo mod get -u github.com/adityatelange/hugo-PaperMod
|
||||
docker run --rm -u $(id -u):$(id -g) -v "$PWD":/src -w /src klakegg/hugo:ext-alpine hugo --minify
|
||||
mkdir -p tools
|
||||
cd tools
|
||||
curl -L -o hugo.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
|
||||
tar -xzf hugo.tar.gz
|
||||
chmod +x hugo
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('Build site') {
|
||||
steps {
|
||||
sh './tools/hugo --minify'
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
sshagent(credentials: [env.SSH_CRED_ID]) {
|
||||
|
||||
Reference in New Issue
Block a user