~james-page/ubuntu-openstack-ci/drop-tox-from-slave-config

« back to all changes in this revision

Viewing changes to run/job-parts/deprecated/build_osi.sh

  • Committer: Ryan Beisner
  • Date: 2018-12-13 21:10:41 UTC
  • mto: This revision was merged to the branch mainline in revision 409.
  • Revision ID: ryan.beisner@canonical.com-20181213211041-5xw4jn4u17ujbv6o
Actually remove the deprecated things

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash -e
2
 
# UOSCI:OSI build script
3
 
# See README.hacking before manually running this, or any other UOSCI build script.
4
 
 
5
 
# XXX: With slaves on Xenial, legacy openstack-installer packages don't exist.
6
 
echo " ! DEPRECATED: openstack-installer unavailable for Xenial"
7
 
exit 1
8
 
 
9
 
 
10
 
test="osi"
11
 
 
12
 
# (MMCC): turn off the logging filter that is currently squelching messages from
13
 
#         juju websocket API library
14
 
export UCI_NOFILTER=1
15
 
export OSI_TESTRUNNER_ID="d14a1e85-2bc3-4164-88ac-647910346e76"
16
 
 
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"
21
 
 
22
 
[[ -z "$OSCI_REPO" ]] && export OSCI_REPO="lp:ubuntu-openstack-ci"
23
 
[[ -z "$OSCI_ROOT" ]] && export OSCI_ROOT="${HOME}/tools/ubuntu-openstack-ci"
24
 
 
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"
27
 
 
28
 
# Avoid environment teardown if run outside of a Jenkins environment
29
 
[[ -z "$BUILD_URL" ]] && export NO_POST_DESTROY="true"
30
 
 
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"
35
 
 
36
 
[[ -z "$UOSCI_JUJU_CONSTRAINTS" ]] && export UOSCI_JUJU_CONSTRAINTS="arch=amd64"
37
 
[[ -z "$UOSCI_MAAS_TAGS" ]] && export UOSCI_MAAS_TAGS="tags=uosci"
38
 
 
39
 
# Source the common functions
40
 
. ${OSCI_ROOT}/run/job-parts/osci_job_common.sh
41
 
 
42
 
f_fresh_clean_start
43
 
f_env_no_pass
44
 
f_touch_try
45
 
f_amulet_set_network_env_vars
46
 
 
47
 
# Go!
48
 
f_line "Deploy via OSI (openstack-installer mode: ${OSI_MODE})"
49
 
f_juju_get_pkg_info juju-pkg-info.txt
50
 
f_osi_deploy
51
 
f_juju_stat "-post-deploy"
52
 
 
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 ||:)"
57
 
echo $juju_ok
58
 
f_juju_status_health_check "-post-deploy"
59
 
 
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
64
 
 
65
 
  # Basic functional validation per mode
66
 
  case "$OSI_MODE" in
67
 
    "multi"|"single")
68
 
      f_line "Validate OpenStack API/CLI auth and basic functionality"
69
 
      f_novarc_overcloud
70
 
      f_osi_basic_deploy_validation
71
 
      f_osi_basic_deploy_cli_check
72
 
      ;;
73
 
    # "autopilot")
74
 
    # Not yet implemented.
75
 
  esac
76
 
 
77
 
  f_line "OSI integrated tests"
78
 
  f_osi_built_in_ci_tests
79
 
 
80
 
else
81
 
  # Generically, the juju deployment is not sane.
82
 
  echo " ! OSI Juju deployment failed."
83
 
  touch $WORKSPACE/fyi.deploy.failed
84
 
fi
85
 
 
86
 
# Collect OSI dir, juju unit logs, and other artifacts
87
 
f_osi_collect
88
 
f_collect_juju_logs
89
 
 
90
 
f_line "OSI uninstall (destroy)"
91
 
f_osi_uninstall
92
 
unset JUJU_HOME
93
 
 
94
 
f_line "End of deployment test"
95
 
f_set_build_descr
96
 
f_nice_finish
97
 
 
98
 
f_openstack_check_fail