feat: Jenkinsfile (#5)
Some checks are pending
nextcloud-image/pipeline/head This commit looks good
pipeline-image/pipeline/head Build started...

Reviewed-on: #5
Co-authored-by: Thumbscrew <thumbscrw@pm.me>
Co-committed-by: Thumbscrew <thumbscrw@pm.me>
This commit is contained in:
2025-07-14 15:51:58 +00:00
committed by James
parent fea67ae35b
commit 35969ba62c
2 changed files with 38 additions and 1 deletions

View File

@ -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
View 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')
}
}
}
}
}