ci: parameterize docker image prefix
This commit is contained in:
@@ -45,6 +45,18 @@ class WoodpeckerPipelineTest {
|
||||
.doesNotContain("-DskipTests");
|
||||
}
|
||||
|
||||
@Test
|
||||
void dockerPublishUsesOverridableImagePrefix() throws IOException {
|
||||
String pipeline = Files.readString(repositoryRoot().resolve("woodpecker.yml"));
|
||||
|
||||
assertThat(pipeline)
|
||||
.contains("REGISTRY=${LINGNIU_IMAGE_REGISTRY:-crpi-85r4m0ackrm3qpje.cn-shanghai.personal.cr.aliyuncs.com}")
|
||||
.contains("NAMESPACE=${LINGNIU_IMAGE_NAMESPACE:-oneos}")
|
||||
.contains("IMAGE=$REGISTRY/$NAMESPACE/$APP_NAME:$APP_VERSION")
|
||||
.doesNotContain("\n REGISTRY=crpi-85r4m0ackrm3qpje.cn-shanghai.personal.cr.aliyuncs.com")
|
||||
.doesNotContain("\n NAMESPACE=oneos");
|
||||
}
|
||||
|
||||
@Test
|
||||
void dockerImageExposesOnlyCurrentProductionPorts() throws IOException {
|
||||
String dockerfile = Files.readString(repositoryRoot().resolve("Dockerfile"));
|
||||
|
||||
Reference in New Issue
Block a user