Skip to content

MLE-21417/Push ML12 nightly to PDC #360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ emailList = '[email protected], [email protected], Sumanth
emailSecList = '[email protected]'
gitCredID = 'marklogic-builder-github'
dockerRegistry = 'ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com'
pdcRegistry = 'sandboxpdc.azurecr.io'
Copy link
Preview

Copilot AI Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider externalizing the pdcRegistry URL into a configuration file or environment variable to simplify future updates without modifying the Jenkinsfile.

Suggested change
pdcRegistry = 'sandboxpdc.azurecr.io'
pdcRegistry = env.PDC_REGISTRY ?: 'sandboxpdc.azurecr.io'

Copilot uses AI. Check for mistakes.

JIRA_ID_PATTERN = /(?i)(MLE)-\d{3,6}/
JIRA_ID = ''
LINT_OUTPUT = ''
Expand Down Expand Up @@ -362,9 +363,21 @@ void publishToInternalRegistry() {
}
}

// Publish to private ACR repository that is used by PDC. (only ML12)
if ( params.marklogicVersion == "12" ) {
Copy link
Preview

Copilot AI Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider using a named constant or configuration parameter for the Marklogic version '12' to improve readability and maintainability in future expansions.

Suggested change
if ( params.marklogicVersion == "12" ) {
if ( params.marklogicVersion == MARKLOGIC_VERSION_12 ) {

Copilot uses AI. Check for mistakes.

withCredentials([usernamePassword(credentialsId: 'PDC_SANDBOX_USER', passwordVariable: 'docker_password', usernameVariable: 'docker_user')]) {
sh """
echo "${docker_password}" | docker login --username ${docker_user} --password-stdin ${pdcRegistry}
docker tag ${builtImage} ${pdcRegistry}/ml-docker-nightly:${marklogicVersion}-${env.dockerImageType}-${env.dockerVersion}
docker tag ${builtImage} ${pdcRegistry}/ml-docker-nightly:${marklogicVersion}-${env.dockerImageType}
docker push ${pdcRegistry}/ml-docker-nightly:${marklogicVersion}-${env.dockerImageType}-${env.dockerVersion}
docker push ${pdcRegistry}/ml-docker-nightly:${marklogicVersion}-${env.dockerImageType}
"""
}
}

currentBuild.description = "Published"
}

/**
* Triggers a BlackDuck scan job for the published image.
* Runs asynchronously (wait: false).
Expand Down