Edit.
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1 +1,3 @@
|
|||||||
*.tgz
|
*.tgz
|
||||||
|
.sec
|
||||||
|
.env
|
||||||
85
Taskfile.yml
85
Taskfile.yml
@@ -8,6 +8,11 @@ vars:
|
|||||||
password: r4E-C9C-iBD-JK2
|
password: r4E-C9C-iBD-JK2
|
||||||
owner: helm
|
owner: helm
|
||||||
chart_file: ""
|
chart_file: ""
|
||||||
|
CHART_FILE: "11"
|
||||||
|
# env:
|
||||||
|
|
||||||
|
dotenv: [".sec"]
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
# gitea-helm-publish:
|
# gitea-helm-publish:
|
||||||
# desc: Publish Helm chart to Gitea
|
# desc: Publish Helm chart to Gitea
|
||||||
@@ -24,16 +29,41 @@ tasks:
|
|||||||
desc: Отправка Helm chart в Gitea
|
desc: Отправка Helm chart в Gitea
|
||||||
vars:
|
vars:
|
||||||
repo: helm-charts
|
repo: helm-charts
|
||||||
chart_file: c:\\r\\helm-charts\\gitea\\gitea-11.0.1.tgz
|
chart_file: "{{ .TASK_OUTPUT.gitea_helm_pack }}"
|
||||||
dir: .
|
dir: .
|
||||||
cmds:
|
cmds:
|
||||||
- dir=$(pwd)
|
- task: gitea_helm_pack # Выполняем задачу для получения chart_file
|
||||||
|
- echo "Chart file {{ .chart_file }}"
|
||||||
|
# - helm repo add --username {{ .username }} --password {{ .password }} {{ .repo }} https://{{ .gitea_url }}/api/packages/{{ .owner }}/helm
|
||||||
|
# - helm cm-push "{{ .chart_file }}" {{ .repo }}
|
||||||
|
|
||||||
|
gitea_helm_pack:
|
||||||
|
desc: Pack Helm chart for Gitea
|
||||||
|
vars:
|
||||||
|
repo: helm-charts
|
||||||
|
chart_file: ""
|
||||||
|
dir: ./gitea
|
||||||
|
cmds:
|
||||||
|
- rm -f *.tgz
|
||||||
|
- |
|
||||||
|
output=$(helm package .)
|
||||||
|
# Получаем только последний токен из вывода, который содержит имя созданного .tgz файла
|
||||||
|
chart_file=$(echo "$output" | awk '{print $NF}')
|
||||||
|
# Выводим значение без лишних символов, чтобы его можно было корректно захватить как TASK_OUTPUT
|
||||||
|
echo "$chart_file"
|
||||||
|
- task: helm-push
|
||||||
|
# vars: { chart_file: {{ .chart_file }}, repo: "www" }
|
||||||
|
|
||||||
- task: gitea-helm-pack
|
|
||||||
- helm repo add --username {{.username}} --password {{.password}} {{.repo}} https://{{.gitea_url}}/api/packages/{{.owner}}/helm
|
|
||||||
- helm cm-push {{.chart_file}} {{.repo}}
|
|
||||||
silent: true
|
silent: true
|
||||||
argocd-helm-pub:
|
helm:push:
|
||||||
|
desc: Установка плагина helm-push
|
||||||
|
dir: .
|
||||||
|
vars:
|
||||||
|
repo: '{{default "helm-charts" .repo}}'
|
||||||
|
chart_file: '{{default "" .chart_file}}'
|
||||||
|
cmds:
|
||||||
|
- echo "{{ .repo }} {{ .chart_file }}"
|
||||||
|
helm:argocd-pub:
|
||||||
desc: Отправка Helm chart в Gitea
|
desc: Отправка Helm chart в Gitea
|
||||||
vars:
|
vars:
|
||||||
repo: helm-charts
|
repo: helm-charts
|
||||||
@@ -46,28 +76,43 @@ tasks:
|
|||||||
- helm repo add --username {{.username}} --password {{.password}} {{.repo}} https://{{.gitea_url}}/api/packages/{{.owner}}/helm
|
- helm repo add --username {{.username}} --password {{.password}} {{.repo}} https://{{.gitea_url}}/api/packages/{{.owner}}/helm
|
||||||
- helm cm-push {{.chart_file}} {{.repo}}
|
- helm cm-push {{.chart_file}} {{.repo}}
|
||||||
silent: true
|
silent: true
|
||||||
gitea-helm-pack:
|
|
||||||
desc: Pack Helm chart for Gitea
|
|
||||||
vars:
|
|
||||||
chart_file: gitea-11.0.0.tgz
|
|
||||||
dir: ./gitea
|
|
||||||
cmds:
|
|
||||||
- rm -f *.tgz
|
|
||||||
- helm package .
|
|
||||||
silent: true
|
|
||||||
argocd-helm-pack:
|
argocd-helm-pack:
|
||||||
desc: Pack Helm chart for ArgoCD
|
desc: Pack Helm chart for ArgoCD
|
||||||
vars:
|
# vars:
|
||||||
chart_file: gitea-11.0.0.tgz
|
# CHART_FILE: gitea-11.0.0.tgz
|
||||||
dir: ./argo-cd
|
dir: ./argo-cd
|
||||||
cmds:
|
cmds:
|
||||||
- rm -f *.tgz
|
- rm -f *.tgz
|
||||||
- helm package .
|
- CHART_FILE=$(helm package . | grep "Successfully packaged" | awk '{print $NF}')
|
||||||
silent: true
|
- echo "File-$CHART_FILE-"
|
||||||
|
# silent: true
|
||||||
helm-push-inst:
|
helm-push-inst:
|
||||||
desc: Установка плагина helm-push
|
desc: Установка плагина helm-push
|
||||||
dir: .
|
dir: .
|
||||||
cmds:
|
cmds:
|
||||||
- helm plugin install https://github.com/chartmuseum/helm-push
|
- helm plugin install https://github.com/chartmuseum/helm-push
|
||||||
silent: true
|
silent: true
|
||||||
|
greet:
|
||||||
|
vars:
|
||||||
|
RECIPIENT: '{{default "World" .RECIPIENT}}'
|
||||||
|
cmds:
|
||||||
|
- echo "Hello, {{.RECIPIENT}}!"
|
||||||
|
|
||||||
|
greet-pessimistically:
|
||||||
|
cmds:
|
||||||
|
- task: greet
|
||||||
|
vars: { RECIPIENT: 'Cruel World' }
|
||||||
|
silent: true
|
||||||
|
helm:argocd-build-pub:
|
||||||
|
desc: Отправка Helm chart в Gitea
|
||||||
|
vars:
|
||||||
|
repo: helm-charts
|
||||||
|
chart_name: argo-cd
|
||||||
|
dir: .
|
||||||
|
cmds:
|
||||||
|
- dir=$(pwd)
|
||||||
|
|
||||||
|
# - task: argocd-helm-pack
|
||||||
|
- helm repo add --username {{.username}} --password {{.password}} {{.repo}} https://{{.gitea_url}}/api/packages/{{.owner}}/helm
|
||||||
|
- helm cm-push {{.chart_name}} {{.repo}}
|
||||||
|
silent: true
|
||||||
|
|||||||
@@ -28,4 +28,4 @@ name: argo-cd
|
|||||||
sources:
|
sources:
|
||||||
- https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd
|
- https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd
|
||||||
- https://github.com/argoproj/argo-cd
|
- https://github.com/argoproj/argo-cd
|
||||||
version: 7.8.10
|
version: 7.8.11
|
||||||
|
|||||||
@@ -45,4 +45,4 @@ sources:
|
|||||||
- https://github.com/go-gitea/gitea
|
- https://github.com/go-gitea/gitea
|
||||||
- https://hub.docker.com/r/gitea/gitea/
|
- https://hub.docker.com/r/gitea/gitea/
|
||||||
type: application
|
type: application
|
||||||
version: 11.0.1
|
version: 11.0.2
|
||||||
|
|||||||
Reference in New Issue
Block a user