2020-10-13 01:12:30 +02:00
import groovy.json.*
import java.util.stream.*
2022-10-18 14:53:03 +02:00
import com.cloudbees.groovy.cps.NonCPS
2020-10-13 01:12:30 +02:00
if (
! RELEASE_VERSION | |
! DEVELOPMENT_VERSION | |
! DEBEZIUM_REPOSITORY | |
! DEBEZIUM_BRANCH | |
! DEBEZIUM_ADDITIONAL_REPOSITORIES | |
! IMAGES_REPOSITORY | |
! IMAGES_BRANCH | |
2021-02-17 12:10:15 +01:00
! UI_REPOSITORY | |
! UI_BRANCH | |
2020-10-13 01:12:30 +02:00
! POSTGRES_DECODER_REPOSITORY | |
! POSTGRES_DECODER_BRANCH | |
! MAVEN_CENTRAL_SYNC_TIMEOUT
) {
error 'Input parameters not provided'
}
if ( DRY_RUN = = null ) {
DRY_RUN = false
}
else if ( DRY_RUN instanceof String ) {
DRY_RUN = Boolean . valueOf ( DRY_RUN )
}
echo "Dry run: ${DRY_RUN}"
2022-04-05 18:50:25 +02:00
if ( IGNORE_SNAPSHOTS = = null ) {
IGNORE_SNAPSHOTS = false
}
else if ( IGNORE_SNAPSHOTS instanceof String ) {
IGNORE_SNAPSHOTS = Boolean . valueOf ( IGNORE_SNAPSHOTS )
}
echo "Ignore snapshots: ${IGNORE_SNAPSHOTS}"
2022-01-26 20:37:03 +01:00
if ( CHECK_BACKPORTS = = null ) {
CHECK_BACKPORTS = false
}
else if ( CHECK_BACKPORTS instanceof String ) {
CHECK_BACKPORTS = Boolean . valueOf ( CHECK_BACKPORTS )
}
2020-10-13 01:12:30 +02:00
GIT_CREDENTIALS_ID = 'debezium-github'
2021-12-15 12:15:42 +01:00
JIRA_CREDENTIALS_ID = 'debezium-jira-pat'
2021-09-15 18:31:29 +02:00
HOME_DIR = '/home/centos'
2020-10-13 01:12:30 +02:00
GPG_DIR = 'gpg'
DEBEZIUM_DIR = 'debezium'
IMAGES_DIR = 'images'
2021-02-17 12:10:15 +01:00
UI_DIR = 'ui'
2020-10-13 01:12:30 +02:00
POSTGRES_DECODER_DIR = 'postgres-decoder'
2023-03-08 10:48:43 +01:00
INSTALL_ARTIFACTS_SCRIPT = 'install-artifacts.sh'
2020-10-13 01:12:30 +02:00
VERSION_TAG = "v$RELEASE_VERSION"
VERSION_PARTS = RELEASE_VERSION . split ( '\\.' )
VERSION_MAJOR_MINOR = "${VERSION_PARTS[0]}.${VERSION_PARTS[1]}"
IMAGE_TAG = VERSION_MAJOR_MINOR
2021-03-17 07:17:29 +01:00
CANDIDATE_BRANCH = "candidate-$RELEASE_VERSION"
2020-10-13 01:12:30 +02:00
2023-03-30 11:44:02 +02:00
POSTGRES_TAGS = [ '9.6' , '9.6-alpine' , '10' , '10-alpine' , '11' , '11-alpine' , '12' , '12-alpine' , '13' , '13-alpine' , '14' , '14-alpine' , '15' , '15-alpine' ]
2020-10-13 01:12:30 +02:00
CONNECTORS_PER_VERSION = [
'0.8' : [ 'mongodb' , 'mysql' , 'postgres' , 'oracle' ] ,
'0.9' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' ] ,
'0.10' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' ] ,
'1.0' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' , 'cassandra' ] ,
'1.1' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' , 'cassandra' , 'db2' ] ,
'1.2' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' , 'cassandra' , 'db2' ] ,
'1.3' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' , 'cassandra' , 'db2' ] ,
2021-02-03 12:32:38 +01:00
'1.4' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' , 'cassandra' , 'db2' , 'vitess' ] ,
2021-03-17 07:17:29 +01:00
'1.5' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' , 'cassandra' , 'db2' , 'vitess' ] ,
2021-07-30 07:08:34 +02:00
'1.6' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' , 'cassandra' , 'db2' , 'vitess' ] ,
2021-10-26 19:22:48 +02:00
'1.7' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' , 'cassandra' , 'db2' , 'vitess' ] ,
2022-01-26 19:59:21 +01:00
'1.8' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' , 'cassandra' , 'db2' , 'vitess' ] ,
2022-04-22 09:11:55 +02:00
'1.9' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' , 'cassandra-3' , 'cassandra-4' , 'db2' , 'vitess' ] ,
2022-11-10 10:35:33 +01:00
'2.0' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' , 'cassandra-3' , 'cassandra-4' , 'db2' , 'vitess' ] ,
2023-01-19 11:44:35 +01:00
'2.1' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' , 'cassandra-3' , 'cassandra-4' , 'db2' , 'vitess' , 'spanner' ] ,
2023-05-10 19:06:19 +02:00
'2.2' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' , 'cassandra-3' , 'cassandra-4' , 'db2' , 'vitess' , 'spanner' , 'jdbc' ] ,
2023-07-14 13:36:00 +02:00
'2.3' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' , 'cassandra-3' , 'cassandra-4' , 'db2' , 'vitess' , 'spanner' , 'jdbc' ] ,
'2.4' : [ 'mongodb' , 'mysql' , 'postgres' , 'sqlserver' , 'oracle' , 'cassandra-3' , 'cassandra-4' , 'db2' , 'vitess' , 'spanner' , 'jdbc' ]
2020-10-13 01:12:30 +02:00
]
CONNECTORS = CONNECTORS_PER_VERSION [ VERSION_MAJOR_MINOR ]
if ( CONNECTORS = = null ) {
error "List of connectors not available"
}
echo "Connectors to be released: $CONNECTORS"
ADDITIONAL_REPOSITORIES = [ : ]
DEBEZIUM_ADDITIONAL_REPOSITORIES . split ( ) . each {
def ( id , repository , branch ) = it . split ( '#' )
ADDITIONAL_REPOSITORIES [ id ] = [ 'git' : repository , 'branch' : branch ]
echo "Additional repository $repository will be used"
}
2023-06-08 21:58:15 +02:00
IMAGES = [ 'connect' , 'connect-base' , 'examples/mysql' , 'examples/mysql-gtids' , 'examples/mysql-replication/master' , 'examples/mysql-replication/replica' , 'examples/postgres' , 'examples/mongodb' , 'kafka' , 'server' , 'zookeeper' , 'operator' , 'ui' ]
2020-10-13 01:12:30 +02:00
MAVEN_CENTRAL = 'https://repo1.maven.org/maven2'
2021-02-15 12:26:06 +01:00
STAGING_REPO = 'https://s01.oss.sonatype.org/content/repositories'
2020-10-13 01:12:30 +02:00
STAGING_REPO_ID = null
ADDITIONAL_STAGING_REPO_ID = [ : ]
LOCAL_MAVEN_REPO = "$HOME_DIR/.m2/repository"
2021-12-15 12:15:42 +01:00
withCredentials ( [ string ( credentialsId: JIRA_CREDENTIALS_ID , variable: 'PAT' ) ] ) {
JIRA_PAT = PAT
2021-02-03 10:45:46 +01:00
JIRA_BASE_URL = "https://issues.redhat.com/rest/api/2"
2020-10-13 01:12:30 +02:00
}
JIRA_PROJECT = 'DBZ'
JIRA_VERSION = RELEASE_VERSION
JIRA_CLOSE_ISSUE = "" "
{
"update" : {
"comment" : [
{
"add" : {
"body" : "Released"
}
}
]
} ,
"transition" : {
"id" : "701"
}
}
"" "
JIRA_CLOSE_RELEASE = "" "
{
"released" : true ,
"releaseDate" : "${new Date().format('yyyy-MM-dd')}"
}
"" "
def modifyFile ( filename , modClosure ) {
echo "========================================================================"
echo "Modifying file $filename"
echo "========================================================================"
def originalFile = readFile ( filename )
echo "Content to be modified:\n$originalFile"
echo "========================================================================"
def updatedFile = modClosure . call ( originalFile )
echo "Content after modification:\n$updatedFile"
echo "========================================================================"
writeFile (
file: filename ,
text: updatedFile
)
}
@NonCPS
def jiraURL ( path , params = [ : ] ) {
def url = "$JIRA_BASE_URL/$path"
if ( params ) {
url < < = '?' < < params . collect { k , v - > "$k=${URLEncoder.encode(v, 'US-ASCII')}" } . join ( '&' )
}
return url . toString ( ) . toURL ( )
}
@NonCPS
def jiraGET ( path , params = [ : ] ) {
jiraURL ( path , params ) . openConnection ( ) . with {
doOutput = true
requestMethod = 'GET'
setRequestProperty ( 'Content-Type' , 'application/json' )
2021-12-15 12:15:42 +01:00
setRequestProperty ( 'Authorization' , "Bearer $JIRA_PAT" )
2020-10-13 01:12:30 +02:00
new JsonSlurper ( ) . parse ( new StringReader ( content . text ) )
}
}
@NonCPS
def jiraUpdate ( path , payload , method = 'POST' ) {
path . toURL ( ) . openConnection ( ) . with {
doOutput = true
requestMethod = method
setRequestProperty ( 'Content-Type' , 'application/json' )
2021-12-15 12:15:42 +01:00
setRequestProperty ( 'Authorization' , "Bearer $JIRA_PAT" )
2020-10-13 01:12:30 +02:00
outputStream . withWriter { writer - >
writer < < payload
}
println content . text
}
}
@NonCPS
def unresolvedIssuesFromJira ( ) {
jiraGET ( 'search' , [
'jql' : "project=$JIRA_PROJECT AND fixVersion=$JIRA_VERSION AND status NOT IN ('Resolved', 'Closed')" ,
'fields' : 'key'
] ) . issues . collect { it . key }
}
@NonCPS
def issuesWithoutComponentsFromJira ( ) {
jiraGET ( 'search' , [
'jql' : "project=$JIRA_PROJECT AND fixVersion=$JIRA_VERSION AND component IS EMPTY" ,
'fields' : 'key'
] ) . issues . collect { it . key }
}
@NonCPS
def resolvedIssuesFromJira ( ) {
jiraGET ( 'search' , [
'jql' : "project=$JIRA_PROJECT AND fixVersion=$JIRA_VERSION AND status='Resolved'" ,
'fields' : 'key'
] ) . issues . collect { it . self }
}
@NonCPS
def closeJiraIssues ( ) {
resolvedIssuesFromJira ( ) . each { issue - > jiraUpdate ( "${issue}/transitions" , JIRA_CLOSE_ISSUE ) }
}
2021-12-16 09:16:23 +01:00
@NonCPS
2022-01-26 20:05:56 +01:00
def findVersion ( jiraVersion ) {
jiraGET ( 'project/DBZ/versions' ) . find { it . name = = jiraVersion }
2021-12-16 09:16:23 +01:00
}
2020-10-13 01:12:30 +02:00
@NonCPS
def closeJiraRelease ( ) {
2022-01-26 20:05:56 +01:00
jiraUpdate ( findVersion ( JIRA_VERSION ) . self , JIRA_CLOSE_RELEASE , 'PUT' )
2020-10-13 01:12:30 +02:00
}
def mvnRelease ( repoDir , repoName , branchName , buildArgs = '' ) {
def repoId = null
dir ( repoDir ) {
2023-02-10 14:06:31 +01:00
// Debezium Server must always ignore snapshots as it depends on Debezium Server BOM
// and it is not possible to override it with a stable version
def ignoreSnaphots = ( repoDir = = 'server' ) ? true : IGNORE_SNAPSHOTS
sh "mvn release:clean release:prepare -DreleaseVersion=$RELEASE_VERSION -Dtag=$VERSION_TAG -DdevelopmentVersion=$DEVELOPMENT_VERSION -DpushChanges=${!DRY_RUN} -DignoreSnapshots=$ignoreSnaphots -Darguments=\"-DskipTests -DskipITs -Passembly $buildArgs\" $buildArgs"
2020-10-13 01:12:30 +02:00
if ( ! DRY_RUN ) {
withCredentials ( [ usernamePassword ( credentialsId: GIT_CREDENTIALS_ID , passwordVariable: 'GIT_PASSWORD' , usernameVariable: 'GIT_USERNAME' ) ] ) {
sh "git push \"https://\${GIT_USERNAME}:\${GIT_PASSWORD}@${repoName}\" HEAD:$branchName --follow-tags"
}
}
withCredentials ( [
string ( credentialsId: 'debezium-ci-gpg-passphrase' , variable: 'GPG_PASSPHRASE' ) ,
usernamePassword ( credentialsId: GIT_CREDENTIALS_ID , passwordVariable: 'GIT_PASSWORD' , usernameVariable: 'GIT_USERNAME' ) ] ) {
def mvnlog = sh ( script: "mvn release:perform -DlocalCheckout=$DRY_RUN -DconnectionUrl=scm:git:https://\${GIT_USERNAME}:\${GIT_PASSWORD}@${repoName} -Darguments=\"-s $HOME/.m2/settings-snapshots.xml -Dgpg.homedir=\$WORKSPACE/$GPG_DIR -Dgpg.passphrase=$GPG_PASSPHRASE -DskipTests -DskipITs $buildArgs\" $buildArgs" , returnStdout: true ) . trim ( )
echo mvnlog
def match = mvnlog = ~ /Created staging repository with ID \"(iodebezium-.+)\"/
if ( ! match [ 0 ] ) {
error 'Could not find staging repository ID'
}
repoId = match [ 0 ] [ 1 ]
echo "Using staging repository $repoId"
}
2021-04-08 10:25:35 +02:00
sh "mvn install -DskipTests -DskipITs -Passembly $buildArgs"
2020-10-13 01:12:30 +02:00
}
return repoId
}
2023-06-20 13:54:11 +02:00
node ( 'release-node' ) {
2023-01-04 13:38:34 +01:00
catchError {
2020-10-13 01:12:30 +02:00
stage ( 'Validate parameters' ) {
if ( ! ( RELEASE_VERSION = = ~ /\d+\.\d+.\d+\.(Final|(Alpha|Beta|CR)\d+)/ ) ) {
error "Release version '$RELEASE_VERSION' is not of the required format x.y.z.suffix"
}
if ( ! ( DEVELOPMENT_VERSION = = ~ /\d+\.\d+.\d+\-SNAPSHOT/ ) ) {
error "Development version '$DEVELOPMENT_VERSION' is not of the required format x.y.z-SNAPSHOT"
}
}
stage ( 'Initialize' ) {
dir ( '.' ) {
deleteDir ( )
sh "git config user.email || git config --global user.email \"debezium@gmail.com\" && git config --global user.name \"Debezium Builder\""
sh "ssh-keyscan github.com >> $HOME_DIR/.ssh/known_hosts"
}
dir ( GPG_DIR ) {
withCredentials ( [
string ( credentialsId: 'debezium-ci-gpg-passphrase' , variable: 'PASSPHRASE' ) ,
[ $class : 'FileBinding' , credentialsId: 'debezium-ci-secret-key' , variable: 'SECRET_KEY_FILE' ] ] ) {
echo 'Creating GPG directory'
def gpglog = sh ( script: "gpg --import --batch --passphrase $PASSPHRASE --homedir . $SECRET_KEY_FILE" , returnStdout: true ) . trim ( )
echo gpglog
}
}
checkout ( [ $class : 'GitSCM' ,
branches : [ [ name: "*/$DEBEZIUM_BRANCH" ] ] ,
doGenerateSubmoduleConfigurations: false ,
extensions : [ [ $class : 'RelativeTargetDirectory' , relativeTargetDir: DEBEZIUM_DIR ] ] ,
submoduleCfg : [ ] ,
userRemoteConfigs : [ [ url: "https://$DEBEZIUM_REPOSITORY" , credentialsId: GIT_CREDENTIALS_ID ] ]
]
)
ADDITIONAL_REPOSITORIES . each { id , repo - >
checkout ( [ $class : 'GitSCM' ,
branches : [ [ name: "*/${repo.branch}" ] ] ,
doGenerateSubmoduleConfigurations: false ,
extensions : [ [ $class : 'RelativeTargetDirectory' , relativeTargetDir: id ] ] ,
submoduleCfg : [ ] ,
userRemoteConfigs : [ [ url: "https://${repo.git}" , credentialsId: GIT_CREDENTIALS_ID ] ]
]
)
}
checkout ( [ $class : 'GitSCM' ,
branches : [ [ name: "*/$IMAGES_BRANCH" ] ] ,
doGenerateSubmoduleConfigurations: false ,
extensions : [ [ $class : 'RelativeTargetDirectory' , relativeTargetDir: IMAGES_DIR ] ] ,
submoduleCfg : [ ] ,
userRemoteConfigs : [ [ url: "https://$IMAGES_REPOSITORY" , credentialsId: GIT_CREDENTIALS_ID ] ]
]
)
2021-02-17 12:10:15 +01:00
checkout ( [ $class : 'GitSCM' ,
branches : [ [ name: "*/$UI_BRANCH" ] ] ,
doGenerateSubmoduleConfigurations: false ,
extensions : [ [ $class : 'RelativeTargetDirectory' , relativeTargetDir: UI_DIR ] ] ,
submoduleCfg : [ ] ,
userRemoteConfigs : [ [ url: "https://$UI_REPOSITORY" , credentialsId: GIT_CREDENTIALS_ID ] ]
]
)
2020-10-13 01:12:30 +02:00
checkout ( [ $class : 'GitSCM' ,
branches : [ [ name: "*/$POSTGRES_DECODER_BRANCH" ] ] ,
doGenerateSubmoduleConfigurations: false ,
extensions : [ [ $class : 'RelativeTargetDirectory' , relativeTargetDir: POSTGRES_DECODER_DIR ] ] ,
submoduleCfg : [ ] ,
userRemoteConfigs : [ [ url: "https://$POSTGRES_DECODER_REPOSITORY" , credentialsId: GIT_CREDENTIALS_ID ] ]
]
)
echo "Images tagged with $IMAGE_TAG will be used"
2022-06-09 15:43:26 +02:00
dir ( DEBEZIUM_DIR ) {
ORACLE_ARTIFACT_VERSION = ( readFile ( 'pom.xml' ) = ~ /(?ms)<version.oracle.driver>(.+)<\/ version . oracle . driver > / ) [ 0 ] [ 1 ]
ORACLE_ARTIFACT_DIR = "$HOME_DIR/oracle-libs/${ORACLE_ARTIFACT_VERSION}.0"
}
2020-10-13 01:12:30 +02:00
dir ( ORACLE_ARTIFACT_DIR ) {
sh "mvn install:install-file -DgroupId=com.oracle.instantclient -DartifactId=ojdbc8 -Dversion=$ORACLE_ARTIFACT_VERSION -Dpackaging=jar -Dfile=ojdbc8.jar"
sh "mvn install:install-file -DgroupId=com.oracle.instantclient -DartifactId=xstreams -Dversion=$ORACLE_ARTIFACT_VERSION -Dpackaging=jar -Dfile=xstreams.jar"
}
}
stage ( 'Check Contributors' ) {
if ( ! DRY_RUN ) {
dir ( DEBEZIUM_DIR ) {
def rc = sh ( script: "jenkins-jobs/scripts/check-contributors.sh" , returnStatus: true )
if ( rc ! = 0 ) {
error "Error, not all contributors have been added to COPYRIGHT.txt. See log for details."
}
}
2022-01-11 16:10:27 +01:00
}
}
stage ( 'Check missing backports' ) {
2022-01-26 20:37:03 +01:00
if ( ! DRY_RUN & & CHECK_BACKPORTS ) {
if ( ! BACKPORT_FROM_TAG | | ! BACKPORT_TO_TAG ) {
error "Backport from/to tags must be provided to perform backport checks"
}
2022-01-11 16:10:27 +01:00
dir ( DEBEZIUM_DIR ) {
2022-01-26 20:37:03 +01:00
def rc = sh ( script: "github-support/list-missing-commits-by-issue-key.sh $JIRA_VERSION $BACKPORT_FROM_TAG $BACKPORT_TO_TAG $JIRA_PAT" , returnStatus: true )
2022-01-11 16:10:27 +01:00
if ( rc ! = 0 ) {
error "Error, there are some missing backport commits."
}
}
2020-10-13 01:12:30 +02:00
}
}
stage ( 'Check Jira' ) {
if ( ! DRY_RUN ) {
2022-01-26 20:05:56 +01:00
if ( findVersion ( JIRA_VERSION ) = = null ) {
2021-12-16 09:16:23 +01:00
error "Requested release does not exist"
}
2022-01-26 20:05:56 +01:00
2020-10-13 01:12:30 +02:00
unresolvedIssues = unresolvedIssuesFromJira ( )
issuesWithoutComponents = issuesWithoutComponentsFromJira ( )
if ( ! resolvedIssuesFromJira ( ) ) {
error "Error, there are no resolved issues for the release"
}
if ( unresolvedIssues ) {
error "Error, issues ${unresolvedIssues.toString()} must be resolved"
}
if ( issuesWithoutComponents ) {
error "Error, issues ${issuesWithoutComponents.toString()} must have component set"
}
}
}
stage ( 'Check changelog' ) {
if ( ! DRY_RUN ) {
if ( ! new URL ( "https://raw.githubusercontent.com/debezium/debezium/$DEBEZIUM_BRANCH/CHANGELOG.md" ) . text . contains ( RELEASE_VERSION ) | |
! new URL ( "https://raw.githubusercontent.com/debezium/debezium.github.io/develop/_data/releases/$VERSION_MAJOR_MINOR/${RELEASE_VERSION}.yml" ) . text . contains ( 'summary:' ) | |
! new URL ( "https://raw.githubusercontent.com/debezium/debezium.github.io/develop/releases/$VERSION_MAJOR_MINOR/release-notes.asciidoc" ) . text . contains ( RELEASE_VERSION )
) {
error 'Changelog was not modified to include release information'
}
}
}
stage ( 'Dockerfiles present' ) {
def missingImages = [ ]
for ( i = 0 ; i < IMAGES . size ( ) ; i + + ) {
def image = IMAGES [ i ]
if ( ! fileExists ( "$IMAGES_DIR/$image/$IMAGE_TAG/Dockerfile" ) ) {
missingImages < < image
}
}
if ( missingImages ) {
error "Dockerfile(s) not present for $missingImages tag $IMAGE_TAG"
}
}
stage ( 'Prepare release' ) {
dir ( DEBEZIUM_DIR ) {
2021-02-03 12:32:38 +01:00
sh "git checkout -b $CANDIDATE_BRANCH"
2022-06-30 23:30:11 +02:00
sh "mvn clean install -DskipTests -DskipITs -Poracle-all"
2021-08-24 16:15:52 +02:00
modifyFile ( 'debezium-testing/debezium-testing-system/pom.xml' ) {
it . replaceFirst ( '<version.debezium.connector>.+</version.debezium.connector>' , "<version.debezium.connector>$RELEASE_VERSION</version.debezium.connector>" )
}
sh "git commit -a -m '[release] Stable $RELEASE_VERSION for testing module deps'"
2020-10-13 01:12:30 +02:00
}
2022-06-30 23:30:11 +02:00
STAGING_REPO_ID = mvnRelease ( DEBEZIUM_DIR , DEBEZIUM_REPOSITORY , CANDIDATE_BRANCH , '-Poracle-all' )
2021-08-24 16:15:52 +02:00
dir ( DEBEZIUM_DIR ) {
modifyFile ( 'debezium-testing/debezium-testing-system/pom.xml' ) {
it . replaceFirst ( '<version.debezium.connector>.+</version.debezium.connector>' , '<version.debezium.connector>\\${project.version}</version.debezium.connector>' )
}
sh "git commit -a -m '[release] Development version for testing module deps'"
2021-08-25 11:25:03 +02:00
if ( ! DRY_RUN ) {
withCredentials ( [ usernamePassword ( credentialsId: GIT_CREDENTIALS_ID , passwordVariable: 'GIT_PASSWORD' , usernameVariable: 'GIT_USERNAME' ) ] ) {
sh "" "
git push https: //\${GIT_USERNAME}:\${GIT_PASSWORD}@${DEBEZIUM_REPOSITORY} HEAD:${CANDIDATE_BRANCH}
"" "
}
2021-08-24 16:15:52 +02:00
}
}
2020-10-13 01:12:30 +02:00
ADDITIONAL_REPOSITORIES . each { id , repo - >
2023-05-10 19:06:19 +02:00
// Additional repositories (like Debezium Server) can have their own BOM
def repoBom = "debezium-${id}-bom/pom.xml"
2020-10-13 01:12:30 +02:00
dir ( id ) {
2021-02-03 12:32:38 +01:00
sh "git checkout -b $CANDIDATE_BRANCH"
2020-10-13 01:12:30 +02:00
modifyFile ( "pom.xml" ) {
it . replaceFirst ( '<version>.+</version>\n </parent>' , "<version>$RELEASE_VERSION</version>\n </parent>" )
}
2023-05-10 19:06:19 +02:00
if ( fileExists ( repoBom ) ) {
modifyFile ( repoBom ) {
it . replaceFirst ( '<version>.+</version>\n </parent>' , "<version>$RELEASE_VERSION</version>\n </parent>" )
}
}
2023-06-08 10:42:29 +02:00
if ( id = = "operator" ) {
sh "mvn clean install -Pstable,k8update -DskipTests -DskipITs"
}
2020-10-13 01:12:30 +02:00
sh "git commit -a -m '[release] Stable parent $RELEASE_VERSION for release'"
2023-03-08 10:48:43 +01:00
// Obtain dependecies not available in Maven Central (introduced for Cassandra Enerprise)
if ( fileExists ( INSTALL_ARTIFACTS_SCRIPT ) ) {
sh "./$INSTALL_ARTIFACTS_SCRIPT"
}
2021-03-03 09:54:20 +01:00
sh "mvn clean install -DskipTests -DskipITs"
2020-10-13 01:12:30 +02:00
}
2021-03-03 09:54:20 +01:00
ADDITIONAL_REPOSITORIES [ id ] . mavenRepoId = mvnRelease ( id , repo . git , CANDIDATE_BRANCH , "-Dversion.debezium=$RELEASE_VERSION" )
2020-10-13 01:12:30 +02:00
dir ( id ) {
modifyFile ( "pom.xml" ) {
2020-11-05 14:49:35 +01:00
it . replaceFirst ( '<version>.+</version>\n </parent>' , "<version>$DEVELOPMENT_VERSION</version>\n </parent>" )
2020-10-13 01:12:30 +02:00
}
2023-05-10 19:06:19 +02:00
if ( fileExists ( repoBom ) ) {
modifyFile ( repoBom ) {
it . replaceFirst ( '<version>.+</version>\n </parent>' , "<version>$DEVELOPMENT_VERSION</version>\n </parent>" )
}
}
2023-06-08 10:42:29 +02:00
if ( id = = "operator" ) {
sh "mvn clean install -Pk8update -DskipTests -DskipITs"
}
2020-10-13 01:12:30 +02:00
sh "git commit -a -m '[release] New parent $DEVELOPMENT_VERSION for development'"
if ( ! DRY_RUN ) {
withCredentials ( [ usernamePassword ( credentialsId: GIT_CREDENTIALS_ID , passwordVariable: 'GIT_PASSWORD' , usernameVariable: 'GIT_USERNAME' ) ] ) {
sh "" "
2023-05-10 12:07:07 +02:00
git push https: //\${GIT_USERNAME}:\${GIT_PASSWORD}@${repo.git} HEAD:${CANDIDATE_BRANCH}
2020-10-13 01:12:30 +02:00
"" "
}
}
}
}
}
stage ( 'Verify images' ) {
def sums = [ : ]
for ( i = 0 ; i < CONNECTORS . size ( ) ; i + + ) {
def connector = CONNECTORS [ i ]
dir ( "$LOCAL_MAVEN_REPO/io/debezium/debezium-connector-$connector/$RELEASE_VERSION" ) {
def md5sum = sh ( script: "md5sum -b debezium-connector-${connector}-${RELEASE_VERSION}-plugin.tar.gz | awk '{print \$1}'" , returnStdout: true ) . trim ( )
sums [ "${connector.toUpperCase()}" ] = md5sum
}
}
echo "MD5 sums calculated: ${sums}"
def serverSum = sh ( script: "md5sum -b $LOCAL_MAVEN_REPO/io/debezium/debezium-server-dist/$RELEASE_VERSION/debezium-server-dist-${RELEASE_VERSION}.tar.gz | awk '{print \$1}'" , returnStdout: true ) . trim ( )
2023-06-08 21:58:15 +02:00
def operatorSum = sh ( script: "md5sum -b $LOCAL_MAVEN_REPO/io/debezium/debezium-operator/$RELEASE_VERSION/debezium-operator-${RELEASE_VERSION}.tar.gz | awk '{print \$1}'" , returnStdout: true ) . trim ( )
2020-10-13 01:12:30 +02:00
sums [ 'SCRIPTING' ] = sh ( script: "md5sum -b $LOCAL_MAVEN_REPO/io/debezium/debezium-scripting/$RELEASE_VERSION/debezium-scripting-${RELEASE_VERSION}.tar.gz | awk '{print \$1}'" , returnStdout: true ) . trim ( )
2022-11-02 17:54:38 +01:00
sums [ 'KCRESTEXT' ] = sh ( script: "md5sum -b $LOCAL_MAVEN_REPO/io/debezium/debezium-connect-rest-extension/$RELEASE_VERSION/debezium-connect-rest-extension-${RELEASE_VERSION}.tar.gz | awk '{print \$1}'" , returnStdout: true ) . trim ( )
2020-10-13 01:12:30 +02:00
dir ( "$IMAGES_DIR/connect/$IMAGE_TAG" ) {
echo "Modifying main Dockerfile"
def additionalRepoList = ADDITIONAL_REPOSITORIES . collect ( { id , repo - > "${id.toUpperCase()}=$STAGING_REPO/${repo.mavenRepoId}" } ) . join ( ' ' )
modifyFile ( 'Dockerfile' ) {
def ret = it
. replaceFirst ( 'DEBEZIUM_VERSION="\\S+"' , "DEBEZIUM_VERSION=\"$RELEASE_VERSION\"" )
. replaceFirst ( 'MAVEN_REPO_CENTRAL="[^"]*"' , "MAVEN_REPO_CENTRAL=\"$STAGING_REPO/$STAGING_REPO_ID/\"" )
. replaceFirst ( 'MAVEN_REPOS_ADDITIONAL="[^"]*"' , "MAVEN_REPOS_ADDITIONAL=\"$additionalRepoList\"" )
for ( entry in sums ) {
ret = ret . replaceFirst ( "${entry.key}_MD5=\\S+" , "${entry.key}_MD5=${entry.value}" )
}
return ret
}
modifyFile ( 'Dockerfile.local' ) {
it
. replaceFirst ( 'DEBEZIUM_VERSION=\\S+' , "DEBEZIUM_VERSION=$RELEASE_VERSION" )
}
}
echo "Modifying snapshot Dockerfile"
dir ( "$IMAGES_DIR/connect/snapshot" ) {
modifyFile ( 'Dockerfile' ) {
it . replaceFirst ( 'DEBEZIUM_VERSION=\\S+' , "DEBEZIUM_VERSION=$DEVELOPMENT_VERSION" )
}
}
echo "Modifying Server Dockerfile"
dir ( "$IMAGES_DIR/server/$IMAGE_TAG" ) {
2023-03-09 12:38:40 +01:00
def serverStagingRepoId = ADDITIONAL_REPOSITORIES [ 'server' ] ? . mavenRepoId
if ( serverStagingRepoId = = null ) {
serverStagingRepoId = STAGING_REPO_ID
}
2020-10-13 01:12:30 +02:00
modifyFile ( 'Dockerfile' ) {
it
2023-03-09 12:38:40 +01:00
. replaceFirst ( 'MAVEN_REPO_CENTRAL="[^"]*"' , "MAVEN_REPO_CENTRAL=\"$STAGING_REPO/$serverStagingRepoId/\"" )
2020-10-13 01:12:30 +02:00
. replaceFirst ( 'DEBEZIUM_VERSION=\\S+' , "DEBEZIUM_VERSION=$RELEASE_VERSION" )
. replaceFirst ( 'SERVER_MD5=\\S+' , "SERVER_MD5=$serverSum" )
}
}
2023-06-08 08:28:09 +02:00
echo "Modifying Server snapshot Dockerfile"
dir ( "$IMAGES_DIR/server/snapshot" ) {
modifyFile ( 'Dockerfile' ) {
it . replaceFirst ( 'DEBEZIUM_VERSION=\\S+' , "DEBEZIUM_VERSION=$DEVELOPMENT_VERSION" )
}
}
2023-06-08 21:58:15 +02:00
echo "Modifying Operator Dockerfile"
dir ( "$IMAGES_DIR/operator/$IMAGE_TAG" ) {
def operatorStagingRepoId = ADDITIONAL_REPOSITORIES [ 'operator' ] ? . mavenRepoId
if ( operatorStagingRepoId = = null ) {
operatorStagingRepoId = STAGING_REPO_ID
}
modifyFile ( 'Dockerfile' ) {
it
. replaceFirst ( 'MAVEN_REPO_CENTRAL="[^"]*"' , "MAVEN_REPO_CENTRAL=\"$STAGING_REPO/$operatorStagingRepoId/\"" )
. replaceFirst ( 'DEBEZIUM_VERSION=\\S+' , "DEBEZIUM_VERSION=$RELEASE_VERSION" )
. replaceFirst ( 'OPERATOR_MD5=\\S+' , "OPERATOR_MD5=$operatorSum" )
}
}
echo "Modifying Operator snapshot Dockerfile"
dir ( "$IMAGES_DIR/operator/snapshot" ) {
modifyFile ( 'Dockerfile' ) {
it . replaceFirst ( 'DEBEZIUM_VERSION=\\S+' , "DEBEZIUM_VERSION=$DEVELOPMENT_VERSION" )
}
}
2021-02-17 12:10:15 +01:00
echo "Modifying UI Dockerfile"
dir ( "$IMAGES_DIR" ) {
modifyFile ( "ui/$IMAGE_TAG/Dockerfile" ) {
it . replaceFirst ( 'BRANCH=\\S+' , "BRANCH=$VERSION_TAG" )
}
}
2023-01-05 06:18:43 +01:00
echo "Modifying container images build scripts"
2020-10-13 01:12:30 +02:00
dir ( "$IMAGES_DIR" ) {
2022-10-05 12:42:23 +02:00
modifyFile ( 'build-all-multiplatform.sh' ) {
2020-10-13 01:12:30 +02:00
it . replaceFirst ( 'DEBEZIUM_VERSION=\"\\S+\"' , "DEBEZIUM_VERSION=\"$IMAGE_TAG\"" )
}
2023-01-05 06:18:43 +01:00
modifyFile ( 'build-all.sh' ) {
it . replaceFirst ( 'DEBEZIUM_VERSION=\"\\S+\"' , "DEBEZIUM_VERSION=\"$IMAGE_TAG\"" )
}
2020-10-13 01:12:30 +02:00
}
dir ( IMAGES_DIR ) {
2022-10-05 12:42:23 +02:00
script {
2023-03-29 09:52:26 +02:00
env . DEBEZIUM_DOCKER_REGISTRY_PRIMARY_NAME = 'localhost:5500/debeziumquay'
env . DEBEZIUM_DOCKER_REGISTRY_SECONDARY_NAME = 'localhost:5500/debezium'
2022-10-05 12:42:23 +02:00
}
sh "" "
docker run - - privileged - - rm tonistiigi / binfmt - - install all
. / setup - local - builder . sh
docker compose - f local - registry / docker - compose . yml up - d
env SKIP_UI = true . / build - all - multiplatform . sh
"" "
2020-10-13 01:12:30 +02:00
}
sh "" "
docker rm - f connect zookeeper kafka mysql | | true
2022-10-05 12:42:23 +02:00
docker run - it - d - - name mysql - p 53306 : 3306 - e MYSQL_ROOT_PASSWORD = debezium - e MYSQL_USER = mysqluser - e MYSQL_PASSWORD = mysqlpw $DEBEZIUM_DOCKER_REGISTRY_PRIMARY_NAME / example - mysql: $IMAGE_TAG
docker run - it - d - - name zookeeper - p 2181 : 2181 - p 2888 : 2888 - p 3888 : 3888 $DEBEZIUM_DOCKER_REGISTRY_PRIMARY_NAME / zookeeper: $IMAGE_TAG
2020-10-13 01:12:30 +02:00
sleep 10
2022-10-05 12:42:23 +02:00
docker run - it - d - - name kafka - p 9092 : 9092 - - link zookeeper: zookeeper $DEBEZIUM_DOCKER_REGISTRY_PRIMARY_NAME / kafka: $IMAGE_TAG
2020-10-13 01:12:30 +02:00
sleep 10
2022-10-05 12:42:23 +02:00
docker run - it - d - - name connect - p 8083 : 8083 - e GROUP_ID = 1 - e CONFIG_STORAGE_TOPIC = my_connect_configs - e OFFSET_STORAGE_TOPIC = my_connect_offsets - - link zookeeper: zookeeper - - link kafka: kafka - - link mysql: mysql $DEBEZIUM_DOCKER_REGISTRY_PRIMARY_NAME / connect: $IMAGE_TAG
2020-10-13 01:12:30 +02:00
sleep 30
curl - i - X POST - H "Accept:application/json" - H "Content-Type:application/json" localhost: 8083 /connectors/ - d '
{
"name" : "inventory-connector" ,
"config" : {
"name" : "inventory-connector" ,
"connector.class" : "io.debezium.connector.mysql.MySqlConnector" ,
"tasks.max" : "1" ,
"database.hostname" : "mysql" ,
"database.port" : "3306" ,
"database.user" : "debezium" ,
"database.password" : "dbz" ,
"database.server.id" : "184054" ,
2022-08-19 17:01:53 +02:00
"topic.prefix" : "dbserver1" ,
2020-10-13 01:12:30 +02:00
"database.include.list" : "inventory" ,
2022-09-06 16:39:07 +02:00
"schema.history.internal.kafka.bootstrap.servers" : "kafka:9092" ,
"schema.history.internal.kafka.topic" : "schema-changes.inventory"
2020-10-13 01:12:30 +02:00
}
}
'
sleep 10
"" "
timeout ( time: 2 , unit: java . util . concurrent . TimeUnit . MINUTES ) {
2023-01-19 11:44:35 +01:00
def watcherlog = sh ( script: "docker run --name watcher --rm --link zookeeper:zookeeper --link kafka:kafka $DEBEZIUM_DOCKER_REGISTRY_PRIMARY_NAME/kafka:$IMAGE_TAG watch-topic -a -k dbserver1.inventory.customers --max-messages 2 2>&1" , returnStdout: true ) . trim ( )
2020-10-13 01:12:30 +02:00
echo watcherlog
sh 'docker rm -f connect zookeeper kafka mysql'
if ( ! watcherlog . contains ( 'Processed a total of 2 messages' ) ) {
error 'Tutorial watcher did not reported messages'
}
}
dir ( "$IMAGES_DIR/connect/$IMAGE_TAG" ) {
modifyFile ( 'Dockerfile' ) {
it
. replaceFirst ( 'MAVEN_REPO_CENTRAL="[^"]+"' , "MAVEN_REPO_CENTRAL=\"\"" )
. replaceFirst ( 'MAVEN_REPOS_ADDITIONAL="[^"]+"' , "MAVEN_REPOS_ADDITIONAL=\"\"" )
}
modifyFile ( 'Dockerfile.local' ) {
it
. replaceFirst ( 'DEBEZIUM_VERSION=\"\\S+\"' , "DEBEZIUM_VERSION=\"$RELEASE_VERSION\"" )
}
}
dir ( "$IMAGES_DIR/server/$IMAGE_TAG" ) {
modifyFile ( 'Dockerfile' ) {
it
. replaceFirst ( 'MAVEN_REPO_CENTRAL="[^"]*"' , "MAVEN_REPO_CENTRAL=\"$MAVEN_CENTRAL\"" )
}
}
2023-06-08 21:58:15 +02:00
dir ( "$IMAGES_DIR/operator/$IMAGE_TAG" ) {
modifyFile ( 'Dockerfile' ) {
it
. replaceFirst ( 'MAVEN_REPO_CENTRAL="[^"]*"' , "MAVEN_REPO_CENTRAL=\"$MAVEN_CENTRAL\"" )
}
}
2020-10-13 01:12:30 +02:00
}
stage ( 'Push to Central' ) {
echo '================================================================================='
echo '| |'
echo '| |'
echo '| Log in into the OSS Central and release the staging repo" |'
echo '| |'
echo '| |'
echo '================================================================================='
}
stage ( 'Wait for Central sync' ) {
if ( ! DRY_RUN ) {
timeout ( time: MAVEN_CENTRAL_SYNC_TIMEOUT as int , unit: java . util . concurrent . TimeUnit . HOURS ) {
while ( true ) {
failed = false
for ( i = 0 ; i < CONNECTORS . size ( ) ; i + + ) {
def connector = CONNECTORS [ i ]
def curl = sh ( returnStatus: true , script: "curl -IfskL -o /dev/null https://repo1.maven.org/maven2/io/debezium/debezium-connector-$connector/${RELEASE_VERSION}/debezium-connector-$connector-${RELEASE_VERSION}-plugin.tar.gz" )
if ( curl ) {
echo "Connector $connector not yet in Maven Central"
failed = true
}
}
if ( ! failed ) {
break
}
sleep 30
}
}
}
}
stage ( 'Cleanup Jira' ) {
if ( ! DRY_RUN ) {
closeJiraIssues ( )
closeJiraRelease ( )
}
}
stage ( 'PostgreSQL Decoder' ) {
if ( ! DRY_RUN ) {
dir ( POSTGRES_DECODER_DIR ) {
withCredentials ( [ usernamePassword ( credentialsId: GIT_CREDENTIALS_ID , passwordVariable: 'GIT_PASSWORD' , usernameVariable: 'GIT_USERNAME' ) ] ) {
sh "git tag $VERSION_TAG && git push \"https://\${GIT_USERNAME}:\${GIT_PASSWORD}@${POSTGRES_DECODER_REPOSITORY}\" $VERSION_TAG"
}
}
}
dir ( "$IMAGES_DIR" ) {
for ( tag in POSTGRES_TAGS ) {
modifyFile ( "postgres/$tag/Dockerfile" ) {
it . replaceFirst ( 'PLUGIN_VERSION=\\S+' , "PLUGIN_VERSION=$VERSION_TAG" )
}
}
}
}
stage ( 'Update images' ) {
dir ( "$IMAGES_DIR" ) {
// Change of major/minor version - need to provide a new image tag for next releases
if ( ! DEVELOPMENT_VERSION . startsWith ( IMAGE_TAG ) ) {
def version = DEVELOPMENT_VERSION . split ( '\\.' )
def nextTag = "${version[0]}.${version[1]}"
for ( i = 0 ; i < IMAGES . size ( ) ; i + + ) {
def image = IMAGES [ i ]
if ( ( new File ( "$image/$nextTag" ) ) . exists ( ) ) {
continue
}
sh "cp -r $image/$IMAGE_TAG $image/$nextTag && git add $image/$nextTag"
}
modifyFile ( 'connect/snapshot/Dockerfile' ) {
2023-03-22 00:37:44 +01:00
it . replaceFirst ( 'FROM \\S+' , "FROM quay.io/debezium/connect-base:$nextTag" )
2020-10-13 01:12:30 +02:00
}
modifyFile ( "connect/$nextTag/Dockerfile" ) {
2023-04-20 08:13:44 +02:00
it . replaceFirst ( 'FROM \\S+' , "FROM \\$DEBEZIUM_DOCKER_REGISTRY_PRIMARY_NAME/connect-base:$nextTag" )
2020-10-13 01:12:30 +02:00
}
modifyFile ( "connect/$nextTag/Dockerfile.local" ) {
it
2023-03-22 00:37:44 +01:00
. replaceFirst ( 'FROM \\S+' , "FROM quay.io/debezium/connect-base:$nextTag" )
2020-10-13 01:12:30 +02:00
. replaceFirst ( 'DEBEZIUM_VERSION=\\S+' , "DEBEZIUM_VERSION=${DEVELOPMENT_VERSION - '-SNAPSHOT'}" )
}
modifyFile ( "connect-base/$nextTag/Dockerfile" ) {
2023-04-20 08:13:44 +02:00
it . replaceFirst ( 'FROM \\S+' , "FROM \\$DEBEZIUM_DOCKER_REGISTRY_PRIMARY_NAME/kafka:$nextTag" )
2020-10-13 01:12:30 +02:00
}
}
if ( ! DRY_RUN ) {
withCredentials ( [ usernamePassword ( credentialsId: GIT_CREDENTIALS_ID , passwordVariable: 'GIT_PASSWORD' , usernameVariable: 'GIT_USERNAME' ) ] ) {
sh "" "
2022-06-30 09:51:57 +02:00
git commit - a - m "Updated container images for release $RELEASE_VERSION" & & git push https: //\${GIT_USERNAME}:\${GIT_PASSWORD}@${
2020-10-13 01:12:30 +02:00
IMAGES_REPOSITORY
} HEAD: $IMAGES_BRANCH
git tag $VERSION_TAG & & git push https: //\${GIT_USERNAME}:\${GIT_PASSWORD}@${IMAGES_REPOSITORY} $VERSION_TAG
"" "
}
}
}
}
2021-02-03 12:32:38 +01:00
2021-03-01 05:59:20 +01:00
stage ( 'Merge candidates to the branch' ) {
2021-02-15 12:26:06 +01:00
if ( ! DRY_RUN ) {
dir ( DEBEZIUM_DIR ) {
withCredentials ( [ usernamePassword ( credentialsId: GIT_CREDENTIALS_ID , passwordVariable: 'GIT_PASSWORD' , usernameVariable: 'GIT_USERNAME' ) ] ) {
sh "" "
git pull - - rebase https: //\${GIT_USERNAME}:\${GIT_PASSWORD}@$DEBEZIUM_REPOSITORY $CANDIDATE_BRANCH && \\
2021-03-01 05:59:20 +01:00
git checkout $DEBEZIUM_BRANCH & & \ \
2021-02-15 12:26:06 +01:00
git rebase $CANDIDATE_BRANCH & & \ \
git push https: //\${GIT_USERNAME}:\${GIT_PASSWORD}@$DEBEZIUM_REPOSITORY HEAD:$DEBEZIUM_BRANCH && \\
git push - - delete https: //\${GIT_USERNAME}:\${GIT_PASSWORD}@$DEBEZIUM_REPOSITORY $CANDIDATE_BRANCH
"" "
}
2021-03-01 05:59:20 +01:00
}
ADDITIONAL_REPOSITORIES . each { id , repo - >
dir ( id ) {
withCredentials ( [ usernamePassword ( credentialsId: GIT_CREDENTIALS_ID , passwordVariable: 'GIT_PASSWORD' , usernameVariable: 'GIT_USERNAME' ) ] ) {
sh "" "
git pull - - rebase https: //\${GIT_USERNAME}:\${GIT_PASSWORD}@${repo.git} $CANDIDATE_BRANCH && \\
git checkout $ { repo . branch } & & \ \
git rebase $CANDIDATE_BRANCH & & \ \
git push https: //\${GIT_USERNAME}:\${GIT_PASSWORD}@${repo.git} HEAD:${repo.branch} && \\
git push - - delete https: //\${GIT_USERNAME}:\${GIT_PASSWORD}@${repo.git} $CANDIDATE_BRANCH
"" "
2021-02-15 12:26:06 +01:00
}
2021-02-03 12:32:38 +01:00
}
}
}
}
2021-02-17 12:10:15 +01:00
stage ( 'Debezium UI' ) {
if ( ! DRY_RUN ) {
dir ( UI_DIR ) {
withCredentials ( [ usernamePassword ( credentialsId: GIT_CREDENTIALS_ID , passwordVariable: 'GIT_PASSWORD' , usernameVariable: 'GIT_USERNAME' ) ] ) {
sh "git tag $VERSION_TAG && git push \"https://\${GIT_USERNAME}:\${GIT_PASSWORD}@${UI_REPOSITORY}\" $VERSION_TAG"
}
}
}
}
2020-10-13 01:12:30 +02:00
}
2023-01-04 13:38:34 +01:00
2023-01-04 13:54:58 +01:00
mail to: MAIL_TO , subject: "${JOB_NAME} run #${BUILD_NUMBER} finished with ${currentBuild.currentResult}" , body: "Run ${BUILD_URL} finished with result: ${currentBuild.currentResult}"
2020-10-13 01:12:30 +02:00
}