generated from giantswarm/template-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 984bfb1
Showing
26 changed files
with
1,822 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
chart-dir: helm/etcd-defrag | ||
replace-chart-version-with-git: true | ||
generate-metadata: true | ||
catalog-base-url: https://giantswarm.github.io/default-catalog/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
architect: giantswarm/[email protected] | ||
|
||
workflows: | ||
build: | ||
jobs: | ||
- architect/push-to-app-catalog: | ||
name: push-to-default-catalog | ||
context: architect | ||
executor: app-build-suite | ||
chart: etcd-defrag | ||
app_catalog: default-catalog | ||
app_catalog_test: default-test-catalog | ||
filters: | ||
branches: | ||
ignore: | ||
- main | ||
- master | ||
tags: | ||
only: /^v.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Add appropriate labels to issue | ||
|
||
on: | ||
issues: | ||
types: [assigned] | ||
|
||
jobs: | ||
build_user_list: | ||
name: Get yaml config of GS users | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get user-mapping | ||
run: | | ||
mkdir -p artifacts | ||
wget --header "Authorization: token ${{ secrets.ISSUE_AUTOMATION }}" \ | ||
-O artifacts/users.yaml \ | ||
https://raw.githubusercontent.com/giantswarm/github/main/tools/issue-automation/user-mapping.yaml | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: users | ||
path: artifacts/users.yaml | ||
retention-days: 1 | ||
|
||
add_label: | ||
name: Add team label when assigned | ||
runs-on: ubuntu-latest | ||
needs: build_user_list | ||
steps: | ||
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
id: download-users | ||
with: | ||
name: users | ||
- name: Find team label based on user names | ||
run: | | ||
event_assignee=$(cat $GITHUB_EVENT_PATH | jq -r .assignee.login | tr '[:upper:]' '[:lower:]') | ||
echo "Issue assigned to: ${event_assignee}" | ||
TEAMS=$(cat ${{steps.download-users.outputs.download-path}}/users.yaml | tr '[:upper:]' '[:lower:]' | yq ".${event_assignee}.teams" -o csv | tr ',' ' ') | ||
echo "LABEL<<EOF" >> $GITHUB_ENV | ||
for team in ${TEAMS}; do | ||
echo "Team: ${team} | Label: team/${team}" | ||
echo "team/${team}" >> $GITHUB_ENV | ||
done | ||
echo "EOF" >> $GITHUB_ENV | ||
- name: Apply label to issue | ||
if: ${{ env.LABEL != '' && env.LABEL != 'null' && env.LABEL != null }} | ||
uses: actions-ecosystem/action-add-labels@bd52874380e3909a1ac983768df6976535ece7f8 # v1.1.3 | ||
with: | ||
github_token: ${{ secrets.ISSUE_AUTOMATION }} | ||
labels: | | ||
${{ env.LABEL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: Add Issue to Project when assigned | ||
|
||
on: | ||
issues: | ||
types: | ||
- assigned | ||
- labeled | ||
|
||
jobs: | ||
build_user_list: | ||
name: Get yaml config of GS users | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get user-mapping | ||
run: | | ||
mkdir -p artifacts | ||
wget --header "Authorization: token ${{ secrets.ISSUE_AUTOMATION }}" \ | ||
-O artifacts/users.yaml \ | ||
https://raw.githubusercontent.com/giantswarm/github/main/tools/issue-automation/user-mapping.yaml | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: users | ||
path: artifacts/users.yaml | ||
retention-days: 1 | ||
- name: Get label-mapping | ||
run: | | ||
mkdir -p artifacts | ||
wget --header "Authorization: token ${{ secrets.ISSUE_AUTOMATION }}" \ | ||
-O artifacts/labels.yaml \ | ||
https://raw.githubusercontent.com/giantswarm/github/main/tools/issue-automation/label-mapping.yaml | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: labels | ||
path: artifacts/labels.yaml | ||
retention-days: 1 | ||
|
||
add_to_personal_board: | ||
name: Add issue to personal board | ||
runs-on: ubuntu-latest | ||
needs: build_user_list | ||
if: github.event.action == 'assigned' | ||
steps: | ||
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
id: download-users | ||
with: | ||
name: users | ||
- name: Find personal board based on user names | ||
run: | | ||
event_assignee=$(cat $GITHUB_EVENT_PATH | jq -r .assignee.login | tr '[:upper:]' '[:lower:]') | ||
echo "Issue assigned to: ${event_assignee}" | ||
BOARD=($(cat ${{steps.download-users.outputs.download-path}}/users.yaml | tr '[:upper:]' '[:lower:]' | yq ".${event_assignee}.personalboard")) | ||
echo "Personal board URL: ${BOARD}" | ||
echo "BOARD=${BOARD}" >> $GITHUB_ENV | ||
- name: Add issue to personal board | ||
if: ${{ env.BOARD != 'null' && env.BOARD != '' && env.BOARD != null }} | ||
uses: actions/add-to-project@9bfe908f2eaa7ba10340b31e314148fcfe6a2458 # v1.0.1 | ||
with: | ||
project-url: ${{ env.BOARD }} | ||
github-token: ${{ secrets.ISSUE_AUTOMATION }} | ||
|
||
add_to_team_board: | ||
name: Add issue to team board | ||
runs-on: ubuntu-latest | ||
needs: build_user_list | ||
if: github.event.action == 'labeled' | ||
steps: | ||
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
id: download-labels | ||
with: | ||
name: labels | ||
- name: Find team board based on label | ||
run: | | ||
event_label=$(cat $GITHUB_EVENT_PATH | jq -r .label.name | tr '[:upper:]' '[:lower:]') | ||
echo "Issue labelled with: ${event_label}" | ||
BOARD=($(cat ${{steps.download-labels.outputs.download-path}}/labels.yaml | tr '[:upper:]' '[:lower:]' | yq ".[\"${event_label}\"].projectboard")) | ||
echo "Team board URL: ${BOARD}" | ||
echo "BOARD=${BOARD}" >> $GITHUB_ENV | ||
- name: Add issue to team board | ||
if: ${{ env.BOARD != 'null' && env.BOARD != '' && env.BOARD != null }} | ||
uses: actions/add-to-project@9bfe908f2eaa7ba10340b31e314148fcfe6a2458 # v1.0.1 | ||
with: | ||
project-url: ${{ env.BOARD }} | ||
github-token: ${{ secrets.ISSUE_AUTOMATION }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# DO NOT EDIT. Generated with: | ||
# | ||
# devctl | ||
# | ||
# https://github.com/giantswarm/devctl/blob/8960b8810d2fdb97543d84baa8b50ffa40da26a9/pkg/gen/input/workflows/internal/file/check_values_schema.yaml.template | ||
# | ||
name: 'Values and schema' | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
paths: | ||
- 'helm/**/values.yaml' # default helm chart values | ||
- 'helm/**/values.schema.json' # schema | ||
- 'helm/**/ci/ci-values.yaml' # overrides for CI (can contain required entries) | ||
|
||
push: {} | ||
|
||
jobs: | ||
check: | ||
name: 'validate values.yaml against values.schema.json' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install validator | ||
run: | | ||
wget -q -O ${HOME}/yajsv https://github.com/neilpa/yajsv/releases/download/v1.4.1/yajsv.linux.amd64 | ||
chmod +x ${HOME}/yajsv | ||
- name: 'Check if values.yaml is a valid instance of values.schema.json' | ||
run: | | ||
for chart_yaml in helm/*/Chart.yaml; do | ||
helm_dir="${chart_yaml%/Chart.yaml}" | ||
if [ ! -f ${helm_dir}/values.schema.json ]; then | ||
echo "Skipping validation for '${helm_dir}' folder, because 'values.schema.json' does not exist..." | ||
continue | ||
fi | ||
values=${helm_dir}/values.yaml | ||
if [ -f ${helm_dir}/ci/ci-values.yaml ]; then | ||
# merge ci-values.yaml into values.yaml (providing required values) | ||
echo -e "\nMerged values:\n==============" | ||
yq '. *= load("'${helm_dir}'/ci/ci-values.yaml")' ${helm_dir}/values.yaml | tee ${helm_dir}/combined-values.yaml | ||
echo -e "\n==============\n" | ||
values=${helm_dir}/combined-values.yaml | ||
fi | ||
${HOME}/yajsv -s ${helm_dir}/values.schema.json ${values} | ||
done |
Oops, something went wrong.