Skip to content

Commit

Permalink
Align git tag of repositories to version
Browse files Browse the repository at this point in the history
  • Loading branch information
jfryman committed Aug 28, 2015
1 parent ef68324 commit ffab263
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion manifests/init.pp
Expand Up @@ -35,7 +35,7 @@
# st2::revison: 11
#
class st2(
$version = '0.12.2',
$version = '0.13.0',
$revision = '6',
$autoupdate = false,
$mistral_git_branch = 'st2-0.13.0',
Expand Down
6 changes: 5 additions & 1 deletion manifests/profile/client.pp
Expand Up @@ -49,6 +49,10 @@
undef => false,
default => true,
}
$_git_tag = $_version ? {
/dev/ => 'master',
default => "v${_version}",
}

include '::st2::notices'
include '::st2::params'
Expand All @@ -73,7 +77,7 @@
## Only attempt to download this if the server has been appropriately bootstrapped.
if $autoupdate or ! $_bootstrapped {
wget::fetch { 'Download st2client requirements.txt':
source => 'https://raw.githubusercontent.com/StackStorm/st2/master/st2client/requirements.txt',
source => "https://raw.githubusercontent.com/StackStorm/st2/${_git_tag}/st2client/requirements.txt",
cache_dir => '/var/cache/wget',
destination => '/tmp/st2client-requirements.txt',
before => Python::Requirements['/tmp/st2client-requirements.txt'],
Expand Down
16 changes: 13 additions & 3 deletions manifests/profile/mistral.pp
Expand Up @@ -33,6 +33,7 @@
#
class st2::profile::mistral(
$autoupdate = $::st2::autoupdate,
$st2_version = $::st2::version,
$manage_postgresql = false,
$git_branch = $::st2::mistral_git_branch,
$db_root_password = fqdn_rand_string(32),
Expand All @@ -51,6 +52,15 @@
) inherits st2 {
include '::st2::dependencies'

$_st2_version = $autoupdate ? {
undef => st2_latest_stable(),
default => $st2_version
}
$_git_branch = $autoupdate ? {
undef => "v${_st2_version}",
default => $git_branch,
}

# This needs a bit more modeling... need to understand
# what current mistral code ships with st2 - jdf

Expand Down Expand Up @@ -106,15 +116,15 @@
vcsrepo { $_mistral_root:
ensure => $_update_vcsroot,
source => 'https://github.com/StackStorm/mistral.git',
revision => $git_branch,
revision => $_git_branch,
provider => 'git',
require => File['/opt/openstack'],
before => $_mistral_root_before,
}
vcsrepo { '/etc/mistral/actions/st2mistral':
ensure => $_update_vcsroot,
source => 'https://github.com/StackStorm/st2mistral.git',
revision => $git_branch,
revision => $_git_branch,
provider => 'git',
require => File['/etc/mistral/actions'],
before => $_st2mistral_before,
Expand Down Expand Up @@ -152,7 +162,7 @@

python::pip { 'python-mistralclient':
ensure => present,
url => "git+https://github.com/StackStorm/python-mistralclient.git@${git_branch}",
url => "git+https://github.com/StackStorm/python-mistralclient.git@${_git_branch}",
before => [
Exec['setup mistral'],
Exec['setup st2mistral plugin'],
Expand Down
6 changes: 5 additions & 1 deletion manifests/profile/server.pp
Expand Up @@ -73,6 +73,10 @@
true => undef,
default => $revision,
}
$_git_tag = $_version ? {
/dev/ => "master",
default => "v${_version}",
}

$_server_packages = $::st2::params::st2_server_packages
$_conf_dir = $::st2::params::conf_dir
Expand Down Expand Up @@ -105,7 +109,7 @@
### This should be a versioned download too... currently on master
if $autoupdate or ! $_bootstrapped {
wget::fetch { 'Download st2server requirements.txt':
source => 'https://raw.githubusercontent.com/StackStorm/st2/master/requirements.txt',
source => "https://raw.githubusercontent.com/StackStorm/st2/${_git_tag}/requirements.txt",
cache_dir => '/var/cache/wget',
destination => '/tmp/st2server-requirements.txt',
before => Python::Requirements['/tmp/st2server-requirements.txt'],
Expand Down

0 comments on commit ffab263

Please sign in to comment.