-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into alokshin/CCIE-1977-support-pod-disruption-bu…
…dgets
- Loading branch information
Showing
112 changed files
with
7,780 additions
and
976 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,49 @@ | ||
on: | ||
- pull_request | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
name: api-ent-schema | ||
jobs: | ||
api_changes: | ||
runs-on: [ARM64, self-hosted, Linux] | ||
permissions: | ||
pull-requests: read | ||
outputs: | ||
run_api_ci: ${{ steps.filter.outputs.dependencies }} | ||
steps: | ||
- name: Check for changed files | ||
uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
filters: | | ||
dependencies: | ||
- '.github/**' | ||
- 'api/**' | ||
- 'shared/**' | ||
update-api-ent-schema: | ||
needs: api_changes | ||
if: ${{ needs.api_changes.outputs.run_api_ci == 'true' }} | ||
runs-on: [ARM64, self-hosted, Linux] | ||
steps: | ||
- name: Generate token | ||
id: generate_token | ||
uses: chanzuckerberg/[email protected] | ||
with: | ||
app_id: ${{ secrets.CZI_GITHUB_HELPER_APP_ID }} | ||
private_key: ${{ secrets.CZI_GITHUB_HELPER_PK }} | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ steps.generate_token.outputs.token }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: api/go.mod | ||
cache: true | ||
- run: make update-ent-schema | ||
working-directory: api | ||
- uses: EndBug/add-and-commit@v9 | ||
with: | ||
add: -A | ||
message: ci - update ent schema |
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,102 @@ | ||
name: Release Charts | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check-chart-released: | ||
runs-on: [ARM64, self-hosted, Linux] | ||
steps: | ||
- name: Check Release | ||
id: chart_released | ||
uses: actions/github-script@v5 | ||
with: | ||
script: | | ||
core.setOutput("released", context.ref.includes('refs/tags/happy-stack-helm')) | ||
core.setOutput("tag", context.ref.split("/").pop()) | ||
outputs: | ||
chart_released: ${{ steps.chart_released.outputs.released }} | ||
tag: ${{ steps.chart_released.outputs.tag }} | ||
release: | ||
if: ${{ needs.check-chart-released.outputs.chart_released == 'true' }} | ||
needs: | ||
- check-chart-released | ||
# NOTE: needs to be X64 because of helm-releaser | ||
runs-on: [ARM64, self-hosted, Linux] | ||
steps: | ||
- name: Generate token | ||
id: generate_token | ||
uses: chanzuckerberg/[email protected] | ||
with: | ||
app_id: ${{ secrets.CZI_RELEASE_PLEASE_APP_ID }} | ||
private_key: ${{ secrets.CZI_RELEASE_PLEASE_PK }} | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
path: main | ||
token: ${{ steps.generate_token.outputs.token }} | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
path: chart-repo | ||
repository: chanzuckerberg/happy-helm-charts | ||
token: ${{ steps.generate_token.outputs.token }} | ||
- name: Publish charts | ||
run: | | ||
set -ue | ||
set -o pipefail | ||
# install helm | ||
RELEASE_URL=https://get.helm.sh/helm-v3.13.1-linux-arm64.tar.gz | ||
DIR_NAME=helm | ||
OUT_DIR="/tmp/${DIR_NAME}" | ||
mkdir -p ${OUT_DIR} | ||
OUT_FILE="${OUT_DIR}/helm.tar.gz" | ||
curl -sSL ${RELEASE_URL} -o ${OUT_FILE} | ||
tar -zxf ${OUT_FILE} -C ${OUT_DIR} | ||
HELM_CMD=$(find ${OUT_DIR} -type f -name "helm") | ||
chmod +x ${HELM_CMD} | ||
# install ghcli | ||
GHCLI_URL="https://github.com/cli/cli/releases/download/v2.30.0/gh_2.30.0_linux_arm64.tar.gz" | ||
GHCLI_DIR_NAME=ghcli | ||
GHCLI_TOOL_PATH="/tmp/${GHCLI_DIR_NAME}" | ||
mkdir -p ${GHCLI_TOOL_PATH} | ||
GHCLI_OUT_FILE="${GHCLI_TOOL_PATH}/ghcli.tar.gz" | ||
curl -sSL $GHCLI_URL -L -o ${GHCLI_OUT_FILE} | ||
tar -zxf ${GHCLI_OUT_FILE} -C ${GHCLI_TOOL_PATH} --strip-components 1 | ||
GHCLI_CMD=$(find ${GHCLI_TOOL_PATH} -type f -name "gh") | ||
${GHCLI_CMD} auth login --with-token < <(echo $GH_CRED) | ||
${GHCLI_CMD} auth status | ||
# packages will be uploaded to their release | ||
PACKAGE_DIR="/tmp" | ||
# the index.yaml file will be hosted by the happy github pages site | ||
INDEX_DIR="${GITHUB_WORKSPACE}/chart-repo" | ||
# the location of the chart package | ||
CHARTS_DIR="${GITHUB_WORKSPACE}/main/helm-charts/charts/stack" | ||
# location of release to download the chart from | ||
CHART_DOWNLOAD_URL="https://github.com/chanzuckerberg/${{ github.repository }}/releases/download/${{ needs.check-chart-released.outputs.tag }}" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "CZI Happy Helm Publisher Bot" | ||
cd main | ||
${HELM_CMD} package ${CHARTS_DIR} -d ${PACKAGE_DIR} | ||
${GHCLI_CMD} release upload ${{ needs.check-chart-released.outputs.tag }} ${PACKAGE_DIR}/*.tgz --clobber | ||
${HELM_CMD} repo index ${PACKAGE_DIR} --url ${CHART_DOWNLOAD_URL} --merge ${INDEX_DIR}/index.yaml | ||
cd ../chart-repo | ||
mv ${PACKAGE_DIR}/index.yaml .${INDEX_DIR}/index.yaml | ||
git add -A | ||
git commit -m "chore: publish charts from ${{ github.repository }} ${{ needs.check-chart-released.outputs.tag }}" | ||
git push | ||
env: | ||
GH_CRED: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -1,21 +1,22 @@ | ||
{ | ||
"cli": "0.110.1", | ||
"api": "0.110.1", | ||
"shared": "0.110.1", | ||
"terraform/provider": "0.110.1", | ||
"cli": "0.113.1", | ||
"api": "0.113.1", | ||
"shared": "0.113.1", | ||
"terraform/provider": "0.113.1", | ||
"terraform/modules/happy-dns-ecs": "1.5.0", | ||
"terraform/modules/happy-env-ecs": "3.3.0", | ||
"terraform/modules/happy-env-eks": "4.12.2", | ||
"terraform/modules/happy-github-ci-role": "1.4.2", | ||
"terraform/modules/happy-github-ci-role": "1.5.0", | ||
"terraform/modules/happy-route53": "1.3.0", | ||
"terraform/modules/happy-service-ecs": "2.1.0", | ||
"terraform/modules/happy-service-eks": "3.17.0", | ||
"terraform/modules/happy-service-eks": "3.17.2", | ||
"terraform/modules/happy-stack-ecs": "2.1.0", | ||
"terraform/modules/happy-stack-eks": "4.19.0", | ||
"terraform/modules/happy-stack-eks": "4.20.0", | ||
"terraform/modules/happy-tfe-okta-app": "3.0.0", | ||
"terraform/modules/happy-tfe-user": "1.3.0", | ||
"terraform/modules/happy-ingress-eks": "2.9.0", | ||
"hvm": "0.110.1", | ||
"hvm": "0.113.1", | ||
"hapi-proto": "0.1.0", | ||
"terraform/modules/happy-cloudfront": "1.0.0" | ||
"terraform/modules/happy-cloudfront": "1.0.0", | ||
"helm-charts/charts/stack": "0.1.0" | ||
} |
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
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
gorm.db | ||
hapi.db | ||
happy-api | ||
api | ||
/api | ||
|
||
.vscode/ | ||
node_modules/ |
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
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
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
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
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
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
Oops, something went wrong.