Merge pull request #475 from danielr1996/main

ci: add helm package/push to Jenkinsfile
This commit is contained in:
Anthony Stirling 2023-11-30 20:08:31 +00:00 committed by GitHub
commit 15fa3df424
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 5 deletions

View file

@ -140,3 +140,7 @@ jobs:
tags: ${{ steps.meta3.outputs.tags }} tags: ${{ steps.meta3.outputs.tags }}
labels: ${{ steps.meta3.outputs.labels }} labels: ${{ steps.meta3.outputs.labels }}
platforms: linux/amd64,linux/arm64/v8 platforms: linux/amd64,linux/arm64/v8
- name: Build and Push Helm Chart
run: |
helm package chart/stirling-pdf
helm push stirling-pdf-chart-1.0.0.tgz oci://registry-1.docker.io/frooodle

20
Jenkinsfile vendored
View file

@ -22,12 +22,24 @@ pipeline {
def appVersion = sh(returnStdout: true, script: './gradlew printVersion -q').trim() def appVersion = sh(returnStdout: true, script: './gradlew printVersion -q').trim()
def image = "frooodle/s-pdf:$appVersion" def image = "frooodle/s-pdf:$appVersion"
withCredentials([string(credentialsId: 'docker_hub_access_token', variable: 'DOCKER_HUB_ACCESS_TOKEN')]) { withCredentials([string(credentialsId: 'docker_hub_access_token', variable: 'DOCKER_HUB_ACCESS_TOKEN')]) {
sh "docker login --username frooodle --password $DOCKER_HUB_ACCESS_TOKEN" sh "docker login --username frooodle --password $DOCKER_HUB_ACCESS_TOKEN"
sh "docker push $image" sh "docker push $image"
} }
} }
} }
}
} stage('Helm Push') {
} steps {
script {
//TODO: Read chartVersion from Chart.yaml
def chartVersion = '1.0.0'
withCredentials([string(credentialsId: 'docker_hub_access_token', variable: 'DOCKER_HUB_ACCESS_TOKEN')]) {
sh "docker login --username frooodle --password $DOCKER_HUB_ACCESS_TOKEN"
sh "helm package chart/stirling-pdf"
sh "helm push stirling-pdf-chart-1.0.0.tgz oci://registry-1.docker.io/frooodle"
}
}
}
}
}
} }

View file

@ -9,7 +9,7 @@ keywords:
maintainers: maintainers:
- name: Frooodle - name: Frooodle
url: https://github.com/Frooodle/Stirling-PDF url: https://github.com/Frooodle/Stirling-PDF
name: stirling-pdf name: stirling-pdf-chart
sources: sources:
- https://github.com/Frooodle/Stirling-PDF - https://github.com/Frooodle/Stirling-PDF
version: 1.0.0 version: 1.0.0