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

« back to all changes in this revision

Viewing changes to run/job-parts/deprecated/osci_jujudevel_common.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
 
#
3
 
#  Common functions for UOSCI jobs, specific to exercising the
4
 
#  development version of juju.
5
 
#
6
 
#  /!\ This is pre-juju2 legacy wares for installing, detecting and switching
7
 
#      juju environment names based on ppa value.  This will not work well
8
 
#      when juju1 and juju2 exist in the same ppas or in the same distro mains.
9
 
#      Refactor and deprecation underway.  Please do not add helpers to this file.
10
 
#
11
 
#      Also, OSCI master and slaves no longer have sudo privileges.
12
 
 
13
 
export JUJU_STABLE="ppa:juju/stable"
14
 
export JUJU_PROPOSED="ppa:juju/proposed"
15
 
export JUJU_DEVEL="ppa:juju/devel"
16
 
 
17
 
if [[ -z "$JUJU_SOURCE" ]]; then
18
 
  export JUJU_SOURCE=$JUJU_STABLE
19
 
fi
20
 
 
21
 
 
22
 
function f_juju_get_pkg_info() {
23
 
# Dump juju package info to a file.
24
 
  if [[ -n "$1" ]]; then
25
 
    f_tmp="$1"
26
 
  else
27
 
    f_tmp="juju-pkg-info.txt"
28
 
  fi
29
 
  echo '' > ${WORKSPACE}/${f_tmp}
30
 
  for pkg in $(dpkg -l | egrep 'amulet|juju|mojo|charm|lxc|lxd|openstack' | awk '{ print $2 }'); do
31
 
    apt-cache policy $pkg >> ${WORKSPACE}/${f_tmp}
32
 
  done
33
 
}
34
 
 
35
 
 
36
 
#function f_juju_source_override_to_proposed() {
37
 
# Useful for temporarily overriding juju source to proposed in all jobs
38
 
# for pre-release validation
39
 
#  export JUJU_SOURCE="ppa:juju/proposed"
40
 
#  f_line " /!\ Overriding juju ppa to $JUJU_SOURCE for urgent release validation."
41
 
#}
42
 
 
43
 
 
44
 
#function f_juju_source_set() {
45
 
# Enable juju-devel ppa and install juju dev version.
46
 
#  f_line "Setting juju source to ${JUJU_SOURCE}"
47
 
 
48
 
  # Check to see what is already enabled
49
 
#  ppas=$(find /etc/apt -name "*.list" | xargs cat | grep ^[[:space:]]*deb)
50
 
 
51
 
#  echo " - Purging unused Juju PPAs if present."
52
 
#  case "$JUJU_SOURCE" in
53
 
#    $JUJU_STABLE)
54
 
#      [[ $ppas == *juju/devel* ]] && sudo ppa-purge -y $JUJU_DEVEL
55
 
#      [[ $ppas == *juju/proposed* ]] && sudo ppa-purge -y $JUJU_PROPOSED
56
 
#      ;;
57
 
#    $JUJU_PROPOSED)
58
 
#      [[ $ppas == *juju/devel* ]] && sudo ppa-purge -y $JUJU_DEVEL
59
 
#      ;;
60
 
#    $JUJU_DEVEL)
61
 
#      [[ $ppas == *juju/proposed* ]] && sudo ppa-purge -y $JUJU_PROPOSED
62
 
#      ;;
63
 
#    *)
64
 
#      echo " ! Unknown JUJU_SOURCE value while setting juju source."
65
 
#      exit 1
66
 
#      ;;
67
 
#  esac
68
 
 
69
 
#  echo " ! DEPRECATED - NOT Adding or switching juju ppa ${JUJU_SOURCE} or updating packages."
70
 
#  echo " ! Jenkins builds no longer install/upgrade/downgrade juju binaries."
71
 
# With the advent of juju2 and potential mixing of juju1 + juju2 in ppas, jobs are
72
 
# no longer installing juju.  All legacy slaves should remain at juju 1.x, and will
73
 
# need to be maintained/upgraded outside of the job (ie. juju run) out of band.
74
 
#  echo " + Adding juju ppa ${JUJU_SOURCE} and updating packages."
75
 
#  sudo add-apt-repository $JUJU_SOURCE -y
76
 
#  sudo apt-get update -y 2>&1 > /dev/null
77
 
#  sudo apt-get install juju juju-core juju-deployer amulet charm-tools -y
78
 
#  f_juju_version_announce
79
 
#  f_juju1_model_switcher
80
 
 
81
 
# temporary patch / workaround:
82
 
#  f_jujudeployer_patch_bug1425435
83
 
 
84
 
# temporary patch / workaround:
85
 
#  f_jujuclient_watcher_timeout_patch_lp1512472
86
 
#}
87
 
 
88
 
 
89
 
#function f_juju_source_reset() {
90
 
# Enable juju-devel ppa and install juju dev version.
91
 
#  export JUJU_SOURCE=$JUJU_STABLE
92
 
 
93
 
  # Temporary override for 1.25.2 proposed validation
94
 
  # f_juju_source_override_to_proposed
95
 
 
96
 
#  f_juju_source_set
97
 
#}
98
 
 
99
 
 
100
 
#function f_jujudeployer_patch_bug1425435() {
101
 
## Hack to patch jujuclient.py regarding bugs:
102
 
##   https://bugs.launchpad.net/juju-core/+bug/1420403
103
 
##   https://bugs.launchpad.net/juju-core/+bug/1425435
104
 
#  f_line "patch for https://bugs.launchpad.net/juju-core/+bug/1420403 https://bugs.launchpad.net/juju-core/+bug/1425435"
105
 
#  cd /usr/lib/python2.7/dist-packages
106
 
#  sudo patch -b jujuclient.py < ${OSCI_ROOT}/dev/patches/jujuclient-patch.txt || true
107
 
#  f_line "end patch"
108
 
#}
109
 
 
110
 
 
111
 
#function f_jujuclient_watcher_timeout_patch_lp1512472() {
112
 
## Hack to fix watcher timeout re: infinite deploys
113
 
## https://bugs.launchpad.net/python-jujuclient/+bug/1512472
114
 
#  f_line "patch for https://bugs.launchpad.net/python-jujuclient/+bug/1512472"
115
 
#  cd /usr/lib/python2.7/dist-packages
116
 
#  sudo patch --verbose -Nb jujuclient.py < ${OSCI_ROOT}/dev/patches/jujuclient-fix-watcher-lp1512472.patch || true
117
 
#  f_line "end patch"
118
 
#}