Skip to content

Commit

Permalink
add unique function generation
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed Aug 31, 2023
1 parent 780afa5 commit 4a9fdb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .evergreen/atlas/setup-atlas-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ DRIVERS_ATLAS_GROUP_ID
DRIVERS_ATLAS_LAMBDA_USER
DRIVERS_ATLAS_LAMBDA_PASSWORD
LAMBDA_STACK_NAME
TASK_ID
)

# Ensure that all variables required to run the test are set, otherwise throw
Expand Down
3 changes: 2 additions & 1 deletion .evergreen/atlas/setup-variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set -o errexit # Exit the script with error if any of the commands fail
#
# FUNCTION_NAME: Uses the stack name plus the current commit sha to create a unique cluster and function.
# ATLAS_BASE_URL: Where the Atlas API root resides.
# TASK_ID: The `task_id` evergreen expansion associated with the CI run.


# The Atlas API version
Expand All @@ -18,4 +19,4 @@ ATLAS_API_VERSION="v1.0"
ATLAS_BASE_URL="https://cloud.mongodb.com/api/atlas/$ATLAS_API_VERSION"

# Add git commit to name of function and cluster.
FUNCTION_NAME="${LAMBDA_STACK_NAME}-$(git rev-parse --short HEAD)"
FUNCTION_NAME="${LAMBDA_STACK_NAME}-${TASK_ID}-$(git rev-parse --short HEAD)"

0 comments on commit 4a9fdb6

Please sign in to comment.