-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate locking manifests with tags
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
- Loading branch information
Showing
9 changed files
with
106 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...job-regression-files/release-manifest-commit-lock/testManifestCommitLock_updateToTags.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
release-manifest-commit-lock.run() | ||
release-manifest-commit-lock.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) | ||
release-manifest-commit-lock.library({identifier=jenkins@6.4.0, retriever=null}) | ||
release-manifest-commit-lock.pipeline(groovy.lang.Closure) | ||
release-manifest-commit-lock.timeout({time=2, unit=HOURS}) | ||
release-manifest-commit-lock.echo(Executing on agent [docker:[alwaysPull:true, args:, containerPerStageRoot:false, label:Jenkins-Agent-AL2023-X64-C54xlarge-Docker-Host, image:opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v3, reuseNode:false, registryUrl:https://public.ecr.aws/, stages:[:]]]) | ||
release-manifest-commit-lock.stage(Parameters Check, groovy.lang.Closure) | ||
release-manifest-commit-lock.script(groovy.lang.Closure) | ||
release-manifest-commit-lock.echo(Skipping stage MATCH_BUILD_MANIFEST) | ||
release-manifest-commit-lock.echo(Skipping stage UPDATE_TO_RECENT_COMMITS) | ||
release-manifest-commit-lock.stage(UPDATE_TO_TAGS, groovy.lang.Closure) | ||
release-manifest-commit-lock.script(groovy.lang.Closure) | ||
release-manifest-commit-lock.readYaml({file=manifests/2.0.0/opensearch-2.0.0.yml}) | ||
release-manifest-commit-lock.writeYaml({file=manifests/2.0.0/opensearch-2.0.0.yml, data={schema-version=1.0, build={name=OpenSearch, version=2.0.0, qualifier=alpha1}, ci={image={name=opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v2, args=-e JAVA_HOME=/opt/java/openjdk-17}}, components=[{name=OpenSearch, ref=tags/2.0.0, repository=https://github.com/opensearch-project/OpenSearch.git, checks=[gradle:publish, gradle:properties:version]}, {name=common-utils, repository=https://github.com/opensearch-project/common-utils.git, ref=2.0, checks=[gradle:publish, gradle:properties:version]}, {name=job-scheduler, repository=https://github.com/opensearch-project/job-scheduler.git, ref=2.0, checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}]}, overwrite=true}) | ||
release-manifest-commit-lock.sh( | ||
yq eval -i '.' manifests/2.0.0/opensearch-2.0.0.yml | ||
sed -i '1s/^/---\n/' manifests/2.0.0/opensearch-2.0.0.yml | ||
) | ||
release-manifest-commit-lock.readYaml({file=manifests/2.0.0/opensearch-dashboards-2.0.0.yml}) | ||
release-manifest-commit-lock.writeYaml({file=manifests/2.0.0/opensearch-dashboards-2.0.0.yml, data={schema-version=1.0, build={name=OpenSearch, version=2.0.0, qualifier=alpha1}, ci={image={name=opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v2, args=-e JAVA_HOME=/opt/java/openjdk-17}}, components=[{name=OpenSearch, ref=tags/2.0.0, repository=https://github.com/opensearch-project/OpenSearch.git, checks=[gradle:publish, gradle:properties:version]}, {name=common-utils, repository=https://github.com/opensearch-project/common-utils.git, ref=2.0, checks=[gradle:publish, gradle:properties:version]}, {name=job-scheduler, repository=https://github.com/opensearch-project/job-scheduler.git, ref=2.0, checks=[gradle:properties:version, gradle:dependencies:opensearch.version]}]}, overwrite=true}) | ||
release-manifest-commit-lock.sh( | ||
yq eval -i '.' manifests/2.0.0/opensearch-dashboards-2.0.0.yml | ||
sed -i '1s/^/---\n/' manifests/2.0.0/opensearch-dashboards-2.0.0.yml | ||
) | ||
release-manifest-commit-lock.stage(Create Pull Request, groovy.lang.Closure) | ||
release-manifest-commit-lock.script(groovy.lang.Closure) | ||
release-manifest-commit-lock.usernamePassword({credentialsId=jenkins-github-bot-token, passwordVariable=GITHUB_TOKEN, usernameVariable=GITHUB_USER}) | ||
release-manifest-commit-lock.withCredentials([[GITHUB_USER, GITHUB_TOKEN]], groovy.lang.Closure) | ||
release-manifest-commit-lock.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 | ||
) | ||
release-manifest-commit-lock.sh({returnStdout=true, script=git status --porcelain}) | ||
release-manifest-commit-lock.sh( | ||
git status --porcelain | grep '^ M' | cut -d " " -f3 | xargs git add | ||
git commit -sm "Manifest Commit Lock for Release 2.0.0" | ||
git push origin manifest-lock --force | ||
gh pr create --title '[2.0.0] Manifest Commit Lock with action UPDATE_TO_TAGS' --body 'Manifest Commit Lock for Release 2.0.0 ' -H manifest-lock -B main | ||
) | ||
release-manifest-commit-lock.script(groovy.lang.Closure) | ||
release-manifest-commit-lock.postCleanup() | ||
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters