2022-06-09 13:27:39 +03:00
|
|
|
variable "TAG" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-06-10 15:43:50 +03:00
|
|
|
variable "SHORTER_TAG" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "SHORTEST_TAG" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-06-09 13:27:39 +03:00
|
|
|
variable "COMPANY_NAME" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "PREFIX_NAME" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "PRODUCT_EDITION" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "PRODUCT_NAME" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-09-16 12:28:44 +03:00
|
|
|
variable "PACKAGE_VERSION" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-06-09 13:27:39 +03:00
|
|
|
variable "DOCKERFILE" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-07-21 18:44:06 +03:00
|
|
|
variable "PLATFORM" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-09-16 12:28:44 +03:00
|
|
|
variable "PACKAGE_BASEURL" {
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "PACKAGE_FILE" {
|
2022-07-21 18:44:06 +03:00
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-12-01 14:46:31 +03:00
|
|
|
variable "BUILD_CHANNEL" {
|
2022-08-24 11:14:59 +03:00
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-06-09 13:27:39 +03:00
|
|
|
target "documentserver" {
|
|
|
|
target = "documentserver"
|
2022-09-12 16:04:56 +03:00
|
|
|
dockerfile = "${DOCKERFILE}"
|
2022-08-24 11:14:59 +03:00
|
|
|
tags = [
|
|
|
|
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}",
|
2022-12-01 14:46:31 +03:00
|
|
|
equal("nightly",BUILD_CHANNEL) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest": "",
|
2022-08-24 11:14:59 +03:00
|
|
|
]
|
2022-07-21 18:44:06 +03:00
|
|
|
platforms = ["${PLATFORM}"]
|
2022-06-09 13:27:39 +03:00
|
|
|
args = {
|
|
|
|
"COMPANY_NAME": "${COMPANY_NAME}"
|
2022-09-16 12:28:44 +03:00
|
|
|
"PRODUCT_NAME": "${PRODUCT_NAME}"
|
|
|
|
"PRODUCT_EDITION": "${PRODUCT_EDITION}"
|
|
|
|
"PACKAGE_VERSION": "${PACKAGE_VERSION}"
|
|
|
|
"PACKAGE_BASEURL": "${PACKAGE_BASEURL}"
|
2022-07-21 18:44:06 +03:00
|
|
|
"PLATFORM": "${PLATFORM}"
|
2022-06-09 13:27:39 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
target "documentserver-stable" {
|
|
|
|
target = "documentserver-stable"
|
2022-09-12 16:04:56 +03:00
|
|
|
dockerfile = "production.dockerfile"
|
2022-06-10 15:43:50 +03: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 16:04:56 +03: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 13:27:39 +03:00
|
|
|
platforms = ["linux/amd64", "linux/arm64"]
|
|
|
|
args = {
|
2022-08-29 11:40:25 +03:00
|
|
|
"TAG": "${TAG}"
|
2022-06-09 13:27:39 +03:00
|
|
|
"COMPANY_NAME": "${COMPANY_NAME}"
|
2022-08-29 11:40:25 +03:00
|
|
|
"PRODUCT_NAME": "${PRODUCT_NAME}"
|
|
|
|
"PRODUCT_EDITION": "${PRODUCT_EDITION}"
|
2022-06-09 13:27:39 +03:00
|
|
|
}
|
|
|
|
}
|
2022-08-29 11:40:25 +03:00
|
|
|
|
|
|
|
target "documentserver-nonexample" {
|
|
|
|
target = "documentserver-nonexample"
|
2022-09-12 16:04:56 +03:00
|
|
|
dockerfile = "production.dockerfile"
|
2022-08-29 11:40:25 +03:00
|
|
|
tags = [ "docker.io/${COMPANY_NAME}/${PRODUCT_NAME}${PREFIX_NAME}${PRODUCT_EDITION}:${TAG}-nonexample" ]
|
|
|
|
platforms = ["linux/amd64", "linux/arm64"]
|
|
|
|
args = {
|
|
|
|
"TAG": "${TAG}"
|
|
|
|
"COMPANY_NAME": "${COMPANY_NAME}"
|
|
|
|
"PRODUCT_NAME": "${PRODUCT_NAME}"
|
|
|
|
"PRODUCT_EDITION": "${PRODUCT_EDITION}"
|
|
|
|
}
|
|
|
|
}
|