From ae421ec484e5f7fec452a4d7acd65593b1bb609c Mon Sep 17 00:00:00 2001 From: Trey Dockendorf Date: Mon, 21 Dec 2020 13:48:41 -0500 Subject: [PATCH] Support Keycloak 12 --- .github/workflows/ci.yaml | 9 +++------ .sync.yml | 6 +++--- README.md | 4 ++-- manifests/init.pp | 6 +++++- metadata.json | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 11770d8f..2de08d73 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,9 +6,6 @@ on: - main - master pull_request: - branches: - - main - - master jobs: unit: @@ -68,7 +65,7 @@ jobs: - "puppet6" keycloak_version: - "8.0.1" - - "10.0.1" + - "12.0.1" keycloak_full: - "no" include: @@ -78,7 +75,7 @@ jobs: keycloak_full: "yes" - set: "centos-7" puppet: "puppet5" - keycloak_version: "10.0.1" + keycloak_version: "12.0.1" keycloak_full: "yes" - set: "centos-7" puppet: "puppet6" @@ -86,7 +83,7 @@ jobs: keycloak_full: "yes" - set: "centos-7" puppet: "puppet6" - keycloak_version: "10.0.1" + keycloak_version: "12.0.1" keycloak_full: "yes" env: BUNDLE_WITHOUT: development:release diff --git a/.sync.yml b/.sync.yml index 934784bd..bd5072be 100644 --- a/.sync.yml +++ b/.sync.yml @@ -23,7 +23,7 @@ - puppet6 keycloak_version: - '8.0.1' - - '10.0.1' + - '12.0.1' keycloak_full: ['no'] acceptance_includes: - set: centos-7 @@ -32,7 +32,7 @@ keycloak_full: 'yes' - set: centos-7 puppet: puppet5 - keycloak_version: 10.0.1 + keycloak_version: 12.0.1 keycloak_full: 'yes' - set: centos-7 puppet: puppet6 @@ -40,7 +40,7 @@ keycloak_full: 'yes' - set: centos-7 puppet: puppet6 - keycloak_version: 10.0.1 + keycloak_version: 12.0.1 keycloak_full: 'yes' .gitlab-ci.yml: delete: true diff --git a/README.md b/README.md index f34070f7..1016f06d 100644 --- a/README.md +++ b/README.md @@ -33,14 +33,14 @@ The keycloak module allows easy installation and management of Keycloak. ### Supported Versions of Keycloak -Currently this module supports Keycloak version 8.x to 9.x. +Currently this module supports Keycloak version 8.x to 12.x. | Keycloak Version | Keycloak Puppet module versions | | ---------------- | ------------------------------- | | 3.x | 2.x | | 4.x - 6.x | 3.x | | 6.x - 8.x | 4.x - 5.x | -| 8.x - 9.x | 6.x | +| 8.x - 12.x | 6.x | ## Usage diff --git a/manifests/init.pp b/manifests/init.pp index 078a47b6..20c99232 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -329,7 +329,11 @@ fail("Unsupported osfamily: ${facts['os']['family']}, module ${module_name} only support osfamilies Debian and Redhat") } - $download_url = pick($package_url, "https://downloads.jboss.org/keycloak/${version}/keycloak-${version}.tar.gz") + if versioncmp($version, '12.0.0') >= 0 { + $download_url = pick($package_url, "https://github.com/keycloak/keycloak/releases/download/${version}/keycloak-${version}.tar.gz") + } else { + $download_url = pick($package_url, "https://downloads.jboss.org/keycloak/${version}/keycloak-${version}.tar.gz") + } case $datasource_driver { 'h2': { $datasource_connection_url = pick($datasource_url, "jdbc:h2:\${jboss.server.data.dir}/${datasource_dbname};AUTO_SERVER=TRUE") diff --git a/metadata.json b/metadata.json index 74ee73c1..ff6f6b34 100644 --- a/metadata.json +++ b/metadata.json @@ -81,5 +81,5 @@ ], "pdk-version": "1.17.0", "template-url": "https://github.com/treydock/pdk-templates.git#master", - "template-ref": "heads/master-0-gc5e50ff" + "template-ref": "heads/master-0-g1f52e6d" }