2
# UOSCI:OSI build script
3
# See README.hacking before manually running this, or any other UOSCI build script.
5
# XXX: With slaves on Xenial, legacy openstack-installer packages don't exist.
6
echo " ! DEPRECATED: openstack-installer unavailable for Xenial"
12
# (MMCC): turn off the logging filter that is currently squelching messages from
13
# juju websocket API library
15
export OSI_TESTRUNNER_ID="d14a1e85-2bc3-4164-88ac-647910346e76"
17
# Define defaults for manual runs outside of a Jenkins environment
18
[[ -z "$JENKINS_HOME" ]] && export JENKINS_HOME="$HOME"
19
[[ -z "$WORKSPACE" ]] && export WORKSPACE="$(mktemp -d)"
20
[[ -z "$BUILD_NUMBER" ]] && export BUILD_NUMBER="manual"
22
[[ -z "$OSCI_REPO" ]] && export OSCI_REPO="lp:ubuntu-openstack-ci"
23
[[ -z "$OSCI_ROOT" ]] && export OSCI_ROOT="${HOME}/tools/ubuntu-openstack-ci"
25
[[ -z "$OPENSTACK_CHARM_TESTING_REPO" ]] && export OPENSTACK_CHARM_TESTING_REPO="lp:openstack-charm-testing"
26
[[ -z "$OPENSTACK_CHARM_TESTING_ROOT" ]] && export OPENSTACK_CHARM_TESTING_ROOT="${HOME}/tools/openstack-charm-testing"
28
# Avoid environment teardown if run outside of a Jenkins environment
29
[[ -z "$BUILD_URL" ]] && export NO_POST_DESTROY="true"
31
# OSI defaults when undefined
32
[[ -z "$OSI_CLOUD_INSTALL_DIR" ]] && export OSI_CLOUD_INSTALL_DIR="$JENKINS_HOME/.cloud-install"
33
[[ -z "$OSI_JUJU_HOME" ]] && export OSI_JUJU_HOME="$OSI_CLOUD_INSTALL_DIR/juju"
34
[[ -z "$OSI_MODE" ]] && export OSI_MODE="multi"
36
[[ -z "$UOSCI_JUJU_CONSTRAINTS" ]] && export UOSCI_JUJU_CONSTRAINTS="arch=amd64"
37
[[ -z "$UOSCI_MAAS_TAGS" ]] && export UOSCI_MAAS_TAGS="tags=uosci"
39
# Source the common functions
40
. ${OSCI_ROOT}/run/job-parts/osci_job_common.sh
45
f_amulet_set_network_env_vars
48
f_line "Deploy via OSI (openstack-installer mode: ${OSI_MODE})"
49
f_juju_get_pkg_info juju-pkg-info.txt
51
f_juju_stat "-post-deploy"
53
# Confirm deployment, configure it, run tests
54
f_line "Confirm deployment"
55
export JUJU_HOME=$OSI_JUJU_HOME
56
juju_ok="$(${OSCI_ROOT}/run/job-parts/juju1_deploy_ok.sh ||:)"
58
f_juju_status_health_check "-post-deploy"
60
if [[ "$juju_ok" == *DEPLOYED:* ]]; then
61
# Generically, the juju deployment is believed to be sane.
62
echo " . OSI Juju deployment succeeded."
63
touch $WORKSPACE/fyi-${test:0:4}.deploy.ok
65
# Basic functional validation per mode
68
f_line "Validate OpenStack API/CLI auth and basic functionality"
70
f_osi_basic_deploy_validation
71
f_osi_basic_deploy_cli_check
74
# Not yet implemented.
77
f_line "OSI integrated tests"
78
f_osi_built_in_ci_tests
81
# Generically, the juju deployment is not sane.
82
echo " ! OSI Juju deployment failed."
83
touch $WORKSPACE/fyi.deploy.failed
86
# Collect OSI dir, juju unit logs, and other artifacts
90
f_line "OSI uninstall (destroy)"
94
f_line "End of deployment test"
98
f_openstack_check_fail