Skip to content

Commit

Permalink
🧝‍♂️ chart publish action added 🧝‍♂️ (#85)
Browse files Browse the repository at this point in the history
* 🐈gh action added to release charts🐈

* 🐈only run on chart changes🐈

* 🥲 apiVersion is added to all charts🥲

* 🫠bumping the version to release the chart🫠

* 😪helm linting asking for maintainers😪

* 😪helm linting asking for maintainers😪

* 😭linter wants new line at end of file😭

* 🫥  batch/v1beta1  cronjo is deprecated 🫥

* 😭linter wants new line at end of file😭

* 😪helm linting doesn't like too few spaces before comment😪

* 😪helm linting doesn't like too few spaces before comment😪

* 😪helm linting doesn't like too few spaces before comment😪
  • Loading branch information
ckavili authored Oct 11, 2022
1 parent 82659b3 commit 767adb3
Show file tree
Hide file tree
Showing 25 changed files with 143 additions and 37 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Lint and Test Charts

on:
pull_request:
paths:
- 'charts/**'

jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Fetch history
run: git fetch --prune --unshallow

- name: Set up Helm
uses: azure/setup-helm@v2.1
with:
version: v3.5.1

- uses: actions/setup-python@v4
with:
python-version: 3.7

- name: Run chart-testing (lint)
id: lint
uses: helm/chart-testing-action@v2.2.1

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint
38 changes: 38 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release Charts

on:
push:
branches:
- master
paths:
- 'charts/**'

jobs:
release:
concurrency: staging_environment
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v2.1
with:
version: latest

- name: Add dependency chart repos
run: |
helm repo add stable https://charts.helm.sh/stable
helm repo add incubator https://charts.helm.sh/incubator
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.4.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
8 changes: 5 additions & 3 deletions charts/cluster-descheduler/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
description: Descheduler to remove pods violating usage thresholds, affinity violations
and duplicate pod placements
apiVersion: v2
description: Descheduler to remove pods violating usage thresholds, affinity violations and duplicate pod placements
name: cluster-descheduler
tags: management,descheduler
version: v0.0.1
version: 0.0.3
maintainers:
- name: redhat-cop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
Expand Down
4 changes: 2 additions & 2 deletions charts/cluster-descheduler/templates/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
labels:
Expand Down Expand Up @@ -35,5 +35,5 @@ spec:
- configMap:
name: descheduler-policy-configmap
name: policy-volume
schedule: {{ .Values.schedule }}
schedule: {{ .Values.schedule | quote }}
successfulJobsHistoryLimit: "1"
5 changes: 4 additions & 1 deletion charts/cronjob-aws-ocp-snap/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
apiVersion: v2
name: cronjob-aws-ocp-snap
version: v0.0.1
version: 0.0.2
maintainers:
- name: redhat-cop
2 changes: 1 addition & 1 deletion charts/cronjob-aws-ocp-snap/templates/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
labels:
Expand Down
4 changes: 3 additions & 1 deletion charts/cronjob-etcd-backup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ apiVersion: v2
name: cronjob-etcd-backup
description: Deploys a CronJob for creating automated backups of ETCD and storing them on a PersistentVolume
type: application
version: 1.0.0
version: 1.0.1
maintainers:
- name: redhat-cop
5 changes: 4 additions & 1 deletion charts/cronjob-git-sync/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
apiVersion: v2
description: Scheduled Task to Perform Git Repo Synchronization
name: cronjob-git-sync
tags: management,cronjob,git,sync
version: v0.0.1
version: 0.0.2
maintainers:
- name: redhat-cop
4 changes: 2 additions & 2 deletions charts/cronjob-git-sync/templates/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
labels:
Expand Down Expand Up @@ -51,5 +51,5 @@ spec:
- name: secret-volume
secret:
secretName: {{ .Values.ssh_key_secret_name }}
schedule: {{ .Values.schedule }}
schedule: {{ .Values.schedule | quote }}
successfulJobsHistoryLimit: {{ .Values.success_jobs_history_limit }}
6 changes: 3 additions & 3 deletions charts/cronjob-gitlab-delete-projects/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: gitlab-cleanup
description: A Helm chart to clean up stale gitlab groups and projects

type: application

version: v0.1.0
version: 0.1.1
appVersion: v0.1.0
maintainers:
- name: redhat-cop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
labels:
Expand Down
18 changes: 9 additions & 9 deletions charts/cronjob-gitlab-delete-projects/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ name: gitlab-cleanup

image:
name: "quay.io/redhat-cop/gitlab-cleanup"
tag: "master" # This is intended to be overridden by the parent Helm chart.
tag: "master" # This is intended to be overridden by the parent Helm chart.

generateSecret: false # set true if you want to create the secret data file.
generateSecret: false # set true if you want to create the secret data file.

env:
secret:
name: secret-gitlab-info # cronjob references this secret
personalAccessToken: xxxx # real value needed if generateSecret=true
notificationToken: yyyy # real value needed if generateSecret=true
gitlabApiUrl: http://gitlab.ca
parentGroupId: 6 # top level group to search
deleteAfterInHours: 876000 # 1 year
dryRun: TRUE # set this to false to delete something
name: secret-gitlab-info # cronjob references this secret
personalAccessToken: xxxx # real value needed if generateSecret=true
notificationToken: yyyy # real value needed if generateSecret=true
gitlabApiUrl: http://gitlab.ca
parentGroupId: 6 # top level group to search
deleteAfterInHours: 876000 # 1 year
dryRun: TRUE # set this to false to delete something
logLevel: DEBUG

cron:
Expand Down
5 changes: 4 additions & 1 deletion charts/cronjob-ldap-group-sync-secure/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
apiVersion: v2
description: Scheduled Task to Perform LDAP Group Synchronization
name: cronjob-ldap-group-sync-secure
tags: management,cronjob,ldap,group,sync
version: v0.0.1
version: 0.0.2
maintainers:
- name: redhat-cop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
labels:
Expand Down
5 changes: 4 additions & 1 deletion charts/cronjob-ldap-group-sync/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
apiVersion: v2
description: Scheduled Task to Perform LDAP Group Synchronization
name: cronjob-ldap-group-sync
tags: management,cronjob,ldap,group,sync
version: v0.0.1
version: 0.0.2
maintainers:
- name: redhat-cop
2 changes: 1 addition & 1 deletion charts/cronjob-ldap-group-sync/templates/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
labels:
Expand Down
5 changes: 4 additions & 1 deletion charts/cronjob-prune-builds-deployments/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
apiVersion: v2
description: Scheduled Task to Prune Builds or Deployments
name: cronjob-prune-builds-deployments
tags: management,cronjob,prune,builds,deployments
version: v0.0.1
version: 0.0.2
maintainers:
- name: redhat-cop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
labels:
Expand Down
5 changes: 4 additions & 1 deletion charts/cronjob-prune-images/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
apiVersion: v2
description: Scheduled Task to Prune Images from Internal Docker Registry
name: cronjob-prune-images
tags: management,cronjob,prune,images
version: v0.0.1
version: 0.0.2
maintainers:
- name: redhat-cop
2 changes: 1 addition & 1 deletion charts/cronjob-prune-images/templates/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
labels:
Expand Down
5 changes: 4 additions & 1 deletion charts/cronjob-prune-projects/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
apiVersion: v2
name: cronjob-prune-projects
version: v0.0.1
version: 0.0.2
maintainers:
- name: redhat-cop
2 changes: 1 addition & 1 deletion charts/cronjob-prune-projects/templates/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
labels:
Expand Down
5 changes: 4 additions & 1 deletion charts/cronjob-prune-tekton-pipelinerun/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
apiVersion: v2
description: Scheduled task to prune pipelinerun from tekton
name: cronjob-prune-tekton-pipelinerun
tags: management,cronjob,prune,tekton,pipelinerun
version: v0.0.1
version: 0.0.2
maintainers:
- name: redhat-cop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
labels:
Expand Down

0 comments on commit 767adb3

Please sign in to comment.