Skip to content

Commit 79ce344

Browse files
committed
Updated archive logic
Removed git-archive.sh Use tar instead of git archive as done elsewhere. Updated evergreen copy pasta tgz file name Ensure all task groups have their setup and tear down config in the same place JAVA-5886
1 parent dcc0371 commit 79ce344

File tree

2 files changed

+24
-36
lines changed

2 files changed

+24
-36
lines changed

.evergreen/.evg.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -830,13 +830,15 @@ functions:
830830
type: test
831831
params:
832832
shell: bash
833+
working-directory: "src"
833834
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
834835
script: |-
835836
set -o errexit
836837
${PREPARE_SHELL}
837838
export K8S_VARIANT=${VARIANT}
838-
export K8S_DRIVERS_TAR_FILE=$(./.evergreen/git-archive.sh)
839-
export K8S_TEST_CMD="OIDC_ENV=k8s VARIANT=${VARIANT} ./.evergreen/run-mongodb-oidc-test.sh"
839+
export K8S_DRIVERS_TAR_FILE="/tmp/mongo-java-driver.tgz"
840+
export K8S_TEST_CMD="OIDC_ENV=k8s K8S_DRIVERS_TAR_FILE
841+
tar czf $K8S_DRIVERS_TAR_FILE .
840842
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/k8s/setup-pod.sh
841843
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/k8s/run-self-test.sh
842844
source $DRIVERS_TOOLS/.evergreen/auth_oidc/k8s/secrets-export.sh
@@ -929,29 +931,33 @@ tasks:
929931
commands:
930932
- command: shell.exec
931933
params:
932-
shell: bash
934+
shell: "bash"
935+
working_dir: "src"
933936
env:
934937
JAVA_HOME: ${JAVA_HOME}
935938
script: |-
936939
set -o errexit
937940
${PREPARE_SHELL}
938-
export AZUREOIDC_DRIVERS_TAR_FILE=$(./.evergreen/git-archive.sh)
941+
export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/mongo-java-driver.tgz
939942
export AZUREOIDC_TEST_CMD="OIDC_ENV=azure ./.evergreen/run-mongodb-oidc-test.sh"
943+
tar czf $AZUREOIDC_DRIVERS_TAR_FILE .
940944
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
941945
942946
- name: "oidc-auth-test-gcp"
943947
commands:
944948
- command: shell.exec
945949
params:
946-
shell: bash
950+
shell: "bash"
951+
working_dir: "src"
947952
script: |-
948953
set -o errexit
949954
${PREPARE_SHELL}
950-
export GCPOIDC_DRIVERS_TAR_FILE=$(./.evergreen/git-archive.sh)
955+
export GCPOIDC_DRIVERS_TAR_FILE=/tmp/mongo-java-driver.tgz
951956
# Define the command to run on the VM.
952957
# Ensure that we source the environment file created for us, set up any other variables we need,
953958
# and then run our test suite on the vm.
954959
export GCPOIDC_TEST_CMD="OIDC_ENV=gcp ./.evergreen/run-mongodb-oidc-test.sh"
960+
tar czf $GCPOIDC_DRIVERS_TAR_FILE .
955961
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/gcp/run-driver-test.sh
956962
957963
- name: "oidc-auth-test-k8s"
@@ -971,8 +977,6 @@ tasks:
971977
- func: "oidc-auth-test-k8s-func"
972978
vars:
973979
VARIANT: gke
974-
params:
975-
include_expansions_in_env: [ "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN" ]
976980

977981
- name: serverless-test
978982
commands:
@@ -1706,11 +1710,11 @@ tasks:
17061710
export AZUREKMS_RESOURCEGROUP=${testazurekms_resourcegroup}
17071711
export AZUREKMS_VMNAME=${AZUREKMS_VMNAME}
17081712
export AZUREKMS_PRIVATEKEYPATH=/tmp/testazurekms_privatekey
1709-
tar czf /tmp/mongo-csharp-driver.tgz .
1710-
AZUREKMS_SRC=/tmp/mongo-csharp-driver.tgz AZUREKMS_DST="~/" $DRIVERS_TOOLS/.evergreen/csfle/azurekms/copy-file.sh
1713+
tar czf /tmp/mongo-java-driver.tgz .
1714+
AZUREKMS_SRC=/tmp/mongo-java-driver.tgz AZUREKMS_DST="~/" $DRIVERS_TOOLS/.evergreen/csfle/azurekms/copy-file.sh
17111715
echo "Copying files ... end"
17121716
echo "Untarring file ... begin"
1713-
AZUREKMS_CMD="tar xf mongo-csharp-driver.tgz" $DRIVERS_TOOLS/.evergreen/csfle/azurekms/run-command.sh
1717+
AZUREKMS_CMD="tar xf mongo-java-driver.tgz" $DRIVERS_TOOLS/.evergreen/csfle/azurekms/run-command.sh
17141718
echo "Untarring file ... end"
17151719
- command: shell.exec
17161720
type: test
@@ -2071,6 +2075,10 @@ task_groups:
20712075
- oidc-auth-test
20722076

20732077
- name: test-oidc-azure-task-group
2078+
setup_group_can_fail_task: true
2079+
setup_group_timeout_secs: 1800
2080+
teardown_task_can_fail_task: true
2081+
teardown_group_timeout_secs: 1800
20742082
setup_group:
20752083
- func: fetch source
20762084
- func: prepare resources
@@ -2088,12 +2096,14 @@ task_groups:
20882096
binary: bash
20892097
args:
20902098
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/azure/delete-vm.sh
2091-
setup_group_can_fail_task: true
2092-
setup_group_timeout_secs: 1800
20932099
tasks:
20942100
- oidc-auth-test-azure
20952101

20962102
- name: test-oidc-gcp-task-group
2103+
setup_group_can_fail_task: true
2104+
setup_group_timeout_secs: 1800
2105+
teardown_task_can_fail_task: true
2106+
teardown_group_timeout_secs: 1800
20972107
setup_group:
20982108
- func: fetch source
20992109
- func: prepare resources
@@ -2112,16 +2122,14 @@ task_groups:
21122122
binary: bash
21132123
args:
21142124
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/gcp/teardown.sh
2115-
setup_group_can_fail_task: true
2116-
setup_group_timeout_secs: 1800
21172125
tasks:
21182126
- oidc-auth-test-gcp
21192127

21202128
- name: test-oidc-k8s-task-group
21212129
setup_group_can_fail_task: true
21222130
setup_group_timeout_secs: 1800
21232131
teardown_task_can_fail_task: true
2124-
teardown_group_timeout_secs: 180
2132+
teardown_group_timeout_secs: 180 # 3 minutes (max allowed time)
21252133
setup_group:
21262134
- func: fetch source
21272135
- func: prepare resources

.evergreen/git-archive.sh

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

0 commit comments

Comments
 (0)