From c8fa96591b6c15f72d8d5485efcb61fe319dc704 Mon Sep 17 00:00:00 2001 From: Prudhvi Godithi Date: Tue, 23 Apr 2024 10:35:26 -0700 Subject: [PATCH] Fix manifest lock automation bug Signed-off-by: Prudhvi Godithi --- .../release-manifest-commit-lock.jenkinsfile | 14 +++++++------- manifests/1.3.16/opensearch-1.3.16.yml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/jenkins/release-manifest-commit-lock/release-manifest-commit-lock.jenkinsfile b/jenkins/release-manifest-commit-lock/release-manifest-commit-lock.jenkinsfile index 7df3f614f1..740a7e2ff8 100644 --- a/jenkins/release-manifest-commit-lock/release-manifest-commit-lock.jenkinsfile +++ b/jenkins/release-manifest-commit-lock/release-manifest-commit-lock.jenkinsfile @@ -80,7 +80,7 @@ pipeline { selectedComponents.each { componentName -> def existingComponent = existingManifest.components.find { it.name == componentName.name } if (existingComponent) { - def newComponentRef = buildManifest.components.find { it.name == componentName.name }?.ref + def newComponentRef = buildManifest.components.find { it.name == componentName.name }?.commit_id if (newComponentRef) { existingComponent.ref = newComponentRef } @@ -135,18 +135,18 @@ pipeline { withCredentials([usernamePassword(credentialsId: 'jenkins-github-bot-token', passwordVariable: 'GITHUB_TOKEN', usernameVariable: 'GITHUB_USER')]) { try { sh """ - git remote set-url origin "https://opensearch-ci:${GITHUB_TOKEN}@github.com/opensearch-project/opensearch-build" - git config user.email "opensearch-infra@amazon.com" - git config user.name "opensearch-ci" - git checkout -b manifest-lock + git remote set-url origin "https://prudhvigodithi:${GITHUB_TOKEN}@github.com/prudhvigodithi/opensearch-build" + git config user.email "pgodithi@amazon.com" + git config user.name "prudhvigodithi" + git checkout -b manifest-lock-test """ def status = sh(returnStdout: true, script: 'git status --porcelain') if (status) { sh """ git status --porcelain | grep '^ M' | cut -d " " -f3 | xargs git add git commit -sm "Manifest Commit Lock for Release ${params.RELEASE_VERSION}" - git push origin manifest-lock --force - gh pr create --title '[${params.RELEASE_VERSION}] Manifest Commit Lock with action ${params.MANIFEST_LOCK_ACTION}' --body 'Manifest Commit Lock for Release ${params.RELEASE_VERSION} ' -H manifest-lock -B main + git push origin manifest-lock-test --force + gh pr create --title '[${params.RELEASE_VERSION}] Manifest Commit Lock with action ${params.MANIFEST_LOCK_ACTION}' --body 'Manifest Commit Lock for Release ${params.RELEASE_VERSION} ' -H manifest-lock-test -B main """ } else { println 'Nothing to commit!' diff --git a/manifests/1.3.16/opensearch-1.3.16.yml b/manifests/1.3.16/opensearch-1.3.16.yml index b3568be951..76beb85745 100644 --- a/manifests/1.3.16/opensearch-1.3.16.yml +++ b/manifests/1.3.16/opensearch-1.3.16.yml @@ -10,7 +10,7 @@ ci: components: - name: OpenSearch repository: https://github.com/opensearch-project/OpenSearch.git - ref: 1870e738c6c11c6500965d394ca920e5890234a1 + ref: 1.3 checks: - gradle:publish - gradle:properties:version