Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into release-to-master
Browse files Browse the repository at this point in the history
  • Loading branch information
pbenes committed Mar 7, 2024
2 parents 6d25a7e + 9821550 commit d386df6
Show file tree
Hide file tree
Showing 60 changed files with 10,855 additions and 10,986 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/doc-examples-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ on:

jobs:
release-ui-sdk-examples-deploy:
secrets: inherit
permissions:
contents: write
id-token: write
uses: ./.github/workflows/rw-doc-examples-deploy.yml
28 changes: 28 additions & 0 deletions .github/workflows/doc-strorybook-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# (C) 2024 GoodData Corporation

name: Doc ~ Storybook deploy
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * MON'
jobs:
storybook-deploy:
secrets: inherit
uses: ./.github/workflows/rw-doc-storybook-deploy.yml
permissions:
contents: write
id-token: write
with:
source-branch: "master"

slack-notification:
runs-on: [ubuntu-latest]
needs: [storybook-deploy]
steps:
- name: Notify to slack
uses: slackapi/slack-github-action@v1.25.0
with:
channel-id: "#javascript-notifications"
slack-message: "The Storybook for *gooddata-ui-sdk* has been successfully deployed. :tada:"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
123 changes: 0 additions & 123 deletions .github/workflows/post-merge-pipeline.yml

This file was deleted.

125 changes: 125 additions & 0 deletions .github/workflows/push-webcomponents-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
---
# (C) 2023 GoodData Corporation
# yamllint disable rule:line-length
name: Push ~ Build web component's container image

on:
push:
branches: ["master", "release", "hotfix/tiger", "hotfix/panther", "fast_track"]

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

env:
WEB_COMPONENTS_DIR: libs/sdk-ui-web-components

jobs:
build-web-components:
if: ${{ startsWith(github.event.head_commit.message, 'Release ') || startsWith(github.event.head_commit.message, format('chore{0} bump versions to', ':')) }}
runs-on: [infra1-medium] # need the bigger runner than small because Web component build consume more resource
permissions:
contents: read
id-token: write
container:
image: 020413372491.dkr.ecr.us-east-1.amazonaws.com/3rdparty/library/node:18
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Add repository to git safe directories to avoid dubious ownership issue
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Cache pnpm dependencies
id: cache-pnpm
uses: actions/cache@v3
with:
key: web-components-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }}
path: |
common/temp/node_modules
common/temp/pnpm-store
- name: Run build web components app
run: |
npm i -g @microsoft/rush
rush install
rush build --to @gooddata/sdk-ui-web-components
tar czvf ./libs/sdk-ui-web-components/web-components.tar.gz -C ./$WEB_COMPONENTS_DIR/esm .
- name: Archive the build artifact
uses: actions/upload-artifact@v3
with:
name: web-components-artifact
path: ./${{ env.WEB_COMPONENTS_DIR }}/web-components.tar.gz
docker-build-web-components:
runs-on: [infra1-small]
needs: [build-web-components]
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set SHORT SHA and BRANCH ESCAPE REF NAME to ENV Variable to use for image tag later
run: |
echo "GITHUB_SHORT_SHA=${GITHUB_SHA::8}" >> $GITHUB_ENV
echo "GITHUB_ESCAPE_REF_NAME=${GITHUB_REF_NAME/\//-}" >> $GITHUB_ENV
- name: Set up QEMU to add multiplatform support
uses: docker/setup-qemu-action@v2
- name: Create docker context
run: |
docker context create builder
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
endpoint: builder
- name: Get Vault secrets for ECR
uses: hashicorp/vault-action@v2
with:
url: "https://vault.ord1.infra.intgdc.com"
method: jwt
path: jwt/github
role: ecr-push
secrets: |
secret/data/v2/data-special/infra1-user-ecr-rw aws_ecr_access_key | AWS_ACCESS_KEY ;
secret/data/v2/data-special/infra1-user-ecr-rw aws_ecr_secret_key | AWS_SECRET_KEY ;
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ env.AWS_SECRET_KEY }}
aws-region: us-east-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- uses: actions/download-artifact@v3
with:
name: web-components-artifact
path: ./${{ env.WEB_COMPONENTS_DIR }}
- name: Docker build and push image
uses: docker/build-push-action@v4
with:
context: ./${{ env.WEB_COMPONENTS_DIR }}
file: ./${{ env.WEB_COMPONENTS_DIR }}/Dockerfile
platforms: |
linux/amd64
linux/arm64
push: true
tags: |
020413372491.dkr.ecr.us-east-1.amazonaws.com/nas-testing/${{ github.event.repository.name }}:${{ env.GITHUB_ESCAPE_REF_NAME }}
020413372491.dkr.ecr.us-east-1.amazonaws.com/nas-testing/${{ github.event.repository.name }}:${{ env.GITHUB_SHORT_SHA }}
outputs:
github_short_sha: ${{ env.GITHUB_SHORT_SHA }}
generate-update:
runs-on: [infra1-small]
needs: [docker-build-web-components]
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.TOKEN_GITHUB_YENKINS_ADMIN }}
repository: gooddata/github-actions
event-type: public-ext-update
client-payload: |
{
"component": "web-components",
"branch": "${{ github.ref_name }}",
"github_short_sha": "${{ needs.docker-build-web-components.outputs.github_short_sha }}"
}
9 changes: 9 additions & 0 deletions .github/workflows/rw-doc-release-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ jobs:
VERSION: ${{ inputs.version }}
IS_NEW_LATEST: ${{ inputs.is-new-latest }}

# find oldest version and remove it -- as we're running this twice, once
# for Next and once for latest version, do it only when is-new-latest=true
- name: Remove oldest version
if: ${{ inputs.is-new-latest == true }}
run: |
cd gooddata-ui-apidocs
./remove-old-versions.sh
cd ..
- name: Publish apidocs
run: |
cd gooddata-ui-apidocs
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/rw-doc-storybook-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# (C) 2024 GoodData Corporation

name: rw ~ Doc ~ Storybook deploy
on:
workflow_call:
inputs:
source-branch:
required: true
description: "The name of the source branch"
type: string

jobs:
storybook-deploy:
runs-on: [infra1-medium] #for AWS access we need to use private runner
permissions:
contents: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{inputs.source-branch}}

- uses: actions/setup-node@v4
with:
node-version: 18.17.0
- name: Install rush
run: |
npm install -g @microsoft/rush
- name: Rush install
run: |
rush install
- name: Rush build
run: |
rush build -t sdk-ui-tests
- name: Build storybook
run: |
cd libs/sdk-ui-tests && rushx build-storybook
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.STORYBOOK_S3_CREDENTIALS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.STORYBOOK_S3_CREDENTIALS_SECRET_KEY }}
aws-region: "us-east-1"
- name: Deploy storybook
env:
BUCKET: "gdc-storybook-static-site"
run: |
LAST_COMMIT_HASH=$(git rev-parse HEAD)
aws s3 cp --recursive libs/sdk-ui-tests/dist-storybook s3://${BUCKET}
echo $LAST_COMMIT_HASH | aws s3 cp - s3://${BUCKET}/.current_version
2 changes: 1 addition & 1 deletion common/autoinstallers/lint-staged/.npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
# to configure registry sources.

registry=https://registry.npmjs.org/
always-auth=false
always-auth=false
Loading

0 comments on commit d386df6

Please sign in to comment.