Skip to content

Commit 8175a89

Browse files
Merge remote-tracking branch 'origin/main' into beta-releases
2 parents 5e2a1c0 + a0ad35d commit 8175a89

File tree

85 files changed

+3685
-2420
lines changed

Some content is hidden

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

85 files changed

+3685
-2420
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#! /usr/bin/env bash
2+
3+
set -e
4+
set -x
5+
6+
if [[ "${EVERGREEN_PROJECT}" != "10gen-compass-main" ]]; then
7+
echo "Trying to publish main compass (dev build) from ${EVERGREEN_PROJECT} project. Skipping...";
8+
exit 0;
9+
fi
10+
11+
if [[ "${EVERGREEN_BRANCH_NAME}" != "main" ]]; then
12+
echo "Trying to publish main compass (dev build) from ${EVERGREEN_BRANCH_NAME} branch. Skipping...";
13+
exit 0;
14+
fi
15+
16+
JSON_CONTENT=$( jq -n \
17+
--arg id "$DEV_VERSION_IDENTIFIER" \
18+
--arg key "${EVERGREEN_REVISION}_${EVERGREEN_REVISION_ORDER_ID}" \
19+
'{version: $id, bucket_key_prefix: $key}'
20+
)
21+
22+
URL="https://mciuploads.s3.amazonaws.com/${EVERGREEN_PROJECT}/compass/dev/$1"
23+
DATA=$(curl -sf "${URL}" || echo "$JSON_CONTENT")
24+
CURRENT_VERSION=$(echo "$DATA" | jq -r '.version')
25+
26+
echo "Comparing versions: $CURRENT_VERSION and $DEV_VERSION_IDENTIFIER"
27+
LATEST_VERSION=$(npx semver "$CURRENT_VERSION" "$DEV_VERSION_IDENTIFIER" | tail -n1 | xargs)
28+
29+
if [[ "$LATEST_VERSION" == "$CURRENT_VERSION" ]]; then
30+
echo "Skipping publishing dev release, version $DEV_VERSION_IDENTIFIER is not newer than $CURRENT_VERSION"
31+
exit 0
32+
fi
33+
34+
echo "$JSON_CONTENT" > "$1"

.evergreen/buildvariants.in.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ buildvariants:
1717
tasks:
1818
- name: publish
1919
- name: publish-packages-next
20-
- name: publish-dev-release
20+
- name: publish-dev-release-info
2121

2222
- name: ubuntu_connectivity_tests
2323
display_name: Connectivity Tests

.evergreen/buildvariants.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ buildvariants:
1717
tasks:
1818
- name: publish
1919
- name: publish-packages-next
20-
- name: publish-dev-release
20+
- name: publish-dev-release-info
2121

2222
- name: ubuntu_connectivity_tests
2323
display_name: Connectivity Tests

.evergreen/functions.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ variables:
3333
EVERGREEN_IS_PATCH: ${is_patch}
3434
EVERGREEN_PROJECT: ${project}
3535
EVERGREEN_REVISION: ${revision}
36+
EVERGREEN_REVISION_ORDER_ID: ${revision_order_id}
3637
EVERGREEN_TASK_ID: ${task_id}
3738
EVERGREEN_TASK_NAME: ${task_name}
3839
EVERGREEN_TASK_URL: https://evergreen.mongodb.com/task/${task_id}
@@ -443,7 +444,7 @@ functions:
443444
echo "Uploading release assets to S3 and GitHub if needed..."
444445
npm run --workspace mongodb-compass upload
445446
446-
publish-dev-release:
447+
publish-dev-release-info:
447448
- command: shell.exec
448449
params:
449450
working_dir: src
@@ -452,14 +453,14 @@ functions:
452453
<<: *compass-env
453454
script: |
454455
eval $(.evergreen/print-compass-env.sh)
455-
.evergreen/publish-dev-release.sh LATEST
456+
.evergreen/build-dev-release-info.sh release.json
456457
- command: s3.put
457458
params:
458459
<<: *save-artifact-params-public
459-
local_file: src/LATEST
460-
remote_file: ${project}/compass/dev/LATEST
461-
content_type: text/plain
462-
display_name: LATEST
460+
local_file: src/release.json
461+
remote_file: ${project}/compass/dev/release.json
462+
content_type: application/json
463+
display_name: release.json
463464
optional: true
464465

465466
get-packaged-app:

.evergreen/print-compass-env.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ function printCompassEnv() {
105105
printVar('DEBUG', process.env.DEBUG);
106106
printVar('MONGODB_VERSION', process.env.MONGODB_VERSION || process.env.MONGODB_DEFAULT_VERSION);
107107
printVar('DEV_VERSION_IDENTIFIER', process.env.DEV_VERSION_IDENTIFIER);
108+
printVar('EVERGREEN_REVISION', process.env.EVERGREEN_REVISION);
109+
printVar('EVERGREEN_REVISION_ORDER_ID', process.env.EVERGREEN_REVISION_ORDER_ID);
108110
}
109111

110112
printCompassEnv();

.evergreen/publish-dev-release.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

.evergreen/tasks.in.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ tasks:
9393
- func: install
9494
- func: bootstrap
9595
- func: publish-packages-next
96-
- name: publish-dev-release
96+
- name: publish-dev-release-info
9797
tags: []
9898
depends_on:
9999
- name: 'publish'
100100
variant: '*'
101101
commands:
102102
- func: prepare
103-
- func: publish-dev-release
103+
- func: publish-dev-release-info
104104
<% for (const packageTask of tasks.package) { %>
105105
- name: <% out(packageTask.name) %>
106106
tags: ['required-for-publish', 'run-on-pr']

.evergreen/tasks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ tasks:
9393
- func: install
9494
- func: bootstrap
9595
- func: publish-packages-next
96-
- name: publish-dev-release
96+
- name: publish-dev-release-info
9797
tags: []
9898
depends_on:
9999
- name: 'publish'
100100
variant: '*'
101101
commands:
102102
- func: prepare
103-
- func: publish-dev-release
103+
- func: publish-dev-release-info
104104

105105
- name: package-compass
106106
tags: ['required-for-publish', 'run-on-pr']

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,4 @@ Alena Khineika <[email protected]>
8787
Mingjun Yin <[email protected]>
8888
Ben Radcliffe <[email protected]>
8989
Betsy Button <[email protected]>
90+
Vivian Xiao <[email protected]>

0 commit comments

Comments
 (0)