adding jenkinsfile and dockerfile
This commit is contained in:
parent
92dc8ac76f
commit
9e619653b4
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
||||
public
|
22
.jenkins/jenkinsfile
Normal file
22
.jenkins/jenkinsfile
Normal 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
11
Dockerfile
Normal 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/
|
Loading…
Reference in New Issue
Block a user