Skip to content

Allow running Orka provider without a default image

Adrien Kohlbecker requested to merge ak/no-default-image into master

What does this MR do?

Allows us to run the orka provider without a default image.

Also appends .img to the image file name automatically, so the user can just say image: macos-11-xcode-12

Why was this MR needed?

If we set a default image to today's latest (Big Sur), we would have trouble updating it because it would break builds. So in the future we would be stuck with it as default even though it might not be the most recent OS.

Better to force users to be explicit with their image!

What's the best way to test this MR?

  1. Connect to the Orka VPN using the script in the orka repository: <path to orka>/scripts/vpn.sh

  2. Execute:

eval "$(op signin gitlab.1password.com)"
export ORKA_API_ENDPOINT="$(op get item --vault Verify --account gitlab --fields "API URL" "Orka VPN")"
export ORKA_API_TOKEN=$(jq -r ".token" ~/.config/configstore/orka-cli.json)

cd scripts/orka_integration

gsed -i "s|ORKA_API_ENDPOINT|$ORKA_API_ENDPOINT|" config.toml
gsed -i "s|ORKA_API_TOKEN|$ORKA_API_TOKEN|"       config.toml

export CUSTOM_ENV_CI_JOB_ID="$(date +%s)"
export BUILD_FAILURE_EXIT_CODE=1
export SYSTEM_FAILURE_EXIT_CODE=2

go run ../../cmd/autoscaler/main.go custom prepare
  1. The VM should not get created, the exit code should be non-zero and you should be asked to set an image. (done by setting $CUSTOM_ENV_CI_JOB_IMAGE)

What are the relevant issue numbers?

Edited by Adrien Kohlbecker

Merge request reports

Loading