Merge pull request 'Add alpine-internal local and alpine-custom virtual' (#74) from benvin/alpine into main
ci/woodpecker/push/apply Pipeline was successful
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #74
This commit was merged in pull request #74.
This commit is contained in:
@@ -42,6 +42,11 @@ locals {
|
||||
trimsuffix(basename(file_path), ".yaml") => content
|
||||
if startswith(file_path, "remote_github_deb/")
|
||||
}
|
||||
remote_github_alpine = {
|
||||
for file_path, content in local.all_configs :
|
||||
trimsuffix(basename(file_path), ".yaml") => content
|
||||
if startswith(file_path, "remote_github_alpine/")
|
||||
}
|
||||
remote_github_rpm = {
|
||||
for file_path, content in local.all_configs :
|
||||
trimsuffix(basename(file_path), ".yaml") => content
|
||||
@@ -107,6 +112,11 @@ locals {
|
||||
trimsuffix(basename(file_path), ".yaml") => content
|
||||
if startswith(file_path, "local_deb/")
|
||||
}
|
||||
local_alpine = {
|
||||
for file_path, content in local.all_configs :
|
||||
trimsuffix(basename(file_path), ".yaml") => content
|
||||
if startswith(file_path, "local_alpine/")
|
||||
}
|
||||
local_npm = {
|
||||
for file_path, content in local.all_configs :
|
||||
trimsuffix(basename(file_path), ".yaml") => content
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
description: "Internal Alpine packages"
|
||||
@@ -0,0 +1,4 @@
|
||||
package_type: alpine
|
||||
description: "Custom apk repo: internal packages. Member order is priority order."
|
||||
members:
|
||||
- alpine-internal
|
||||
@@ -17,32 +17,34 @@ terraform {
|
||||
}
|
||||
|
||||
inputs = {
|
||||
remote_alpine = local.config.remote_alpine
|
||||
remote_ansible = local.config.remote_ansible
|
||||
remote_cargo = local.config.remote_cargo
|
||||
remote_docker = local.config.remote_docker
|
||||
remote_generic = local.config.remote_generic
|
||||
remote_gems = local.config.remote_gems
|
||||
remote_github_deb = local.config.remote_github_deb
|
||||
remote_github_rpm = local.config.remote_github_rpm
|
||||
remote_goproxy = local.config.remote_goproxy
|
||||
remote_helm = local.config.remote_helm
|
||||
remote_npm = local.config.remote_npm
|
||||
remote_puppet = local.config.remote_puppet
|
||||
remote_pypi = local.config.remote_pypi
|
||||
remote_rpm = local.config.remote_rpm
|
||||
remote_vcs = local.config.remote_vcs
|
||||
local_terraform = local.config.local_terraform
|
||||
local_pypi = local.config.local_pypi
|
||||
local_rpm = local.config.local_rpm
|
||||
local_helm = local.config.local_helm
|
||||
local_deb = local.config.local_deb
|
||||
local_npm = local.config.local_npm
|
||||
local_goproxy = local.config.local_goproxy
|
||||
local_gems = local.config.local_gems
|
||||
local_ansible = local.config.local_ansible
|
||||
local_puppet = local.config.local_puppet
|
||||
local_docker = local.config.local_docker
|
||||
local_generic = local.config.local_generic
|
||||
virtual = local.config.virtual
|
||||
remote_alpine = local.config.remote_alpine
|
||||
remote_ansible = local.config.remote_ansible
|
||||
remote_cargo = local.config.remote_cargo
|
||||
remote_docker = local.config.remote_docker
|
||||
remote_generic = local.config.remote_generic
|
||||
remote_gems = local.config.remote_gems
|
||||
remote_github_deb = local.config.remote_github_deb
|
||||
remote_github_alpine = local.config.remote_github_alpine
|
||||
remote_github_rpm = local.config.remote_github_rpm
|
||||
remote_goproxy = local.config.remote_goproxy
|
||||
remote_helm = local.config.remote_helm
|
||||
remote_npm = local.config.remote_npm
|
||||
remote_puppet = local.config.remote_puppet
|
||||
remote_pypi = local.config.remote_pypi
|
||||
remote_rpm = local.config.remote_rpm
|
||||
remote_vcs = local.config.remote_vcs
|
||||
local_terraform = local.config.local_terraform
|
||||
local_pypi = local.config.local_pypi
|
||||
local_rpm = local.config.local_rpm
|
||||
local_helm = local.config.local_helm
|
||||
local_deb = local.config.local_deb
|
||||
local_alpine = local.config.local_alpine
|
||||
local_npm = local.config.local_npm
|
||||
local_goproxy = local.config.local_goproxy
|
||||
local_gems = local.config.local_gems
|
||||
local_ansible = local.config.local_ansible
|
||||
local_puppet = local.config.local_puppet
|
||||
local_docker = local.config.local_docker
|
||||
local_generic = local.config.local_generic
|
||||
virtual = local.config.virtual
|
||||
}
|
||||
|
||||
@@ -122,6 +122,20 @@ resource "artifactapi_remote_github_deb" "this" {
|
||||
depends_on = [artifactapi_remote_generic.this]
|
||||
}
|
||||
|
||||
resource "artifactapi_remote_github_alpine" "this" {
|
||||
for_each = var.remote_github_alpine
|
||||
|
||||
name = each.key
|
||||
base_url = each.value.base_url
|
||||
description = each.value.description
|
||||
releases_remote = each.value.releases_remote
|
||||
mutable_ttl = each.value.mutable_ttl
|
||||
patterns = each.value.patterns
|
||||
stale_on_error = each.value.stale_on_error
|
||||
|
||||
depends_on = [artifactapi_remote_generic.this]
|
||||
}
|
||||
|
||||
resource "artifactapi_remote_npm" "this" {
|
||||
for_each = var.remote_npm
|
||||
|
||||
@@ -235,6 +249,13 @@ resource "artifactapi_local_deb" "this" {
|
||||
description = each.value.description
|
||||
}
|
||||
|
||||
resource "artifactapi_local_alpine" "this" {
|
||||
for_each = var.local_alpine
|
||||
|
||||
name = each.key
|
||||
description = each.value.description
|
||||
}
|
||||
|
||||
resource "artifactapi_local_npm" "this" {
|
||||
for_each = var.local_npm
|
||||
|
||||
|
||||
@@ -127,6 +127,19 @@ variable "remote_github_deb" {
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "remote_github_alpine" {
|
||||
description = "Map of GitHub-release-backed Alpine remote repositories"
|
||||
type = map(object({
|
||||
base_url = string
|
||||
description = optional(string, "")
|
||||
releases_remote = string
|
||||
mutable_ttl = optional(number, 3600)
|
||||
patterns = optional(list(string), [])
|
||||
stale_on_error = optional(bool, true)
|
||||
}))
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "remote_npm" {
|
||||
description = "Map of npm remote repositories"
|
||||
type = map(object({
|
||||
@@ -243,6 +256,14 @@ variable "local_deb" {
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "local_alpine" {
|
||||
description = "Map of local Alpine repositories"
|
||||
type = map(object({
|
||||
description = optional(string, "")
|
||||
}))
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "local_npm" {
|
||||
description = "Map of local npm registries"
|
||||
type = map(object({
|
||||
|
||||
Reference in New Issue
Block a user