diff --git a/.github/workflows/publish-chart.yaml b/.github/workflows/publish-chart.yaml new file mode 100644 index 0000000..0d27b05 --- /dev/null +++ b/.github/workflows/publish-chart.yaml @@ -0,0 +1,35 @@ +name: Publish chart +on: + push: + tags: + - "v*.*.*" + workflow_dispatch: +jobs: + publish-chart: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.11 + - uses: azure/setup-helm@v3 + with: + token: ${{secrets.GITHUB_TOKEN }} + - name: install dependencies + run: pip install chartpress + - name: Publish chart and images + env: + DOCKER_USERNAME: ${{ secrets.RENKU_DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.RENKU_DOCKER_PASSWORD }} + run: | + cd deploy + git config --global user.email "renku@datascience.ch" + git config --global user.name "Renku Bot" + echo ${DOCKER_PASSWORD}|docker login -u ${DOCKER_USERNAME} --password-stdin + export TAG=${echo ${GITHUB_REF} |cut -d/ -f3} + helm dep update csi-rclone + chartpress --tag $TAG + helm lint csi-rclone + chartpress --tag $TAG --push --publish-chart + chartpress --tag latest --push + diff --git a/deploy/chartpress.yaml b/deploy/chartpress.yaml new file mode 100644 index 0000000..b9012a6 --- /dev/null +++ b/deploy/chartpress.yaml @@ -0,0 +1,14 @@ +charts: + - name: csi-rclone + imagePrefix: renku/ + resetTag: "" + resetVersion: 0.1.0 + repo: + git: SwissDataScienceCenter/helm-charts + published: https://swissdatasciencecenter.github.io/helm-charts + images: + csi-rclone: + contextPath: ../ + dockerFilePath: ../Dockerfile + valuesPath: + - image diff --git a/deploy/chart/.helmignore b/deploy/csi-rclone/.helmignore similarity index 100% rename from deploy/chart/.helmignore rename to deploy/csi-rclone/.helmignore diff --git a/deploy/chart/Chart.yaml b/deploy/csi-rclone/Chart.yaml similarity index 100% rename from deploy/chart/Chart.yaml rename to deploy/csi-rclone/Chart.yaml diff --git a/deploy/chart/templates/_helpers.tpl b/deploy/csi-rclone/templates/_helpers.tpl similarity index 100% rename from deploy/chart/templates/_helpers.tpl rename to deploy/csi-rclone/templates/_helpers.tpl diff --git a/deploy/chart/templates/csi-controller-rbac.yaml b/deploy/csi-rclone/templates/csi-controller-rbac.yaml similarity index 100% rename from deploy/chart/templates/csi-controller-rbac.yaml rename to deploy/csi-rclone/templates/csi-controller-rbac.yaml diff --git a/deploy/chart/templates/csi-controller-rclone.yaml b/deploy/csi-rclone/templates/csi-controller-rclone.yaml similarity index 100% rename from deploy/chart/templates/csi-controller-rclone.yaml rename to deploy/csi-rclone/templates/csi-controller-rclone.yaml diff --git a/deploy/chart/templates/csi-driver.yaml b/deploy/csi-rclone/templates/csi-driver.yaml similarity index 100% rename from deploy/chart/templates/csi-driver.yaml rename to deploy/csi-rclone/templates/csi-driver.yaml diff --git a/deploy/chart/templates/csi-nodeplugin-rbac.yaml b/deploy/csi-rclone/templates/csi-nodeplugin-rbac.yaml similarity index 100% rename from deploy/chart/templates/csi-nodeplugin-rbac.yaml rename to deploy/csi-rclone/templates/csi-nodeplugin-rbac.yaml diff --git a/deploy/chart/templates/csi-nodeplugin-rclone.yaml b/deploy/csi-rclone/templates/csi-nodeplugin-rclone.yaml similarity index 100% rename from deploy/chart/templates/csi-nodeplugin-rclone.yaml rename to deploy/csi-rclone/templates/csi-nodeplugin-rclone.yaml diff --git a/deploy/chart/templates/csi-rclone-namespace.yaml b/deploy/csi-rclone/templates/csi-rclone-namespace.yaml similarity index 100% rename from deploy/chart/templates/csi-rclone-namespace.yaml rename to deploy/csi-rclone/templates/csi-rclone-namespace.yaml diff --git a/deploy/chart/templates/csi-rclone-secret.yaml b/deploy/csi-rclone/templates/csi-rclone-secret.yaml similarity index 100% rename from deploy/chart/templates/csi-rclone-secret.yaml rename to deploy/csi-rclone/templates/csi-rclone-secret.yaml diff --git a/deploy/chart/templates/csi-rclone-storageclass.yaml b/deploy/csi-rclone/templates/csi-rclone-storageclass.yaml similarity index 100% rename from deploy/chart/templates/csi-rclone-storageclass.yaml rename to deploy/csi-rclone/templates/csi-rclone-storageclass.yaml diff --git a/deploy/chart/values.yaml b/deploy/csi-rclone/values.yaml similarity index 100% rename from deploy/chart/values.yaml rename to deploy/csi-rclone/values.yaml diff --git a/devenv/nix/scripts.nix b/devenv/nix/scripts.nix index 7f9e22d..91b1c8d 100644 --- a/devenv/nix/scripts.nix +++ b/devenv/nix/scripts.nix @@ -47,7 +47,7 @@ let kind load docker-image csi-rclone:latest --name csi-rclone-k8s echo "Render helm chart with new container version" - helm template -n csi-rclone csi-rclone deploy/chart > devenv/kind/deploy-kind/csi-rclone-templated-chart.yaml + helm template -n csi-rclone csi-rclone deploy/csi-rclone > devenv/kind/deploy-kind/csi-rclone-templated-chart.yaml # TODO: use tee @@ -80,4 +80,4 @@ let in { inherit initKindCluster deleteKindCluster getKindKubeconfig localDeployScript reloadScript; -} \ No newline at end of file +}