diff --git a/task/build-vm-image/0.1/build-vm-image.yaml b/task/build-vm-image/0.1/build-vm-image.yaml index 1d186fee1d..8ea8cc4bc4 100644 --- a/task/build-vm-image/0.1/build-vm-image.yaml +++ b/task/build-vm-image/0.1/build-vm-image.yaml @@ -26,6 +26,10 @@ spec: default: bib.yaml type: string description: The config file specifying what to build and the builder to build it with + - name: CONFIG_TOML_FILE + default: "config.toml" + type: string + description: The path to the config.toml file within the source repository - default: etc-pki-entitlement description: Name of secret which contains the entitlement certificates name: ENTITLEMENT_SECRET @@ -45,6 +49,8 @@ spec: value: $(params.OUTPUT_IMAGE) - name: BIB_CONFIG_FILE value: $(params.BIB_CONFIG_FILE) + - name: CONFIG_TOML_FILE + value: $(params.CONFIG_TOML_FILE) - name: IMAGE_TYPE value: $(params.IMAGE_TYPE) - name: ENTITLEMENT_SECRET @@ -148,6 +154,9 @@ spec: echo "$BUILD_DIR" ssh -v $SSH_ARGS "$SSH_HOST" mkdir -p "$BUILD_DIR/workspaces" "$BUILD_DIR/scripts" "$BUILD_DIR/tmp" "$BUILD_DIR/tekton-results" "$BUILD_DIR/entitlement" + # ensure that a config toml file is present in case one is not provided + touch /var/workdir/source/$CONFIG_TOML_FILE + rsync -ra "/var/workdir/source/$CONFIG_TOML_FILE" "$SSH_HOST:$BUILD_DIR/config.toml" rsync -ra "$HOME/.docker/" "$SSH_HOST:$BUILD_DIR/.docker/" rsync -ra /entitlement/ "$SSH_HOST:$BUILD_DIR/entitlement/" @@ -175,12 +184,6 @@ spec: # this quoted heredoc prevents expansions and command substitutions. the env vars are evaluated on the remote vm cat >>scripts/script-build.sh <<'REMOTESSHEOF' - echo >config.toml <