Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the option to change bonfire reservation duration #29

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion deploy_ephemeral_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ source ${CICD_ROOT}/_common_deploy_logic.sh
# Caller can specify the type of pool to use
: ${NAMESPACE_POOL:="default"}

# Caller can specify the reservation duration (default: 1h)
: ${RESERVE_DURATION:="1h"}

# Caller can alter the default dependency fetching method if desired
: ${OPTIONAL_DEPS_METHOD:="hybrid"}

Expand All @@ -16,7 +19,7 @@ source ${CICD_ROOT}/_common_deploy_logic.sh
# -> use this PR as the template ref when downloading configurations for this component
# -> use this PR's newly built image in the deployed configurations
set -x
export NAMESPACE=$(bonfire namespace reserve --pool ${NAMESPACE_POOL})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we want to add this feature, let's try follow the same approach (and syntax) for other global vars , see for example, line 13:

# Whether or not to deploy frontends (default: false)
: ${DEPLOY_FRONTENDS:="false"}

so something like a comment, a default value, then just use it on line 19

Also would tag @bsquizz here for review too ^

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, good suggestion @Victoremepunto -- having all the "options" defined up top is preferred for readability.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah sorry I just basically copied the same change I made in Gitlab includes. Now it looks more like the rest.

export NAMESPACE=$(bonfire namespace reserve --pool ${NAMESPACE_POOL} --duration ${RESERVE_DURATION})
SMOKE_NAMESPACE=$NAMESPACE # track which namespace was used here for 'teardown' in common_deploy_logic


Expand Down