Skip to content
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

CLIP-1842: Read jsm snapshot from json #348

Merged
merged 2 commits into from
Dec 11, 2023
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
5 changes: 3 additions & 2 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ locals {
local_agent_chart_path = var.local_helm_charts_path != "" && var.bamboo_install_local_chart ? "${var.local_helm_charts_path}/bamboo-agent" : ""
local_crowd_chart_path = var.local_helm_charts_path != "" && var.crowd_install_local_chart ? "${var.local_helm_charts_path}/crowd" : ""

# snapshots_json = var.snapshots_json_file_path != "" ? jsondecode(file(var.snapshots_json_file_path)) : jsondecode("{\"jira\": {\"versions\":[]},\"confluence\": {\"versions\":[]},\"crowd\": {\"versions\":[]},\"bitbucket\": {\"versions\":[]}}")
snapshots_json = var.snapshots_json_file_path != "" ? jsondecode(file(var.snapshots_json_file_path)) : null

filtered_bitbucket_snapshots = local.snapshots_json != null ? flatten([
Expand Down Expand Up @@ -82,8 +81,10 @@ locals {
version.version == var.crowd_version_tag ? version.build_number : ""
]) : []

jira_flavor_versions = contains([var.jira_image_repository], "atlassian/jira-servicemanagement") ? local.snapshots_json.jsm.versions : local.snapshots_json.jira.versions

filtered_jira_snapshots = local.snapshots_json != null ? flatten([
for version in local.snapshots_json.jira.versions :
for version in local.jira_flavor_versions :
[for snapshot in version.data :
merge({ version = version.version }, snapshot)
]
Expand Down
Loading
Loading