Test Release
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
This commit is contained in:
parent
3337da8ca6
commit
0cea75c3a5
12 changed files with 53 additions and 145 deletions
|
@ -1,58 +0,0 @@
|
|||
---
|
||||
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
|
|
@ -6,37 +6,8 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- run: ct lint --config .github/ct.yaml --lint-conf .github/lintconf.yaml
|
||||
|
||||
# Technically this only needs to be run on master, but it's good to have it run on every PR
|
||||
# so that it is regularly tested.
|
||||
publish:
|
||||
docker:
|
||||
# We just need an image with `helm` on it. Handily we know of one already.
|
||||
- image: quay.io/helmpack/chart-testing:v3.3.1
|
||||
steps:
|
||||
# install the additional keys needed to push to GitHub. Alex Collins owns these keys.
|
||||
- add_ssh_keys
|
||||
- run: git config --global user.email "nobody@circleci.com"
|
||||
- run: git config --global user.name "Circle CI Build"
|
||||
- checkout
|
||||
- run: helm repo add stable https://charts.helm.sh/stable
|
||||
- run: helm repo add minio https://helm.min.io/
|
||||
- run: helm repo add argo https://argoproj.github.io/argo-helm
|
||||
- run: helm repo add dandydeveloper https://dandydeveloper.github.io/charts/
|
||||
# Only actually publish charts on master.
|
||||
- run: |
|
||||
set -x
|
||||
if [ "$CIRCLE_BRANCH" = "master" ]; then
|
||||
export GIT_PUSH=true
|
||||
else
|
||||
export GIT_PUSH=false
|
||||
fi
|
||||
sh ./scripts/publish.sh
|
||||
workflows:
|
||||
version: 2
|
||||
workflow:
|
||||
jobs:
|
||||
- lint
|
||||
- publish:
|
||||
requires:
|
||||
- lint
|
||||
- lint
|
2
.github/cr.yaml
vendored
Normal file
2
.github/cr.yaml
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
## Reference: https://github.com/helm/chart-releaser
|
||||
index-path: "./index.yaml"
|
42
.github/workflows/publish.yml
vendored
Normal file
42
.github/workflows/publish.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
name: Chart Publish
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- rewrite-build
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
|
||||
- name: Add dependency chart repos
|
||||
run: |
|
||||
helm repo add argo https://argoproj.github.io/argo-helm
|
||||
helm repo add minio https://helm.min.io/
|
||||
helm repo add dandydeveloper https://dandydeveloper.github.io/charts/
|
||||
helm repo add stable https://charts.helm.sh/stable
|
||||
helm repo add incubator https://charts.helm.sh/incubator
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config user.name "$GITHUB_ACTOR"
|
||||
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||
|
||||
## This is required to consider the old Circle-CI Index and to stay compatible with all the old releases.
|
||||
- name: Fetch current Chart Index
|
||||
run: |
|
||||
git checkout origin/gh-pages index.yaml
|
||||
|
||||
- name: Run chart-releaser
|
||||
uses: helm/chart-releaser-action@v1.2.0
|
||||
with:
|
||||
config: "./.github/cr.yaml"
|
||||
env:
|
||||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
@ -86,7 +86,7 @@ As part of the Continuous Integration system we run Helm's [Chart Testing](https
|
|||
|
||||
The checks for this tool are stricter than the standard Helm requirements, where fields normally considered optional like `maintainer` are required in the standard spec and must be valid GitHub usernames.
|
||||
|
||||
Linting configuration can be found in [lintconf.yaml](.circleci/lintconf.yaml)
|
||||
Linting configuration can be found in [ct.yaml](./.github/ct.yaml)
|
||||
|
||||
The linting can be invoked manually with the following command:
|
||||
|
||||
|
@ -96,11 +96,4 @@ The linting can be invoked manually with the following command:
|
|||
|
||||
## Publishing Changes
|
||||
|
||||
Changes are automatically publish whenever a commit is merged to master. The CI job (see `.circleci/config.yaml`) runs this:
|
||||
|
||||
```
|
||||
GIT_PUSH=true ./scripts/publish.sh
|
||||
```
|
||||
|
||||
Script generates tar file for each chart in `charts` directory and push changes to `gh-pages` branch.
|
||||
Write access to https://github.com/argoproj/argo-helm.git is required to publish changes.
|
||||
Changes are automatically publish whenever a commit is merged to master. The CI job (see `./.github/workflows/publish.yml`).
|
|
@ -2,7 +2,7 @@ apiVersion: v2
|
|||
appVersion: 2.0.1
|
||||
description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes.
|
||||
name: argo-cd
|
||||
version: 3.4.0
|
||||
version: 3.4.1
|
||||
home: https://github.com/argoproj/argo-helm
|
||||
icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png
|
||||
keywords:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apiVersion: v2
|
||||
description: A Helm chart to install Argo-Events in k8s Cluster
|
||||
name: argo-events
|
||||
version: 1.4.1
|
||||
version: 1.4.2
|
||||
keywords:
|
||||
- argo-events
|
||||
- sensor-controller
|
||||
|
|
|
@ -2,7 +2,7 @@ apiVersion: v1
|
|||
appVersion: "0.10.2"
|
||||
description: A Helm chart for Argo Rollouts
|
||||
name: argo-rollouts
|
||||
version: 0.5.2
|
||||
version: 0.5.3
|
||||
icon: https://raw.githubusercontent.com/argoproj/argo/master/argo.png
|
||||
home: https://github.com/argoproj/argo-helm
|
||||
maintainers:
|
||||
|
|
|
@ -2,7 +2,7 @@ apiVersion: v2
|
|||
name: argo-workflows
|
||||
description: A Helm chart for Argo Workflows
|
||||
type: application
|
||||
version: 0.1.0
|
||||
version: 0.1.1
|
||||
appVersion: "v3.0.2"
|
||||
icon: https://raw.githubusercontent.com/argoproj/argo-workflows/master/docs/assets/argo.png
|
||||
home: https://github.com/argoproj/argo-helm
|
||||
|
|
|
@ -2,7 +2,7 @@ apiVersion: v2
|
|||
name: argocd-applicationset
|
||||
description: A Helm chart for installing ArgoCD ApplicationSet
|
||||
type: application
|
||||
version: 0.1.4
|
||||
version: 0.1.5
|
||||
appVersion: "v0.1.0"
|
||||
home: https://github.com/argoproj/argo-helm
|
||||
icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png
|
||||
|
|
|
@ -3,7 +3,7 @@ appVersion: 1.1.1
|
|||
description: A Helm chart for ArgoCD notifications, an add-on to ArgoCD.
|
||||
name: argocd-notifications
|
||||
type: application
|
||||
version: 1.3.0
|
||||
version: 1.3.1
|
||||
home: https://github.com/argoproj/argo-helm
|
||||
icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png
|
||||
keywords:
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
SRCROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
GIT_PUSH=${GIT_PUSH:-false}
|
||||
|
||||
rm -rf $SRCROOT/output && git clone -b gh-pages git@github.com:argoproj/argo-helm.git $SRCROOT/output
|
||||
|
||||
helm repo add argoproj https://argoproj.github.io/argo-helm
|
||||
|
||||
for dir in $(find $SRCROOT/charts -mindepth 1 -maxdepth 1 -type d);
|
||||
do
|
||||
rm -rf $dir/charts
|
||||
|
||||
name=$(basename $dir)
|
||||
|
||||
if [ $(helm dep list $dir 2>/dev/null| wc -l) -gt 1 ]
|
||||
then
|
||||
echo "Processing chart dependencies"
|
||||
helm --debug dep build $dir
|
||||
# Bug with Helm subcharts with hyphen on them
|
||||
# https://github.com/argoproj/argo-helm/pull/270#issuecomment-608695684
|
||||
if [ "$name" == "argo-cd" ]
|
||||
then
|
||||
echo "Restore ArgoCD RedisHA subchart"
|
||||
tar -C $dir/charts -xf $dir/charts/redis-ha-*.tgz
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Processing $dir"
|
||||
helm --debug package $dir
|
||||
done
|
||||
|
||||
cp $SRCROOT/*.tgz output/
|
||||
cd $SRCROOT/output && helm repo index .
|
||||
|
||||
cd $SRCROOT/output && git status
|
||||
|
||||
if [ "$GIT_PUSH" == "true" ]
|
||||
then
|
||||
cd $SRCROOT/output && git add . && git commit -m "Publish charts" && git push git@github.com:argoproj/argo-helm.git gh-pages
|
||||
fi
|
Loading…
Reference in a new issue