feat: Jenkinsfile (#5)
Reviewed-on: #5 Co-authored-by: Thumbscrew <thumbscrw@pm.me> Co-committed-by: Thumbscrew <thumbscrw@pm.me>
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
ARG NEXTCLOUD_TAG
|
||||
FROM nextcloud:${NEXTCLOUD_TAG}
|
||||
FROM docker.io/library/nextcloud:${NEXTCLOUD_TAG}-apache
|
||||
|
||||
RUN apt-get update && apt-get install ffmpeg -y --no-install-recommends
|
||||
|
37
Jenkinsfile
vendored
Normal file
37
Jenkinsfile
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
pipeline {
|
||||
agent {
|
||||
kubernetes {
|
||||
inheritFrom 'buildah'
|
||||
}
|
||||
}
|
||||
options {
|
||||
timeout(time: 30, unit: 'MINUTES')
|
||||
}
|
||||
stages {
|
||||
stage('Build') {
|
||||
environment {
|
||||
GITEA_PACKAGE_REGISTRY = credentials('gitea-package-registry')
|
||||
}
|
||||
steps {
|
||||
container('buildah') {
|
||||
sh('buildah --storage-driver=overlay build --build-arg NEXTCLOUD_TAG=${TAG_NAME:-stable} -t $GITEA_PACKAGE_REGISTRY:${TAG_NAME:-stable} .')
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Publish') {
|
||||
when {
|
||||
buildingTag()
|
||||
}
|
||||
environment {
|
||||
GITEA_PACKAGE_REGISTRY = credentials('gitea-package-registry')
|
||||
GITEA_PACKAGE_WRITE = credentials('gitea-package-write')
|
||||
}
|
||||
steps {
|
||||
container('buildah') {
|
||||
sh('buildah login -u $GITEA_PACKAGE_WRITE_USR -p $GITEA_PACKAGE_WRITE_PSW $GITEA_PACKAGE_REGISTRY')
|
||||
sh('buildah push $GITEA_PACKAGE_REGISTRY:$TAG_NAME')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user