Skip to content

Commit

Permalink
feat: jobs consolidation
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyaccuknox committed Dec 11, 2024
1 parent 534dbdd commit c1f2df0
Show file tree
Hide file tree
Showing 34 changed files with 10 additions and 1,470 deletions.
38 changes: 10 additions & 28 deletions .github/workflows/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
branches:
- "*"


jobs:
tag-validate:
runs-on: ubuntu-latest
Expand All @@ -19,9 +18,9 @@ jobs:
with:
version: ${{ github.ref_name }}


helm_chart_validation:
runs-on: ubuntu-latest
needs: [tag-validate]
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -32,25 +31,10 @@ jobs:
chmod 700 get_helm.sh
./get_helm.sh
- name: Validate cis-k8s-job
- name: Validate Helm charts
run: |
helm lint cis-k8s-job
helm template cis-k8s-job --dry-run > /dev/null
- name: Validate k8s-risk-assessment-job
run: |
helm lint k8s-risk-assessment-job
helm template k8s-risk-assessment-job --dry-run > /dev/null
- name: Validate k8tls-job
run: |
helm lint k8tls-job
helm template k8tls-job --dry-run > /dev/null
- name: Validate kiem-job
run: |
helm lint kiem-job
helm template kiem-job --dry-run > /dev/null
helm lint accuknox-jobs
helm template accuknox-jobs --dry-run > /dev/null
helm_push_to_ecr:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -82,15 +66,13 @@ jobs:
shell: bash
id: chart-version
run: |
for CHART_DIR in cis-k8s-job k8s-risk-assessment-job k8tls-job kiem-job; do
sed -i "s/^version:.*$/version: ${{ github.ref_name }}/" $CHART_DIR/Chart.yaml
sed -i "s/^appVersion:.*$/appVersion: ${{ github.ref_name }}/" $CHART_DIR/Chart.yaml
done
sed -i "s/^version:.*$/version: ${{ github.ref_name }}/" accuknox-jobs/Chart.yaml
sed -i "s/^appVersion:.*$/appVersion: ${{ github.ref_name }}/" accuknox-jobs/Chart.yaml
- name: Package and Push Helm Charts
run: |
for CHART_DIR in cis-k8s-job k8s-risk-assessment-job k8tls-job kiem-job; do
helm package $CHART_DIR
HELM_PACKAGE=$(ls $CHART_DIR-*.tgz)
helm package accuknox-jobs
HELM_PACKAGE=$(ls accuknox-jobs-*.tgz)
helm push $HELM_PACKAGE oci://${{ secrets.REPO }}
done
23 changes: 0 additions & 23 deletions cis-k8s-job/.helmignore

This file was deleted.

24 changes: 0 additions & 24 deletions cis-k8s-job/Chart.yaml

This file was deleted.

78 changes: 0 additions & 78 deletions cis-k8s-job/README.md

This file was deleted.

Loading

0 comments on commit c1f2df0

Please sign in to comment.