build: start tracking rbac generated from helm chart
This is a starting step to be able to generate common.yaml from Helm charts. For right now, we merely want to be able to determine when the rendered output of the Helm chart changes. Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
This commit is contained in:
7 files changed
+1409
-1
No files matched your search
@@ -54,6 +54,25 @@ jobs:
|
||||
working-directory: /Users/runner/go/src/github.com/rook/rook
|
||||
run: tests/scripts/validate_modified_files.sh crd
|
||||
|
||||
# needed for gen-rbac
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.9"
|
||||
|
||||
- name: Install pip dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install ruamel.yaml==0.17.16
|
||||
|
||||
- name: run gen-rbac
|
||||
working-directory: /Users/runner/go/src/github.com/rook/rook
|
||||
run: GOPATH=$(go env GOPATH) make gen-rbac
|
||||
|
||||
- name: validate gen-rbac
|
||||
working-directory: /Users/runner/go/src/github.com/rook/rook
|
||||
run: tests/scripts/validate_modified_files.sh gen-rbac
|
||||
|
||||
- name: setup tmate session for debugging
|
||||
if: failure()
|
||||
uses: mxschmitt/action-tmate@v3
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
name: Generate RBAC from Helm charts
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
|
||||
defaults:
|
||||
run:
|
||||
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
|
||||
shell: bash --noprofile --norc -eo pipefail -x {0}
|
||||
|
||||
jobs:
|
||||
gen-rbac:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: copy working directory to GOPATH
|
||||
run: sudo mkdir -p /home/runner/go/src/github.com && sudo cp -a /home/runner/work/rook /home/runner/go/src/github.com/
|
||||
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.9"
|
||||
|
||||
- name: Install pip dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install ruamel.yaml==0.17.16
|
||||
|
||||
- name: run gen-rbac
|
||||
working-directory: /home/runner/go/src/github.com/rook/rook
|
||||
run: GOPATH=$(go env GOPATH) make gen-rbac
|
||||
|
||||
- name: validate gen-rbac
|
||||
working-directory: /home/runner/go/src/github.com/rook/rook
|
||||
run: tests/scripts/validate_modified_files.sh gen-rbac
|
||||
Reference in new issue
Block a user