diff --git a/build.gradle b/build.gradle index de4be937..1b23eb01 100644 --- a/build.gradle +++ b/build.gradle @@ -128,7 +128,7 @@ jacocoTestReport { } } -String version = '7.2.0' +String version = '7.2.1' task updateVersion { doLast { diff --git a/tests/jenkins/TestRetrievePreviousBuild.groovy b/tests/jenkins/TestRetrievePreviousBuild.groovy index 11d001aa..a903f3ed 100644 --- a/tests/jenkins/TestRetrievePreviousBuild.groovy +++ b/tests/jenkins/TestRetrievePreviousBuild.groovy @@ -34,7 +34,7 @@ class TestRetrievePreviousBuild extends BuildPipelineTest { super.testPipeline('tests/jenkins/jobs/RetrievePreviousBuild_Jenkinsfile') def shCommands = getCommands('sh', 'mkdir') assertThat(shCommands, hasItems('rm -rf tar && mkdir -p tar && mv -v /tmp/workspace/download/dummy_job/2.12.0/123/linux/x64/tar/* /tmp/workspace/tar')) - assertThat(shCommands, hasItems('mkdir -p ~/.m2/repository/org/ && cp -r tar/builds/opensearch/maven/org/opensearch/ ~/.m2/repository/org/')) + assertThat(shCommands, hasItems('mkdir -p $HOME/.m2/repository/org/ && cp -r tar/builds/opensearch/maven/org/opensearch/ $HOME/.m2/repository/org/')) assertThat(shCommands, hasItems('rm -rf zip && mkdir -p zip && mv -v /tmp/workspace/download/dummy_job/2.12.0/1234/windows/x64/zip/* /tmp/workspace/zip')) assertThat(shCommands, not(hasItems('mkdir -p ~/.m2/repository/org/ && cp -r zip/builds/opensearch/maven/org/opensearch/ ~/.m2/repository/org/'))) diff --git a/tests/jenkins/jobs/RetrievePreviousBuild_Jenkinsfile.txt b/tests/jenkins/jobs/RetrievePreviousBuild_Jenkinsfile.txt index 0c06d4b4..2e27d9e5 100644 --- a/tests/jenkins/jobs/RetrievePreviousBuild_Jenkinsfile.txt +++ b/tests/jenkins/jobs/RetrievePreviousBuild_Jenkinsfile.txt @@ -17,7 +17,7 @@ downloadFromS3.s3Download({file=/tmp/workspace/download, bucket=ARTIFACT_BUCKET_NAME, path=dummy_job/2.12.0/123/linux/x64/tar/, force=true}) retrievePreviousBuild.sh(rm -rf tar && mkdir -p tar && mv -v /tmp/workspace/download/dummy_job/2.12.0/123/linux/x64/tar/* /tmp/workspace/tar) retrievePreviousBuild.echo(Setting up Maven Local for OpenSearch build.) - retrievePreviousBuild.sh(mkdir -p ~/.m2/repository/org/ && cp -r tar/builds/opensearch/maven/org/opensearch/ ~/.m2/repository/org/) + retrievePreviousBuild.sh(mkdir -p $HOME/.m2/repository/org/ && cp -r tar/builds/opensearch/maven/org/opensearch/ $HOME/.m2/repository/org/) RetrievePreviousBuild_Jenkinsfile.retrievePreviousBuild({inputManifest=tests/data/opensearch-dashboards-input-2.12.0.yml, distribution=zip, architecture=x64, platform=windows, distributionBuildNumber=1234}) retrievePreviousBuild.legacySCM(groovy.lang.Closure) retrievePreviousBuild.library({identifier=jenkins@main, retriever=null}) diff --git a/vars/retrievePreviousBuild.groovy b/vars/retrievePreviousBuild.groovy index 61402480..76c47c5f 100644 --- a/vars/retrievePreviousBuild.groovy +++ b/vars/retrievePreviousBuild.groovy @@ -43,7 +43,7 @@ void call(Map args = [:]) { sh("rm -rf ${distribution} && mkdir -p ${distribution} && mv -v ${prefixPath}/${artifactPath}/* ${WORKSPACE}/${distribution}") if (inputManifestObj.build.getFilename().equals("opensearch")) { echo("Setting up Maven Local for OpenSearch build.") - sh("mkdir -p ~/.m2/repository/org/ && cp -r ${distribution}/builds/opensearch/maven/org/opensearch/ ~/.m2/repository/org/") + sh("mkdir -p \$HOME/.m2/repository/org/ && cp -r ${distribution}/builds/opensearch/maven/org/opensearch/ \$HOME/.m2/repository/org/") } }