- 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'
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:
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
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'
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
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
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}'
# 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)
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
}
# 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
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 "-------------------------------------------------------------------------"
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:
distros:
- ubuntu
EOF
-echo "Temporary SDF content"
+echo "Info: Temporary SDF content"
echo "-------------------------------------------------------------------------"
cat $WORKSPACE/sdf.yml
echo "-------------------------------------------------------------------------"
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:
distros:
- ubuntu
EOF
-echo "Temporary SDF content"
+echo "Info: Temporary SDF content"
echo "-------------------------------------------------------------------------"
cat $WORKSPACE/sdf.yml
echo "-------------------------------------------------------------------------"