Skip to content

Commit d835661

Browse files
Merge remote-tracking branch 'origin/beta-releases' into ga-releases
2 parents d0cc33e + baf3157 commit d835661

File tree

200 files changed

+4383
-7896
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+4383
-7896
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
DOCKER_HUB_URL="https://index.docker.io/v1/"
6+
7+
STDIN=$(cat)
8+
9+
ACTION="$1"
10+
11+
case "$ACTION" in
12+
get)
13+
SERVER_URL="$STDIN"
14+
15+
if [[ "$SERVER_URL" == "$DOCKER_HUB_URL" ]]; then
16+
if [[ -z "${DOCKERHUB_USERNAME:-}" || -z "${DOCKERHUB_PASSWORD:-}" ]]; then
17+
echo "Error: DOCKERHUB_USERNAME or DOCKERHUB_PASSWORD environment variables are not set." >&2
18+
exit 1
19+
fi
20+
21+
echo "{\"Username\": \"$DOCKERHUB_USERNAME\", \"Secret\": \"$DOCKERHUB_PASSWORD\"}"
22+
else
23+
echo "Error: No credentials available for $SERVER_URL" >&2
24+
exit 1
25+
fi
26+
;;
27+
28+
*)
29+
echo "Unsupported action: $ACTION" >&2
30+
exit 1
31+
;;
32+
esac
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"auths": {
3+
"https://index.docker.io/v1/": {}
4+
},
5+
"credsStore": "from-env"
6+
}

.evergreen/functions.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ variables:
7878
GARASIGN_PASSWORD: ${garasign_password}
7979
ARTIFACTORY_USERNAME: ${artifactory_username}
8080
ARTIFACTORY_PASSWORD: ${artifactory_password}
81+
DOCKERHUB_USERNAME: ${dockerhub_username}
82+
DOCKERHUB_PASSWORD: ${dockerhub_password}
8183

8284
# This is here with the variables because anchors aren't supported across includes
8385
post:
@@ -982,16 +984,7 @@ functions:
982984
983985
echo
984986
985-
# Runs for all the commits on main, including nightly builds:
986-
if [[ "$EVERGREEN_IS_PATCH" != "true" ]] && [[ "${project}" == "10gen-compass-main" ]]; then
987-
export JIRA_BASE_URL="https://jira.mongodb.org"
988-
export JIRA_PROJECT="COMPASS"
989-
export JIRA_VULNERABILITY_BUILD_INFO="- [Evergreen task|$EVERGREEN_TASK_URL]"
990-
991-
npm run create-vulnerability-tickets
992-
else
993-
cat .sbom/vulnerability-report.md
994-
fi
987+
cat .sbom/vulnerability-report.md
995988
996989
echo
997990

.evergreen/preinstall.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ echo "IS_WINDOWS: $IS_WINDOWS"
1818
echo "IS_RHEL: $IS_RHEL"
1919
echo "IS_UBUNTU: $IS_UBUNTU"
2020

21+
echo "DOCKER_CONFIG: $DOCKER_CONFIG"
22+
2123
SCRIPTDIR="$(cd $(dirname "$0"); pwd)"
2224

2325
if [ -n "$IS_WINDOWS" ]; then

.evergreen/print-compass-env.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ function printCompassEnv() {
7474
pathsToPrepend.unshift('/opt/mongodbtoolchain/v4/bin');
7575
}
7676

77+
pathsToPrepend.unshift(`${originalPWD}/.evergreen/docker-config/bin`);
78+
7779
PATH = maybePrependPaths(PATH, pathsToPrepend);
7880
printVar('PATH', PATH);
7981

@@ -113,6 +115,8 @@ function printCompassEnv() {
113115

114116
// https://jira.mongodb.org/browse/NODE-6320
115117
printVar('GYP_DEFINES', `kerberos_use_rtld=${process.platform === 'linux'}`);
118+
119+
printVar('DOCKER_CONFIG', `${originalPWD}/.evergreen/docker-config`);
116120
}
117121

118122
printCompassEnv();

.evergreen/start-atlas-cloud-cluster.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
RUN_ID="$(date +"%s")-$(git rev-parse --short HEAD)"
44
DELETE_AFTER="$(date -u -Iseconds -d '+2 hours' 2>/dev/null || date -u -Iseconds -v '+2H')"
5+
DOCKER_REGISTRY="${DOCKER_REGISTRY:-docker.io}"
56

67
# This script helps to automatically provision Atlas cluster for running the e2e
78
# tests against. In CI this will always create a new cluster and delete it when
@@ -39,8 +40,8 @@ DELETE_AFTER="$(date -u -Iseconds -d '+2 hours' 2>/dev/null || date -u -Iseconds
3940
# MCLI_ORG_ID Org ID
4041
# MCLI_PROJECT_ID Project ID
4142
#
42-
# COMPASS_E2E_ATLAS_CLOUD_SANDBOX_USERNAME Cloud user you created
43-
# COMPASS_E2E_ATLAS_CLOUD_SANDBOX_PASSWORD Cloud user password
43+
# COMPASS_E2E_ATLAS_CLOUD_SANDBOX_USERNAME Cloud user you created
44+
# COMPASS_E2E_ATLAS_CLOUD_SANDBOX_PASSWORD Cloud user password
4445
#
4546
# - Source the script followed by running the tests to make sure that some
4647
# variables exported from this script are available for the test env:
@@ -68,7 +69,7 @@ function atlascli() {
6869
-e MCLI_ORG_ID \
6970
-e MCLI_PROJECT_ID \
7071
-e MCLI_OPS_MANAGER_URL \
71-
mongodb/atlas atlas $@
72+
"$DOCKER_REGISTRY/mongodb/atlas" atlas $@
7273
}
7374

7475
cleanup() {

.github/workflows/authors-and-third-party-notices.yaml

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,27 @@ jobs:
1515
env:
1616
HADRON_DISTRIBUTION: compass
1717
steps:
18-
- uses: actions/checkout@v3
18+
- name: Create Github App Token
19+
uses: mongodb-js/devtools-shared/actions/setup-bot-token@main
20+
id: app-token
21+
with:
22+
app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }}
23+
private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}
24+
25+
- uses: actions/checkout@v4
1926
with:
2027
# don't checkout a detatched HEAD
2128
ref: ${{ github.head_ref }}
2229

2330
# this is important so git log can pick up on
2431
# the whole history to generate the list of AUTHORS
25-
fetch-depth: '0'
32+
fetch-depth: "0"
33+
token: ${{ steps.app-token.outputs.token }}
2634

27-
28-
- uses: actions/setup-node@v3
35+
- uses: actions/setup-node@v4
2936
with:
3037
node-version: 20.16.0
31-
cache: 'npm'
38+
cache: "npm"
3239

3340
- name: Install [email protected]
3441
run: |
@@ -40,38 +47,26 @@ jobs:
4047
npm run bootstrap-ci
4148
4249
- name: Update AUTHORS
43-
run: npm run update-authors
50+
run: |
51+
npm run update-authors
52+
git add AUTHORS
4453
4554
- name: Update THIRD-PARTY-NOTICES.md
46-
run: npm run update-third-party-notices
55+
run: |
56+
npm run update-third-party-notices
57+
git add THIRD-PARTY-NOTICES.md
4758
4859
- name: Update Security Test Summary
4960
run: |
5061
npm run update-security-test-summary
62+
git add docs/security-test-summary.md
5163
5264
- name: Update tracking-plan.md
53-
run: npm run update-tracking-plan
54-
55-
- name: Create Pull Request
56-
id: cpr
57-
uses: peter-evans/create-pull-request@v6
58-
with:
59-
commit-message: Update report
60-
branch: ci/update-3rd-party-notices-and-authors
61-
title: 'chore: update AUTHORS, THIRD-PARTY-NOTICES, Security Test Summary'
62-
add-paths: |
63-
THIRD-PARTY-NOTICES.md
64-
AUTHORS
65-
docs/security-test-summary.md
66-
docs/tracking-plan.md
67-
body: |
68-
- Update `AUTHORS`, `THIRD-PARTY-NOTICES`, docs/tracking-plan.md and `docs/security-test-summary.md`
65+
run: |
66+
npm run update-tracking-plan
67+
git add docs/tracking-plan.md
6968
70-
- name: Merge PR
71-
env:
72-
PULL_REQUEST_NUMBER: ${{steps.cpr.outputs.pull-request-number}}
73-
# NOTE: we don't use a PAT so to not trigger further automation
74-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
- name: Commit and push
7570
run: |
76-
gh pr merge $PULL_REQUEST_NUMBER --squash --delete-branch
77-
gh workflow run codeql.yml -r main
71+
git commit --no-allow-empty -m "chore: update AUTHORS, THIRD-PARTY-NOTICES, Security Test Summary [skip actions]" || true
72+
git push

.github/workflows/bump-packages.yaml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,22 @@ jobs:
1010
name: Bump packages
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- name: Create Github App Token
14+
uses: mongodb-js/devtools-shared/actions/setup-bot-token@main
15+
id: app-token
16+
with:
17+
app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }}
18+
private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}
19+
20+
- uses: actions/checkout@v4
1421
with:
1522
# don't checkout a detatched HEAD
1623
ref: ${{ github.head_ref }}
1724

18-
# this is important so git log can pick up on
19-
# the whole history to generate the list of AUTHORS
20-
fetch-depth: '0'
21-
22-
- name: Setup git
23-
run: |
24-
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
25-
git config --local user.name "github-actions[bot]"
26-
27-
- uses: actions/setup-node@v3
25+
- uses: actions/setup-node@v4
2826
with:
2927
node-version: 20.16.0
30-
cache: 'npm'
28+
cache: "npm"
3129

3230
- name: Install [email protected]
3331
run: |
@@ -40,21 +38,20 @@ jobs:
4038
4139
- name: Bump packages
4240
env:
43-
LAST_BUMP_COMMIT_MESSAGE: 'chore(release): bump package versions'
44-
SKIP_BUMP_PACKAGES: 'mongodb-compass'
41+
LAST_BUMP_COMMIT_MESSAGE: "chore(release): bump package versions"
42+
SKIP_BUMP_PACKAGES: "mongodb-compass"
4543
run: |
4644
npm run bump-packages
4745
git add .
4846
git commit --no-allow-empty -m "$LAST_BUMP_COMMIT_MESSAGE" || true
4947
5048
- name: Create Pull Request
51-
id: cpr
52-
uses: peter-evans/create-pull-request@v6
49+
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # 7.0.5
5350
with:
54-
token: ${{ secrets.SVC_DEVTOOLSBOT_TOKEN }}
55-
commit-message: 'chore(release): bump package versions'
51+
token: ${{ secrets.SVC_DEVTOOLSBOT_TOKEN }} # TODO: replace with steps.app-token.outputs.token when it gets the PR permissions
52+
commit-message: "chore(release): bump package versions"
5653
branch: ci/bump-packages
57-
title: 'chore(release): bump package versions'
54+
title: "chore(release): bump package versions"
5855
labels: no-title-validation
5956
body: |
6057
- Bump package versions

.github/workflows/merge-bump-packages-pr.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,23 @@ on:
33
workflow_dispatch:
44
schedule:
55
# Each Tuesday at 5 AM UTC
6-
- cron: '0 5 * * 2'
6+
- cron: "0 5 * * 2"
77

88
jobs:
99
merge_bump_packages_pr:
1010
name: Merge bump packages PR
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- name: Create Github App Token
14+
uses: mongodb-js/devtools-shared/actions/setup-bot-token@main
15+
id: app-token
16+
with:
17+
app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }}
18+
private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}
1419

1520
- name: Merge PR
1621
env:
17-
GITHUB_TOKEN: ${{ secrets.SVC_DEVTOOLSBOT_TOKEN }}
22+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
1823
run: |
1924
set -e
2025
PR_NUMBER=$(gh pr list -s open --head=ci/bump-packages --limit=1 --json number | jq '.[0].number')

.github/workflows/update-electron.yaml

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,40 @@ jobs:
1111
name: Update Electron
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- name: Create Github App Token
15+
uses: mongodb-js/devtools-shared/actions/setup-bot-token@main
16+
id: app-token
17+
with:
18+
app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }}
19+
private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}
20+
21+
- uses: actions/checkout@v4
1522
with:
1623
# don't checkout a detatched HEAD
1724
ref: ${{ github.head_ref }}
1825

19-
# this is important so git log can pick up on
20-
# the whole history to generate the list of AUTHORS
21-
fetch-depth: '0'
22-
23-
- name: Setup git
24-
run: |
25-
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
26-
git config --local user.name "github-actions[bot]"
27-
- uses: actions/setup-node@v3
26+
- uses: actions/setup-node@v4
2827
with:
2928
node-version: 20.16.0
30-
cache: 'npm'
29+
cache: "npm"
3130

3231
- name: Install [email protected]
3332
run: |
3433
npm install -g [email protected]
34+
3535
- name: Install Dependencies
36-
run: |
37-
npm -v
38-
npm ci
36+
run: npm ci
37+
3938
- name: Bump packages
40-
run: |
41-
node scripts/update-electron.js
42-
git add .
43-
git commit --no-allow-empty -m "chore(deps): update electron" || true
39+
run: node scripts/update-electron.js
40+
4441
- name: Create Pull Request
45-
id: cpr
46-
uses: peter-evans/create-pull-request@v6
42+
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # 7.0.5
4743
with:
48-
token: ${{ secrets.SVC_DEVTOOLSBOT_TOKEN }}
49-
commit-message: 'chore(deps): update electron'
44+
token: ${{ secrets.SVC_DEVTOOLSBOT_TOKEN }} # TODO: replace with steps.app-token.outputs.token when it gets the PR permissions
45+
commit-message: "chore(deps): update electron"
5046
branch: ci/update-electron
51-
title: 'chore(deps): update electron'
47+
title: "chore(deps): update electron"
5248
labels: no-title-validation
5349
body: |
5450
- Update electron

0 commit comments

Comments
 (0)