Restore publish.yaml

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
This commit is contained in:
Oliver Bähler 2021-05-21 17:51:30 +02:00
parent 56701c8f69
commit e8d802c989
No known key found for this signature in database
GPG key ID: 7AE0B2618ECDC1B6

59
.argo/publish.yaml Normal file
View file

@ -0,0 +1,59 @@
---
type: workflow
version: 1
name: Publish Charts
inputs:
parameters:
COMMIT:
default: "%%session.commit%%"
REPO:
default: "%%session.repo%%"
steps:
- CHECKOUT:
template: argo-checkout
- PREPARE:
image: hypnoglow/kubernetes-helm:v2.6.1
resources:
mem_mib: 500
cpu_cores: 0.1
command: ["sh", "-c"]
args: [cd /src && helm init --client-only && ./scripts/publish.sh]
inputs:
artifacts:
CODE:
from: "%%steps.CHECKOUT.outputs.artifacts.CODE%%"
path: /src
outputs:
artifacts:
CODE:
path: /src/output
- PUBLISH:
image: argoproj/argoscm:v2.0
command: ["sh", "-c"]
args: [
axscm clone %%inputs.parameters.REPO%% --commit gh-pages /src && cd /src && cp -r /output/* . &&
git add . && git commit -m "Build on `date`" &&
axscm clone %%inputs.parameters.REPO%% /src --commit gh-pages --merge=gh-pages --push]
resources:
mem_mib: 500
cpu_cores: 0.1
inputs:
artifacts:
CODE:
from: "%%steps.PREPARE.outputs.artifacts.CODE%%"
path: /output
---
type: policy
version: 1
name: Publish Charts Policy
template: Publish Charts
notifications:
- when:
- on_failure
whom:
- committer
- author
when:
- event: on_push