From: Yolanda Robla Date: Wed, 31 Jul 2019 09:57:48 +0000 (+0200) Subject: Modify AWS job to run from internal repo X-Git-Tag: akraino_r2~37 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=f0df75b6113dac710757339452cdee5eb668d2ef;p=kni%2Finstaller.git Modify AWS job to run from internal repo Signed-off-by: Yolanda Robla Change-Id: I4a9224cf4d35d8cbe6b7aea19718c24a2c7c541d --- diff --git a/ci/kni_deploy_aws.sh b/ci/kni_deploy_aws.sh index d9c468d..3a9a867 100755 --- a/ci/kni_deploy_aws.sh +++ b/ci/kni_deploy_aws.sh @@ -23,26 +23,25 @@ SITE_NAME='edge-sites-testing.devcluster.openshift.com' echo '---> Starting kni installer generation' export GOPATH=${WORKSPACE}/ -# move the blueprint to an inner directory -mkdir ${WORKSPACE}/blueprint-pae -mv base profiles sites tools ${WORKSPACE}/blueprint-pae/ - -# clone installer in the right directory -sudo rm -rf ${WORKSPACE}/${KNI_PATH} -mkdir -p ${WORKSPACE}/${KNI_PATH} -pushd ${WORKSPACE}/${KNI_PATH}/ -git clone https://gerrit.akraino.org/r/kni/installer -pushd installer - # first build kni installer +sudo rm -rf ${WORKSPACE}/${KNI_PATH} +mkdir -p ${WORKSPACE}/${KNI_PATH}/installer +cp -a installer ${WORKSPACE}/${KNI_PATH}/ +pushd ${WORKSPACE}/${KNI_PATH}/installer make build 2>&1 | tee ${WORKSPACE}/build.log # add the right credentials to kni mkdir $HOME/.kni || true cp $WORKSPACE/akraino-secrets/coreos-pull-secret $HOME/.kni/pull-secret.json || true +# replace site path with a local ref to the cloned blueprint +BLUEPRINT_PATH="${WORKSPACE}/blueprint-pae/" +KUSTOMIZATION_FILE=${BLUEPRINT_PATH}/sites/${SITE_NAME}/00_install-config/kustomization.yaml +sed -i "s#- git::https://gerrit.akraino.org/r/kni/blueprint-pae.git/#- file://${BLUEPRINT_PATH}#g" ${KUSTOMIZATION_FILE} + # start the workflow -./knictl fetch_requirements file://${WORKSPACE}/blueprint-pae//sites/${SITE_NAME} 2>&1 | tee ${WORKSPACE}/aws_requirements.log +sudo rm -rf /$HOME/.kni/${SITE_NAME}/final_manifests || true +./knictl fetch_requirements file://${BLUEPRINT_PATH}/sites/${SITE_NAME} 2>&1 | tee ${WORKSPACE}/aws_requirements.log ./knictl prepare_manifests ${SITE_NAME} 2>&1 | tee ${WORKSPACE}/aws_manifests.log # now run the cluster