Skip to content

Commit

Permalink
Publish to stable
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 20, 2024
2 parents 077b7ea + 41eeb99 commit 631eaeb
Show file tree
Hide file tree
Showing 91 changed files with 17,449 additions and 17,507 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- name: Get kubectl version
run: |
source hack/lib/kubectl-version.sh
Expand All @@ -29,11 +29,10 @@ jobs:
version: "${{ env.KUBECTL_VERSION }}"
id: install
- name: Run website build
working-directory: website
run: |
export LAB_TIMES_ENABLED='true'
npm install
npm run build
yarn install
yarn workspace website build
build-lab:
name: "Build lab"
Expand All @@ -52,27 +51,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/setup-python@v5
- name: Setup TFLint
uses: terraform-linters/setup-tflint@v4
- name: Setup terraform-docs
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
repo: terraform-docs/terraform-docs
- name: Yarn install
run: |
yarn install
- uses: pre-commit/action@v3.0.1

spell-check:
name: "Spell checker"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- run: |
npx cspell lint "website/docs/**/*.md"
terraform-validate:
name: "Validate Terraform"
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-content.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- name: Get kubectl version
run: |
source hack/lib/kubectl-version.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- name: Get kubectl version
run: |
source hack/lib/kubectl-version.sh
Expand Down
59 changes: 52 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
permissions:
id-token: write
contents: write
issues: read

jobs:
build:
Expand All @@ -21,15 +22,35 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Release
working-directory: releaser
node-version: 20
- name: Get kubectl version
run: |
source hack/lib/kubectl-version.sh
echo "Using kubectl ${KUBECTL_VERSION}"
echo "KUBECTL_VERSION=$KUBECTL_VERSION" >> $GITHUB_ENV
- uses: azure/setup-kubectl@v4
with:
version: "${{ env.KUBECTL_VERSION }}"
id: install
- name: Get AWS credentials
uses: aws-actions/configure-aws-credentials@v4.0.2
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
role-duration-seconds: 900
aws-region: ${{ secrets.AWS_REGION }}
role-session-name: GithubActionsSession-publish
- name: Release Notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MILESTONE_NUMBER: "${{ github.event.milestone.number }}"
run: |
npm install
npm run exec
yarn install
yarn workspace releaser run exec
bash hack/build-ide-cfn.sh /tmp/ide-cfn.yaml
MILESTONE_TITLE=$(gh api "repos/$GITHUB_REPOSITORY/milestones/$MILESTONE_NUMBER" --jq '.title')
echo "MILESTONE_TITLE=$MILESTONE_TITLE" >> $GITHUB_ENV
- name: Set Git config
run: |
git config user.name 'github-actions[bot]'
Expand All @@ -40,8 +61,32 @@ jobs:
git pull
git merge --no-ff main -m "Publish to stable"
git push
- name: Run publish (stable)
env:
CONTENT_BUCKET: "${{ secrets.CONTENT_BUCKET }}"
CONTENT_CLOUDFRONT: "${{ secrets.CONTENT_CLOUDFRONT }}"
BRANCH: stable
run: |
bash hack/publish-content.sh
- name: Create snapshot
run: |
suffix=$(git rev-parse --short HEAD)
git checkout -b snapshot-${suffix}
git push origin snapshot-${suffix}
snapshot_branch="snapshot-${suffix}"
git checkout -b "${snapshot_branch}"
git push origin "${snapshot_branch}"
echo "SNAPSHOT_BRANCH=$snapshot_branch" >> $GITHUB_ENV
- name: Run publish (snapshot)
env:
SNAPSHOT_BUCKET: "${{ secrets.SNAPSHOT_BUCKET }}"
SNAPSHOT_CLOUDFRONT: "${{ secrets.SNAPSHOT_CLOUDFRONT }}"
BRANCH: ${{ env.SNAPSHOT_BRANCH }}
run: |
bash hack/publish-snapshot.sh
- name: Create GitHub release
uses: ncipollo/release-action@v1
with:
tag: release-${{ env.SNAPSHOT_BRANCH }}
name: ${{ env.MILESTONE_TITLE }}
bodyFile: /tmp/release-notes.md
artifacts: "/tmp/ide-cfn.yaml"
10 changes: 4 additions & 6 deletions .github/workflows/test-cloudformation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,13 @@ jobs:
id: deploy
env:
AWS_REGION: "${{ secrets.AWS_REGION }}"
CLUSTER_ID: "${{ env.CLUSTER_ID }}"
run: |
aws cloudformation deploy --stack-name cfn-test-${CLUSTER_ID}-${TEST_BRANCH} \
--template-file ./lab/cfn/eks-workshop-ide-cfn.yaml \
--parameter-overrides RepositoryRef=${TEST_BRANCH} \
--capabilities CAPABILITY_NAMED_IAM
make deploy-ide environment="${CLUSTER_ID}"
- name: Cleanup
if: always()
env:
AWS_REGION: "${{ secrets.AWS_REGION }}"
CLUSTER_ID: "${{ env.CLUSTER_ID }}"
run: |
aws cloudformation delete-stack --stack-name cfn-test-${CLUSTER_ID}-${TEST_BRANCH}
aws cloudformation wait stack-delete-complete --stack-name cfn-test-${CLUSTER_ID}-${TEST_BRANCH}
make destroy-ide environment="${CLUSTER_ID}"
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,15 @@ cdk.out
node_modules
test-output

terraform-resources
terraform-resources

website/package-lock.json

# Yarn files
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
14 changes: 7 additions & 7 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pull_request_rules:
# - name: Automatically approve Renovate PRs
# conditions:
# - author = renovate[bot]
# actions:
# review:
# type: APPROVE
pull_request_rules:
- name: Automatically approve Renovate PRs
conditions:
- author = renovate[bot]
actions:
review:
type: APPROVE
38 changes: 6 additions & 32 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,11 @@ repos:
rev: v1.77.0
hooks:
- id: terraform_fmt
#- id: terraform_validate
- id: terraform_docs
args:
- "--args=--lockfile=false"
- id: terraform_tflint
args:
- "--args=--only=terraform_deprecated_interpolation"
- "--args=--only=terraform_deprecated_index"
- "--args=--only=terraform_unused_declarations"
- "--args=--only=terraform_comment_syntax"
- "--args=--only=terraform_documented_outputs"
- "--args=--only=terraform_documented_variables"
- "--args=--only=terraform_typed_variables"
- "--args=--only=terraform_module_pinned_source"
- "--args=--only=terraform_naming_convention"
- "--args=--only=terraform_workspace_remote"

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.1.0"
- repo: local
hooks:
- id: prettier

- repo: https://github.com/tcort/markdown-link-check
rev: "v3.12.1"
hooks:
- id: markdown-link-check
args: [-q, -c, link-check-config.json]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint
files: ^website/docs
args: [-r, mdlint/aws-arn-rule.js]
- id: lint
language: node
name: Run linting
entry: yarn lint:staged
stage: [commit]
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 2 additions & 1 deletion .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,5 @@ sheetal
joshi
keda
AIML
DCGM
DCGM
Mountpoint
Loading

0 comments on commit 631eaeb

Please sign in to comment.