Add Gitea pull-mirror support and a mirrors organisation #95
@@ -0,0 +1,3 @@
|
|||||||
|
description: "Pull mirrors of upstream repositories"
|
||||||
|
visibility: public
|
||||||
|
repo_admin_change_team_access: true
|
||||||
@@ -35,6 +35,16 @@ module "repository" {
|
|||||||
website = each.value.website
|
website = each.value.website
|
||||||
autodetect_manual_merge = each.value.autodetect_manual_merge
|
autodetect_manual_merge = each.value.autodetect_manual_merge
|
||||||
|
|
||||||
|
mirror = each.value.mirror
|
||||||
|
migration_clone_address = each.value.migration_clone_address
|
||||||
|
migration_service = each.value.migration_service
|
||||||
|
migration_mirror_interval = each.value.migration_mirror_interval
|
||||||
|
migration_lfs = each.value.migration_lfs
|
||||||
|
migration_lfs_endpoint = each.value.migration_lfs_endpoint
|
||||||
|
migration_issue_labels = each.value.migration_issue_labels
|
||||||
|
migration_milestones = each.value.migration_milestones
|
||||||
|
migration_releases = each.value.migration_releases
|
||||||
|
|
||||||
depends_on = [module.organisation]
|
depends_on = [module.organisation]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,16 @@ resource "gitea_repository" "this" {
|
|||||||
autodetect_manual_merge = var.autodetect_manual_merge
|
autodetect_manual_merge = var.autodetect_manual_merge
|
||||||
archive_on_destroy = true
|
archive_on_destroy = true
|
||||||
|
|
||||||
|
mirror = var.mirror
|
||||||
|
migration_clone_address = var.migration_clone_address
|
||||||
|
migration_service = var.migration_service
|
||||||
|
migration_mirror_interval = var.migration_mirror_interval
|
||||||
|
migration_lfs = var.migration_lfs
|
||||||
|
migration_lfs_endpoint = var.migration_lfs_endpoint
|
||||||
|
migration_issue_labels = var.migration_issue_labels
|
||||||
|
migration_milestones = var.migration_milestones
|
||||||
|
migration_releases = var.migration_releases
|
||||||
|
|
||||||
lifecycle {
|
lifecycle {
|
||||||
# migration_mirror_interval defaults to "8h0m0s" but Gitea returns an empty MirrorInterval for non-mirror repos, so the read-back never matches and plans a spurious update every run; it is a migration-only knob with no drift to track here.
|
# migration_mirror_interval defaults to "8h0m0s" but Gitea returns an empty MirrorInterval for non-mirror repos, so the read-back never matches and plans a spurious update every run; it is a migration-only knob with no drift to track here.
|
||||||
ignore_changes = [migration_mirror_interval]
|
ignore_changes = [migration_mirror_interval]
|
||||||
|
|||||||
@@ -80,3 +80,48 @@ variable "autodetect_manual_merge" {
|
|||||||
type = bool
|
type = bool
|
||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "mirror" {
|
||||||
|
type = bool
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "migration_clone_address" {
|
||||||
|
type = string
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "migration_service" {
|
||||||
|
type = string
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "migration_mirror_interval" {
|
||||||
|
type = string
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "migration_lfs" {
|
||||||
|
type = bool
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "migration_lfs_endpoint" {
|
||||||
|
type = string
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "migration_issue_labels" {
|
||||||
|
type = bool
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "migration_milestones" {
|
||||||
|
type = bool
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "migration_releases" {
|
||||||
|
type = bool
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|||||||
@@ -32,6 +32,16 @@ variable "repository" {
|
|||||||
repo_template = optional(bool)
|
repo_template = optional(bool)
|
||||||
website = optional(string)
|
website = optional(string)
|
||||||
autodetect_manual_merge = optional(bool)
|
autodetect_manual_merge = optional(bool)
|
||||||
|
|
||||||
|
mirror = optional(bool)
|
||||||
|
migration_clone_address = optional(string)
|
||||||
|
migration_service = optional(string)
|
||||||
|
migration_mirror_interval = optional(string)
|
||||||
|
migration_lfs = optional(bool)
|
||||||
|
migration_lfs_endpoint = optional(string)
|
||||||
|
migration_issue_labels = optional(bool)
|
||||||
|
migration_milestones = optional(bool)
|
||||||
|
migration_releases = optional(bool)
|
||||||
}))
|
}))
|
||||||
default = {}
|
default = {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user