2022-06-09 12:27:39 +02:00
|
|
|
variable "TAG" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-06-10 14:43:50 +02:00
|
|
|
variable "SHORTER_TAG" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "SHORTEST_TAG" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2023-05-25 15:36:33 +02:00
|
|
|
variable "PULL_TAG" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-06-09 12:27:39 +02:00
|
|
|
variable "COMPANY_NAME" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "PREFIX_NAME" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "PRODUCT_EDITION" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "PRODUCT_NAME" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-09-16 11:28:44 +02:00
|
|
|
variable "PACKAGE_VERSION" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-06-09 12:27:39 +02:00
|
|
|
variable "DOCKERFILE" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-07-21 17:44:06 +02:00
|
|
|
variable "PLATFORM" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-09-16 11:28:44 +02:00
|
|
|
variable "PACKAGE_BASEURL" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "PACKAGE_FILE" {
|
2022-07-21 17:44:06 +02:00
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-12-01 12:46:31 +01:00
|
|
|
variable "BUILD_CHANNEL" {
|
2022-08-24 10:14:59 +02:00
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2023-06-29 11:50:17 +02:00
|
|
|
variable "PUSH_MAJOR" {
|
|
|
|
default = "false"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "LATEST" {
|
|
|
|
default = "false"
|
|
|
|
}
|
|
|
|
|
2022-10-31 09:53:24 +01:00
|
|
|
### ↓ Variables for UCS build ↓
|
|
|
|
|
|
|
|
variable "BASE_IMAGE" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "PG_VERSION" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2023-06-29 11:50:17 +02:00
|
|
|
variable "UCS_REBUILD" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "UCS_PREFIX" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-10-31 09:53:24 +01:00
|
|
|
### ↑ Variables for UCS build ↑
|
|
|
|
|
2022-06-09 12:27:39 +02:00
|
|
|
target "documentserver" {
|
|
|
|
target = "documentserver"
|
2022-09-12 15:04:56 +02:00
|
|
|
dockerfile = "${DOCKERFILE}"
|
2022-08-24 10:14:59 +02:00
|
|
|
tags = [
|
|
|
|
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}",
|
2022-12-01 12:46:31 +01:00
|
|
|
equal("nightly",BUILD_CHANNEL) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest": "",
|
2022-08-24 10:14:59 +02:00
|
|
|
]
|
2022-07-21 17:44:06 +02:00
|
|
|
platforms = ["${PLATFORM}"]
|
2022-06-09 12:27:39 +02:00
|
|
|
args = {
|
|
|
|
"COMPANY_NAME": "${COMPANY_NAME}"
|
2022-09-16 11:28:44 +02:00
|
|
|
"PRODUCT_NAME": "${PRODUCT_NAME}"
|
|
|
|
"PRODUCT_EDITION": "${PRODUCT_EDITION}"
|
|
|
|
"PACKAGE_VERSION": "${PACKAGE_VERSION}"
|
|
|
|
"PACKAGE_BASEURL": "${PACKAGE_BASEURL}"
|
2022-07-21 17:44:06 +02:00
|
|
|
"PLATFORM": "${PLATFORM}"
|
2022-06-09 12:27:39 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
target "documentserver-stable" {
|
|
|
|
target = "documentserver-stable"
|
2022-09-12 15:04:56 +02:00
|
|
|
dockerfile = "production.dockerfile"
|
2022-06-10 14:43:50 +02:00
|
|
|
tags = ["docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}",
|
|
|
|
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${SHORTER_TAG}",
|
|
|
|
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${SHORTEST_TAG}",
|
2022-09-12 15:04:56 +02:00
|
|
|
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest",
|
|
|
|
equal("-ee",PRODUCT_EDITION) ? "docker.io/${COMPANY_NAME}4enterprise/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}": "",]
|
2022-06-09 12:27:39 +02:00
|
|
|
platforms = ["linux/amd64", "linux/arm64"]
|
|
|
|
args = {
|
2023-05-25 15:36:33 +02:00
|
|
|
"PULL_TAG": "${PULL_TAG}"
|
2022-06-09 12:27:39 +02:00
|
|
|
"COMPANY_NAME": "${COMPANY_NAME}"
|
2022-08-29 10:40:25 +02:00
|
|
|
"PRODUCT_NAME": "${PRODUCT_NAME}"
|
|
|
|
"PRODUCT_EDITION": "${PRODUCT_EDITION}"
|
2022-06-09 12:27:39 +02:00
|
|
|
}
|
|
|
|
}
|
2022-08-29 10:40:25 +02:00
|
|
|
|
2022-10-31 09:53:24 +01:00
|
|
|
target "documentserver-ucs" {
|
|
|
|
target = "documentserver"
|
|
|
|
dockerfile = "${DOCKERFILE}"
|
|
|
|
tags = [
|
|
|
|
"docker.io/${COMPANY_NAME}/${PRODUCT_NAME}${PRODUCT_EDITION}-ucs:${TAG}"
|
|
|
|
]
|
|
|
|
platforms = ["linux/amd64", "linux/arm64"]
|
|
|
|
args = {
|
|
|
|
"PRODUCT_EDITION": "${PRODUCT_EDITION}"
|
|
|
|
"PRODUCT_NAME": "${PRODUCT_NAME}"
|
|
|
|
"COMPANY_NAME": "${COMPANY_NAME}"
|
|
|
|
"PACKAGE_VERSION": "${PACKAGE_VERSION}"
|
|
|
|
"PACKAGE_BASEURL": "${PACKAGE_BASEURL}"
|
|
|
|
"BASE_IMAGE": "${BASE_IMAGE}"
|
|
|
|
"PG_VERSION": "${PG_VERSION}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-29 10:40:25 +02:00
|
|
|
target "documentserver-nonexample" {
|
|
|
|
target = "documentserver-nonexample"
|
2022-09-12 15:04:56 +02:00
|
|
|
dockerfile = "production.dockerfile"
|
2022-08-29 10:40:25 +02:00
|
|
|
tags = [ "docker.io/${COMPANY_NAME}/${PRODUCT_NAME}${PREFIX_NAME}${PRODUCT_EDITION}:${TAG}-nonexample" ]
|
|
|
|
platforms = ["linux/amd64", "linux/arm64"]
|
|
|
|
args = {
|
2023-05-25 15:36:33 +02:00
|
|
|
"PULL_TAG": "${PULL_TAG}"
|
2022-08-29 10:40:25 +02:00
|
|
|
"COMPANY_NAME": "${COMPANY_NAME}"
|
|
|
|
"PRODUCT_NAME": "${PRODUCT_NAME}"
|
|
|
|
"PRODUCT_EDITION": "${PRODUCT_EDITION}"
|
|
|
|
}
|
|
|
|
}
|
2023-06-29 11:50:17 +02:00
|
|
|
|
|
|
|
target "documentserver-stable-rebuild" {
|
|
|
|
target = "documentserver-stable-rebuild"
|
|
|
|
dockerfile = "production.dockerfile"
|
|
|
|
tags = equal("true",UCS_REBUILD) ? ["docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}-ucs:${TAG}",] : [
|
|
|
|
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}",
|
|
|
|
equal("",PREFIX_NAME) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${SHORTER_TAG}": "",
|
|
|
|
equal("true",PUSH_MAJOR) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${SHORTEST_TAG}": "",
|
|
|
|
equal("",PREFIX_NAME) && equal("true",LATEST) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest": "",
|
|
|
|
equal("-ee",PRODUCT_EDITION) && equal("",PREFIX_NAME) ? "docker.io/${COMPANY_NAME}4enterprise/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}": "",
|
|
|
|
]
|
|
|
|
platforms = ["linux/amd64", "linux/arm64"]
|
|
|
|
args = {
|
|
|
|
"UCS_PREFIX": "${UCS_PREFIX}"
|
|
|
|
"PULL_TAG": "${PULL_TAG}"
|
|
|
|
"COMPANY_NAME": "${COMPANY_NAME}"
|
|
|
|
"PRODUCT_NAME": "${PRODUCT_NAME}"
|
|
|
|
"PRODUCT_EDITION": "${PRODUCT_EDITION}"
|
|
|
|
}
|
|
|
|
}
|