Files
nextcloud-image/Jenkinsfile
Thumbscrew 35969ba62c
Some checks are pending
nextcloud-image/pipeline/head This commit looks good
pipeline-image/pipeline/head Build started...
feat: Jenkinsfile (#5)
Reviewed-on: #5
Co-authored-by: Thumbscrew <thumbscrw@pm.me>
Co-committed-by: Thumbscrew <thumbscrw@pm.me>
2025-07-14 15:51:58 +00:00

37 lines
958 B
Groovy

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