adding jenkinsfile and dockerfile

This commit is contained in:
Andy Pack 2023-05-01 20:48:22 +01:00
parent 92dc8ac76f
commit 9e619653b4
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7
3 changed files with 34 additions and 0 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
public

22
.jenkins/jenkinsfile Normal file
View File

@ -0,0 +1,22 @@
pipeline {
agent any
stages {
stage('Deploy') {
when { branch 'master' }
steps {
script {
docker.withRegistry('https://git.sarsoo.xyz', 'git-registry-creds') {
docker.build("sarsoo/sarsooxyz.hugo:latest").push()
}
}
}
}
}
post {
always {
cleanWs()
}
}
}

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM git.sarsoo.xyz/sarsoo/hugo:latest AS build
COPY . /sarsooxyz.hugo
WORKDIR /sarsooxyz.hugo
RUN hugo \
--minify \
--baseURL sarsoo.xyz
FROM nginx
COPY --from=build /sarsooxyz.hugo/public /usr/share/nginx/html/