From: Fatih Degirmenci Date: Tue, 7 May 2019 09:20:53 +0000 (+0200) Subject: Use uri for sdf and stop setting DEPLOY_SCENARIO parameter X-Git-Url: https://gerrit.nordix.org/gitweb?a=commitdiff_plain;h=569dfcaaaa0112b0f460689a58c1303936490a55;p=infra%2Fcicd.git Use uri for sdf and stop setting DEPLOY_SCENARIO parameter Change-Id: Ied5bd18d3b0090ee8d41810b4a68e30c5677b39f --- diff --git a/jjb/cloud-infra/cloud-infra-macros.yaml b/jjb/cloud-infra/cloud-infra-macros.yaml index 268c9877a..2ff2a47cc 100644 --- a/jjb/cloud-infra/cloud-infra-macros.yaml +++ b/jjb/cloud-infra/cloud-infra-macros.yaml @@ -59,7 +59,7 @@ - inject: properties-file: "$WORKSPACE/change.properties" - description-setter: - description: "Installer: $INSTALLER_TYPE - Scenario: $DEPLOY_SCENARIO" + description: $INSTALLER_TYPE - $DEPLOY_SCENARIO" - builder: name: 'cloud-infra-scenario-deploy-macro' diff --git a/jjb/cloud-infra/cloud-infra-scenario-deploy.sh b/jjb/cloud-infra/cloud-infra-scenario-deploy.sh index e81da3362..a52234aa2 100644 --- a/jjb/cloud-infra/cloud-infra-scenario-deploy.sh +++ b/jjb/cloud-infra/cloud-infra-scenario-deploy.sh @@ -32,8 +32,8 @@ else fi # clone infra/engine repository -echo "Deploying scenario $DEPLOY_SCENARIO using $INSTALLER_TYPE" +echo "Info: Deploying scenario $DEPLOY_SCENARIO using $INSTALLER_TYPE" cd $WORKSPACE -./engine/deploy.sh -d $INSTALLER_TYPE -s $DEPLOY_SCENARIO -p $PDF -i $IDF -b $WORKSPACE/sdf.yml -c +./engine/deploy.sh -d $INSTALLER_TYPE -s $DEPLOY_SCENARIO -p $PDF -i $IDF -b file://$WORKSPACE/sdf.yml -c # vim: set ts=2 sw=2 expandtab: diff --git a/jjb/cloud-infra/cloud-infra-scenario-test.sh b/jjb/cloud-infra/cloud-infra-scenario-test.sh index e1b92d17d..7bef37332 100644 --- a/jjb/cloud-infra/cloud-infra-scenario-test.sh +++ b/jjb/cloud-infra/cloud-infra-scenario-test.sh @@ -27,7 +27,7 @@ set -o nounset set -o pipefail # execute cloud engine test.sh script with arguments -echo "Testing scenario $DEPLOY_SCENARIO deployed using $INSTALLER_TYPE" +echo "Info: Testing scenario $DEPLOY_SCENARIO deployed using $INSTALLER_TYPE" cd $WORKSPACE ./test/test.sh -c -f $TEST_FW -t $TEST_SUITE -s $DEPLOY_SCENARIO diff --git a/jjb/cloud-infra/cloud-infra-verify-scenario.yaml b/jjb/cloud-infra/cloud-infra-verify-scenario.yaml index 14894ec1b..fa473125e 100644 --- a/jjb/cloud-infra/cloud-infra-verify-scenario.yaml +++ b/jjb/cloud-infra/cloud-infra-verify-scenario.yaml @@ -113,10 +113,6 @@ name: DIB_OS_ELEMENT default: '{dib_os_element}' description: 'DIB OS Element to use for building the deployment image to provision target nodes with' - - string: - name: DEPLOY_SCENARIO - default: 'k8-calico-nofeature' - description: 'Scenario to deploy and test' - string: name: TEST_SUITE default: 'healthcheck' @@ -174,7 +170,6 @@ IPA_DIB_OS_ELEMENT=$IPA_DIB_OS_ELEMENT DIB_OS_RELEASE=$DIB_OS_RELEASE DIB_OS_ELEMENT=$DIB_OS_ELEMENT - DEPLOY_SCENARIO=$DEPLOY_SCENARIO CLEANUP=$CLEANUP GERRIT_PROJECT=$GERRIT_PROJECT GERRIT_BRANCH=$GERRIT_BRANCH @@ -197,7 +192,6 @@ IPA_DIB_OS_ELEMENT=$IPA_DIB_OS_ELEMENT DIB_OS_RELEASE=$DIB_OS_RELEASE DIB_OS_ELEMENT=$DIB_OS_ELEMENT - DEPLOY_SCENARIO=$DEPLOY_SCENARIO TEST_SUITE=$TEST_SUITE CLEANUP=$CLEANUP GERRIT_PROJECT=$GERRIT_PROJECT @@ -247,10 +241,6 @@ name: DIB_OS_ELEMENT default: 'ubuntu-minimal' description: 'DIB OS Element to use for building the deployment image to provision target nodes with. Overriden by upstream job.' - - string: - name: DEPLOY_SCENARIO - default: 'k8-calico-nofeature' - description: 'Scenario to deploy and test' - string: name: TEST_FW default: '{phase}' diff --git a/jjb/cloud-infra/determine-scenario.sh b/jjb/cloud-infra/determine-scenario.sh index d3ef11f78..8207a1eb5 100644 --- a/jjb/cloud-infra/determine-scenario.sh +++ b/jjb/cloud-infra/determine-scenario.sh @@ -36,7 +36,7 @@ set -o pipefail # installer-type: kubespray # deploy-scenario: k8-calico-nofeature function override_installer_scenario() { - echo "Processing $GERRIT_PROJECT patchset $GERRIT_REFSPEC to determine the installer and the scenario" + echo "Info: Processing $GERRIT_PROJECT patchset $GERRIT_REFSPEC to determine the installer and the scenario" cd $WORKSPACE COMMIT_MESSAGE=$(git show -s --format=%B) @@ -44,8 +44,8 @@ function override_installer_scenario() { export INSTALLER_TYPE=$(echo "$COMMIT_MESSAGE" | grep '^installer-type:' | cut -d":" -f2 | sed 's/\s*//g') export DEPLOY_SCENARIO=$(echo "$COMMIT_MESSAGE" | grep '^deploy-scenario:' | cut -d":" -f2 | sed 's/\s*//g') else - echo "Installer type or deploy scenario is not specified." - echo "Falling back to programmatically determining them." + echo "Info: Installer type or deploy scenario is not specified." + echo "Info: Falling back to programmatically determining them." determine_scenario fi } @@ -55,14 +55,14 @@ function override_installer_scenario() { # touched. # TODO: this is not implented yet. function determine_scenario() { - echo "Processing $GERRIT_PROJECT patchset $GERRIT_REFSPEC" + echo "Info: Processing $GERRIT_PROJECT patchset $GERRIT_REFSPEC" cd $WORKSPACE COMMIT_MESSAGE=$(git show -s --format=%B) - echo "Not implemented!" + echo "Info: Not implemented!" exit 1 } -echo "Determining the impacted scenario and used installer" +echo "Info: Determining the impacted scenario and used installer" declare -a DEPLOY_SCENARIO declare -a INSTALLER_TYPE @@ -70,16 +70,16 @@ export PROJECT_GIT_URL=$GIT_BASE_HTTPS/$GERRIT_PROJECT override_installer_scenario -echo "Writing change metadata to $WORKSPACE/change.properties" +echo "Info: Writing change metadata to $WORKSPACE/change.properties" cat << EOF > $WORKSPACE/change.properties PROJECT_GIT_URL=$GIT_BASE_HTTPS/$GERRIT_PROJECT DEPLOY_SCENARIO=$DEPLOY_SCENARIO INSTALLER_TYPE=$INSTALLER_TYPE GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION -GERRIT_REFSPEC=$GERRIT_REFSPEC= +GERRIT_REFSPEC=$GERRIT_REFSPEC EOF -echo "Content of change.properties" +echo "Info: Content of change.properties" echo "-------------------------------------------------------------------------" cat $WORKSPACE/change.properties echo "-------------------------------------------------------------------------" diff --git a/jjb/cloud-infra/prepare-for-scenario-deploy.sh b/jjb/cloud-infra/prepare-for-scenario-deploy.sh index 16a823b34..5cfc1a500 100644 --- a/jjb/cloud-infra/prepare-for-scenario-deploy.sh +++ b/jjb/cloud-infra/prepare-for-scenario-deploy.sh @@ -25,7 +25,7 @@ echo "Info: Cloning infra/engine repository" cd $HOME && /bin/rm -rf $WORKSPACE git clone -q $ENGINE_REPO_URL $WORKSPACE -echo "Generating temporary SDF" +echo "Info: Generating temporary SDF" cat << EOF > $WORKSPACE/sdf.yml scenario: $DEPLOY_SCENARIO: @@ -39,7 +39,7 @@ scenario: distros: - ubuntu EOF -echo "Temporary SDF content" +echo "Info: Temporary SDF content" echo "-------------------------------------------------------------------------" cat $WORKSPACE/sdf.yml echo "-------------------------------------------------------------------------" diff --git a/jjb/cloud-infra/prepare-for-scenario-test.sh b/jjb/cloud-infra/prepare-for-scenario-test.sh index eae6b51b1..aefe033a3 100644 --- a/jjb/cloud-infra/prepare-for-scenario-test.sh +++ b/jjb/cloud-infra/prepare-for-scenario-test.sh @@ -25,7 +25,7 @@ echo "Info: Cloning infra/test repository" cd $HOME && /bin/rm -rf $WORKSPACE git clone -q $TEST_REPO_URL $WORKSPACE -echo "Generating temporary SDF" +echo "Info: Generating temporary SDF" cat << EOF > $WORKSPACE/sdf.yml scenario: $DEPLOY_SCENARIO: @@ -39,7 +39,7 @@ scenario: distros: - ubuntu EOF -echo "Temporary SDF content" +echo "Info: Temporary SDF content" echo "-------------------------------------------------------------------------" cat $WORKSPACE/sdf.yml echo "-------------------------------------------------------------------------"