Skip to content

Commit d34ea66

Browse files
committed
feat: add image repository parameter
1 parent 030e6e3 commit d34ea66

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

jenkinsfiles/commit.Jenkinsfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pipeline {
99
string(name: 'STAGING_INSTANCE_NAME', defaultValue: 'foobar', description: '[REQUIRED] Full staging instance name will be: "pkg-staging-<STAGING_INSTANCE_NAME>-<BUILD_NUMBER>".')
1010
choice(name: 'DATABASE', choices: ['pkgmaster', 'dev', 'tracker_dev'], description: '[REQUIRED] Master packages database or development database from https://metadata.dev.dhis2.org.')
1111
booleanParam(name: 'REPLACE_DATABASE', defaultValue: true, description: '[OPTIONAL] Replace database if all validations and tests pass.')
12+
choice(name: 'DHIS2_IMAGE_REPOSITORY', choices: ['core', 'core-dev'], description: 'DHIS2 Docker image repository.')
1213
string(name: 'DHIS2_VERSION', defaultValue: '2.38.4', description: '[OPTIONAL] DHIS2 version for the instance.')
1314
string(name: 'DEV_INSTANCE_NAME', defaultValue: '', description: '[OPTIONAL] Name of the dev instance to export from.\nOnly needed if you want to export a package specified with PACKAGE_CODE/TYPE')
1415
string(name: 'PACKAGE_CODE', defaultValue: '', description: '[OPTIONAL] Package code to extract with.\nNo need to provide this if you want to uploaded a package file below.')
@@ -24,7 +25,7 @@ pipeline {
2425

2526
environment {
2627
IMAGE_TAG = "${params.DHIS2_VERSION}"
27-
IMAGE_REPOSITORY = 'core'
28+
IMAGE_REPOSITORY = "${params.DHIS2_IMAGE_REPOSITORY}"
2829
IM_REPO_URL = "https://github.com/dhis2-sre/im-manager"
2930
IM_ENVIRONMENT = 'prod.test.c.dhis2.org'
3031
IM_HOST = "https://api.im.$IM_ENVIRONMENT"

jenkinsfiles/develop.Jenkinsfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pipeline {
88
parameters {
99
choice(name: 'DATABASE', choices: ['dev', 'tracker_dev', 'pkgmaster', 'empty'], description: 'Packages development database from https://metadata.dev.dhis2.org, pkgmaster or an empty one.')
1010
string(name: 'INSTANCE_NAME', defaultValue: 'foobar', description: 'Full instance name will be: "pkg-dev-<INSTANCE_NAME>-<BUILD_NUMBER>".')
11+
choice(name: 'DHIS2_IMAGE_REPOSITORY', choices: ['core', 'core-dev'], description: 'DHIS2 Docker image repository.')
1112
string(name: 'DHIS2_VERSION', defaultValue: '2.38.4', description: 'DHIS2 version for the instance.')
1213
string(name: 'TTL', defaultValue: '', description: 'Time to live for the instance in minutes.')
1314
}
@@ -18,7 +19,7 @@ pipeline {
1819

1920
environment {
2021
IMAGE_TAG = "${params.DHIS2_VERSION}"
21-
IMAGE_REPOSITORY = 'core'
22+
IMAGE_REPOSITORY = "${params.DHIS2_IMAGE_REPOSITORY}"
2223
IM_REPO_URL = "https://github.com/dhis2-sre/im-manager"
2324
IM_ENVIRONMENT = 'prod.test.c.dhis2.org'
2425
IM_HOST = "https://api.im.$IM_ENVIRONMENT"

0 commit comments

Comments
 (0)