Skip to content

Commit 6929816

Browse files
committed
fix(pipelines): sanitize TiDB OCI tag for pingcap-inc PRs
1 parent 8e72629 commit 6929816

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

pipelines/pingcap/ticdc/latest/pull_cdc_kafka_integration_heavy/pipeline.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final POD_TEMPLATE_FILE = "pipelines/${GIT_FULL_REPO_NAME}/${BRANCH_ALIAS}/${JOB
1111
final POD_TEMPLATE_FILE_BUILD = "pipelines/${GIT_FULL_REPO_NAME}/${BRANCH_ALIAS}/${JOB_BASE_NAME}/pod-build.yaml"
1212
final REFS = readJSON(text: params.JOB_SPEC).refs
1313
final OCI_TAG_PD = component.computeArtifactOciTagFromPR('pd', REFS.base_ref, REFS.pulls[0].title, 'master')
14-
final OCI_TAG_TIDB = REFS.org == 'pingcap-inc' ? REFS.base_ref : component.computeArtifactOciTagFromPR('tidb', REFS.base_ref, REFS.pulls[0].title, 'master')
14+
final OCI_TAG_TIDB = REFS.org == 'pingcap-inc' ? REFS.base_ref.replaceAll('/', '-') : component.computeArtifactOciTagFromPR('tidb', REFS.base_ref, REFS.pulls[0].title, 'master')
1515
final OCI_TAG_TIFLASH = component.computeArtifactOciTagFromPR('tiflash', REFS.base_ref, REFS.pulls[0].title, 'master')
1616
final OCI_TAG_TIKV = component.computeArtifactOciTagFromPR('tikv', REFS.base_ref, REFS.pulls[0].title, 'master')
1717
final OCI_TAG_SYNC_DIFF_INSPECTOR = 'master'

pipelines/pingcap/ticdc/latest/pull_cdc_kafka_integration_light/pipeline.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final POD_TEMPLATE_FILE = "pipelines/${GIT_FULL_REPO_NAME}/${BRANCH_ALIAS}/${JOB
1111
final POD_TEMPLATE_FILE_BUILD = "pipelines/${GIT_FULL_REPO_NAME}/${BRANCH_ALIAS}/${JOB_BASE_NAME}/pod-build.yaml"
1212
final REFS = readJSON(text: params.JOB_SPEC).refs
1313
final OCI_TAG_PD = component.computeArtifactOciTagFromPR('pd', REFS.base_ref, REFS.pulls[0].title, 'master')
14-
final OCI_TAG_TIDB = REFS.org == 'pingcap-inc' ? REFS.base_ref : component.computeArtifactOciTagFromPR('tidb', REFS.base_ref, REFS.pulls[0].title, 'master')
14+
final OCI_TAG_TIDB = REFS.org == 'pingcap-inc' ? REFS.base_ref.replaceAll('/', '-') : component.computeArtifactOciTagFromPR('tidb', REFS.base_ref, REFS.pulls[0].title, 'master')
1515
final OCI_TAG_TIFLASH = component.computeArtifactOciTagFromPR('tiflash', REFS.base_ref, REFS.pulls[0].title, 'master')
1616
final OCI_TAG_TIKV = component.computeArtifactOciTagFromPR('tikv', REFS.base_ref, REFS.pulls[0].title, 'master')
1717
final OCI_TAG_SYNC_DIFF_INSPECTOR = 'master'

pipelines/pingcap/ticdc/latest/pull_cdc_mysql_integration_heavy/pipeline.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final POD_TEMPLATE_FILE = "pipelines/${GIT_FULL_REPO_NAME}/${BRANCH_ALIAS}/${JOB
1111
final POD_TEMPLATE_FILE_BUILD = "pipelines/${GIT_FULL_REPO_NAME}/${BRANCH_ALIAS}/${JOB_BASE_NAME}/pod-build.yaml"
1212
final REFS = readJSON(text: params.JOB_SPEC).refs
1313
final OCI_TAG_PD = component.computeArtifactOciTagFromPR('pd', REFS.base_ref, REFS.pulls[0].title, 'master')
14-
final OCI_TAG_TIDB = REFS.org == 'pingcap-inc' ? REFS.base_ref : component.computeArtifactOciTagFromPR('tidb', REFS.base_ref, REFS.pulls[0].title, 'master')
14+
final OCI_TAG_TIDB = REFS.org == 'pingcap-inc' ? REFS.base_ref.replaceAll('/', '-') : component.computeArtifactOciTagFromPR('tidb', REFS.base_ref, REFS.pulls[0].title, 'master')
1515
final OCI_TAG_TIFLASH = component.computeArtifactOciTagFromPR('tiflash', REFS.base_ref, REFS.pulls[0].title, 'master')
1616
final OCI_TAG_TIKV = component.computeArtifactOciTagFromPR('tikv', REFS.base_ref, REFS.pulls[0].title, 'master')
1717
final OCI_TAG_SYNC_DIFF_INSPECTOR = 'master'

pipelines/pingcap/ticdc/latest/pull_cdc_mysql_integration_light/pipeline.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ final POD_TEMPLATE_FILE = "pipelines/${GIT_FULL_REPO_NAME}/${BRANCH_ALIAS}/${JOB
88
final POD_TEMPLATE_FILE_BUILD = "pipelines/${GIT_FULL_REPO_NAME}/${BRANCH_ALIAS}/${JOB_BASE_NAME}/pod-build.yaml"
99
final REFS = readJSON(text: params.JOB_SPEC).refs
1010
final OCI_TAG_PD = component.computeArtifactOciTagFromPR('pd', REFS.base_ref, REFS.pulls[0].title, 'master')
11-
final OCI_TAG_TIDB = REFS.org == 'pingcap-inc' ? REFS.base_ref : component.computeArtifactOciTagFromPR('tidb', REFS.base_ref, REFS.pulls[0].title, 'master')
11+
final OCI_TAG_TIDB = REFS.org == 'pingcap-inc' ? REFS.base_ref.replaceAll('/', '-') : component.computeArtifactOciTagFromPR('tidb', REFS.base_ref, REFS.pulls[0].title, 'master')
1212
final OCI_TAG_TIFLASH = component.computeArtifactOciTagFromPR('tiflash', REFS.base_ref, REFS.pulls[0].title, 'master')
1313
final OCI_TAG_TIKV = component.computeArtifactOciTagFromPR('tikv', REFS.base_ref, REFS.pulls[0].title, 'master')
1414
final OCI_TAG_SYNC_DIFF_INSPECTOR = 'master'

pipelines/pingcap/ticdc/latest/pull_cdc_pulsar_integration_light/pipeline.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ final POD_TEMPLATE_FILE = "pipelines/${GIT_FULL_REPO_NAME}/${BRANCH_ALIAS}/${JOB
88
final POD_TEMPLATE_FILE_BUILD = "pipelines/${GIT_FULL_REPO_NAME}/${BRANCH_ALIAS}/${JOB_BASE_NAME}/pod-build.yaml"
99
final REFS = readJSON(text: params.JOB_SPEC).refs
1010
final OCI_TAG_PD = component.computeArtifactOciTagFromPR('pd', REFS.base_ref, REFS.pulls[0].title, 'master')
11-
final OCI_TAG_TIDB = REFS.org == 'pingcap-inc' ? REFS.base_ref : component.computeArtifactOciTagFromPR('tidb', REFS.base_ref, REFS.pulls[0].title, 'master')
11+
final OCI_TAG_TIDB = REFS.org == 'pingcap-inc' ? REFS.base_ref.replaceAll('/', '-') : component.computeArtifactOciTagFromPR('tidb', REFS.base_ref, REFS.pulls[0].title, 'master')
1212
final OCI_TAG_TIFLASH = component.computeArtifactOciTagFromPR('tiflash', REFS.base_ref, REFS.pulls[0].title, 'master')
1313
final OCI_TAG_TIKV = component.computeArtifactOciTagFromPR('tikv', REFS.base_ref, REFS.pulls[0].title, 'master')
1414
final OCI_TAG_SYNC_DIFF_INSPECTOR = 'master'

pipelines/pingcap/ticdc/latest/pull_cdc_storage_integration_heavy/pipeline.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final POD_TEMPLATE_FILE = "pipelines/${GIT_FULL_REPO_NAME}/${BRANCH_ALIAS}/${JOB
1111
final POD_TEMPLATE_FILE_BUILD = "pipelines/${GIT_FULL_REPO_NAME}/${BRANCH_ALIAS}/${JOB_BASE_NAME}/pod-build.yaml"
1212
final REFS = readJSON(text: params.JOB_SPEC).refs
1313
final OCI_TAG_PD = component.computeArtifactOciTagFromPR('pd', REFS.base_ref, REFS.pulls[0].title, 'master')
14-
final OCI_TAG_TIDB = REFS.org == 'pingcap-inc' ? REFS.base_ref : component.computeArtifactOciTagFromPR('tidb', REFS.base_ref, REFS.pulls[0].title, 'master')
14+
final OCI_TAG_TIDB = REFS.org == 'pingcap-inc' ? REFS.base_ref.replaceAll('/', '-') : component.computeArtifactOciTagFromPR('tidb', REFS.base_ref, REFS.pulls[0].title, 'master')
1515
final OCI_TAG_TIFLASH = component.computeArtifactOciTagFromPR('tiflash', REFS.base_ref, REFS.pulls[0].title, 'master')
1616
final OCI_TAG_TIKV = component.computeArtifactOciTagFromPR('tikv', REFS.base_ref, REFS.pulls[0].title, 'master')
1717
final OCI_TAG_SYNC_DIFF_INSPECTOR = 'master'

pipelines/pingcap/ticdc/latest/pull_cdc_storage_integration_light/pipeline.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ final POD_TEMPLATE_FILE_BUILD = "pipelines/${GIT_FULL_REPO_NAME}/${BRANCH_ALIAS}
1212
final REFS = readJSON(text: params.JOB_SPEC).refs
1313

1414
final OCI_TAG_PD = component.computeArtifactOciTagFromPR('pd', REFS.base_ref, REFS.pulls[0].title, 'master')
15-
final OCI_TAG_TIDB = REFS.org == 'pingcap-inc' ? REFS.base_ref : component.computeArtifactOciTagFromPR('tidb', REFS.base_ref, REFS.pulls[0].title, 'master')
15+
final OCI_TAG_TIDB = REFS.org == 'pingcap-inc' ? REFS.base_ref.replaceAll('/', '-') : component.computeArtifactOciTagFromPR('tidb', REFS.base_ref, REFS.pulls[0].title, 'master')
1616
final OCI_TAG_TIFLASH = component.computeArtifactOciTagFromPR('tiflash', REFS.base_ref, REFS.pulls[0].title, 'master')
1717
final OCI_TAG_TIKV = component.computeArtifactOciTagFromPR('tikv', REFS.base_ref, REFS.pulls[0].title, 'master')
1818
final OCI_TAG_SYNC_DIFF_INSPECTOR = 'master'

0 commit comments

Comments
 (0)