Skip to content

Make versions match SemVer pattern #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plans/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

# Common Configuration
String $console_password,
String $version = '2019.8.8',
Peadm::Pe_version $version = '2019.8.8',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be 2019.8.10 or 2021.5.0. Speaking of which, can we make the default auto-updating somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should ideally make auto-updating a thing, yeah. That's probably a piece of work by itself, and would ideally include/encompass plan parameter version defaults, CI job version defaults, and validation functions.

Optional[Array[String]] $dns_alt_names = undef,
Optional[String] $compiler_pool_address = undef,
Optional[String] $internal_compiler_a_pool_address = undef,
Expand Down
2 changes: 1 addition & 1 deletion plans/subplans/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

# Common Configuration
String $console_password,
String $version = '2019.8.5',
Peadm::Pe_version $version,
Array[String] $dns_alt_names = [ ],
Hash $pe_conf_data = { },

Expand Down
8 changes: 4 additions & 4 deletions plans/upgrade.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
Optional[Peadm::SingleTargetSpec] $replica_postgresql_host = undef,

# Common Configuration
String $version,
Optional[String] $compiler_pool_address = undef,
Optional[String] $internal_compiler_a_pool_address = undef,
Optional[String] $internal_compiler_b_pool_address = undef,
Peadm::Pe_version $version,
Optional[String] $compiler_pool_address = undef,
Optional[String] $internal_compiler_a_pool_address = undef,
Optional[String] $internal_compiler_b_pool_address = undef,

# Other
Optional[String] $token_file = undef,
Expand Down
3 changes: 2 additions & 1 deletion spec/plans/subplans/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@
##########

params = {
'primary_host' => 'primary',
'primary_host' => 'primary',
'console_password' => 'puppetlabs',
'version' => '2019.8.10',
}

expect(run_plan('peadm::subplans::install', params)).to be_ok
Expand Down
1 change: 1 addition & 0 deletions types/pe_version.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
type Peadm::Pe_version = Pattern[/^\d+\.\d+\.\d+(-.+)?$/]