From 245e65376f6ac736951bff23b1e0baec1b6aec94 Mon Sep 17 00:00:00 2001 From: Tobias Poganiuch <tobias.poganiuch@seco.com> Date: Mon, 6 Nov 2023 10:46:13 +0100 Subject: [PATCH] pipeline:build: Make generation of install script optional The Genio 700 platform doesn't have an fng_install.sh. Currently, the pipeline fails because of the exit code in the script check. Make the generation of the install command optional and only show a warning if the script is missing. --- build-pipeline.yml | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/build-pipeline.yml b/build-pipeline.yml index 4448e3a6..468fc3cd 100644 --- a/build-pipeline.yml +++ b/build-pipeline.yml @@ -69,30 +69,29 @@ workflow: if [[ ! -z "${INSTALL_SCRIPT}" ]]; then SCRIPT="${CI_PROJECT_DIR}/${IMAGE_PATH}/${INSTALL_SCRIPT}" if [ ! -f "${SCRIPT}" ]; then - echo "Install script missing, searched for '$SCRIPT'" - exit 1 - fi - - if [ "$CI_PROJECT_VISIBILITY" = "public" ];then - cat <<-EOF - ============================== - Install the image: - - FNG="$FNG_INSTALL_URL" - curl --location "\$FNG" | sh -s -- --url="\$(dirname "\$FNG")" - ============================== - EOF + echo "Warning: Install script missing, searched for '$SCRIPT'" else - cat <<-EOF - ============================== - Install the image: + if [ "$CI_PROJECT_VISIBILITY" = "public" ];then + cat <<-EOF + ============================== + Install the image: + + FNG="$FNG_INSTALL_URL" + curl --location "\$FNG" | sh -s -- --url="\$(dirname "\$FNG")" + ============================== + EOF + else + cat <<-EOF + ============================== + Install the image: - export GITLAB_TOKEN=<your_access_token> - FNG="$FNG_INSTALL_URL" - curl --location --header "PRIVATE-TOKEN: \$GITLAB_TOKEN" "\$FNG" \ - | sh -s -- --url="\$(dirname "\$FNG")" - ============================== - EOF + export GITLAB_TOKEN=<your_access_token> + FNG="$FNG_INSTALL_URL" + curl --location --header "PRIVATE-TOKEN: \$GITLAB_TOKEN" "\$FNG" \ + | sh -s -- --url="\$(dirname "\$FNG")" + ============================== + EOF + fi fi fi -- GitLab