-
Notifications
You must be signed in to change notification settings - Fork 844
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 snyk-upgrade-de353905732d58fe633fb009a3665e48
- Loading branch information
Showing
2,374 changed files
with
16,540 additions
and
22,558 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 |
---|---|---|
@@ -1,9 +1,72 @@ | ||
# 🏠/.buildkite/pipelines/pipeline_pull_request_test.yml | ||
|
||
steps: | ||
- agents: | ||
- command: .buildkite/scripts/pipeline_test.sh | ||
label: ":typescript: Linting" | ||
agents: | ||
provider: "gcp" | ||
command: .buildkite/scripts/pipeline_test.sh | ||
if: build.branch != "main" # We're skipping testing commits in main for now to maintain parity with previous Jenkins setup | ||
env: | ||
TEST_TYPE: 'lint' | ||
if: build.branch != "main" # This job is triggered by the combined test and deploy docs for every PR | ||
|
||
- command: .buildkite/scripts/pipeline_test.sh | ||
label: ":jest: TS unit tests" | ||
agents: | ||
provider: "gcp" | ||
env: | ||
TEST_TYPE: 'unit:ts' | ||
if: build.branch != "main" | ||
|
||
- command: .buildkite/scripts/pipeline_test.sh | ||
label: ":jest: TSX unit tests on React 16" | ||
agents: | ||
provider: "gcp" | ||
env: | ||
TEST_TYPE: 'unit:tsx:16' | ||
if: build.branch != "main" | ||
|
||
- command: .buildkite/scripts/pipeline_test.sh | ||
label: ":jest: TSX unit tests on React 17" | ||
agents: | ||
provider: "gcp" | ||
env: | ||
TEST_TYPE: 'unit:tsx:17' | ||
if: build.branch != "main" | ||
|
||
- command: .buildkite/scripts/pipeline_test.sh | ||
label: ":jest: TSX unit tests on React 18" | ||
agents: | ||
provider: "gcp" | ||
env: | ||
TEST_TYPE: 'unit:tsx' | ||
if: build.branch != "main" | ||
|
||
- command: .buildkite/scripts/pipeline_test.sh | ||
label: ":cypress: Cypress tests on React 16" | ||
agents: | ||
provider: "gcp" | ||
env: | ||
TEST_TYPE: 'cypress:16' | ||
if: build.branch != "main" | ||
artifact_paths: | ||
- "cypress/screenshots/**/*.png" | ||
|
||
- command: .buildkite/scripts/pipeline_test.sh | ||
label: ":cypress: Cypress tests on React 17" | ||
agents: | ||
provider: "gcp" | ||
env: | ||
TEST_TYPE: 'cypress:17' | ||
if: build.branch != "main" | ||
artifact_paths: | ||
- "cypress/screenshots/**/*.png" | ||
|
||
- command: .buildkite/scripts/pipeline_test.sh | ||
label: ":cypress: Cypress tests on React 18" | ||
agents: | ||
provider: "gcp" | ||
env: | ||
TEST_TYPE: 'cypress:18' | ||
if: build.branch != "main" | ||
artifact_paths: | ||
- "cypress/screenshots/**/*.png" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: "Community contribution" | ||
on: | ||
pull_request_target: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
community-pr-message: | ||
env: | ||
USER_LOGIN: ${{ github.event.pull_request.user.login }} | ||
IS_ORG_MEMBER: "" # https://github.com/github/vscode-github-actions/issues/47 | ||
runs-on: ubuntu-latest | ||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- name: "Check for org membership" | ||
# https://docs.github.com/en/rest/orgs/members?apiVersion=2022-11-28#check-organization-membership-for-a-user | ||
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-writing-an-environment-variable-to-github_env | ||
run: | | ||
DATA=$( | ||
curl -L -i -w "%{http_code}" \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.EUI_COMMUNITY_PR }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/orgs/elastic/members/"$USER_LOGIN" | ||
) | ||
HTTP_CODE=$(echo "$DATA" | awk '/([0-9]{3})$/{print}') | ||
echo "IS_ORG_MEMBER=$HTTP_CODE" >> "$GITHUB_ENV" | ||
- name: "Add comment to community pull requests" | ||
uses: actions/github-script@v6 | ||
if: ${{ env.IS_ORG_MEMBER != '204' }} | ||
with: | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: "👋 Since this is a community submitted pull request, a Buildkite build has not been started automatically. Would an Elastic organization member please verify the contents of this pull request and kick off a build manually?", | ||
}); | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['community contribution'] | ||
}); |
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.