Repository: opensearch-project/opensearch-build

Issue:
Create a unified check workflow between checking for build SHA between OpenSearch and OpenSearch-Dashboards
In https://github.com/opensearch-project/opensearch-build/pull/1254 we created a way to only kick of builds for OpenSearch if the build was already created, we should make sure the shared parts of this workflow are minimal.

Acceptance Criteria:
- Both OpenSearch and OpenSearch-Dashboards workflows are _only_ triggered when new build changes have been detected from a more frequently job 


Discussion:

Resolving patch:
diff --git a/src/manifests/input_manifest.py b/src/manifests/input_manifest.py
--- a/src/manifests/input_manifest.py
+++ b/src/manifests/input_manifest.py
@@ -116,13 +116,8 @@ def __to_dict__(self) -> dict:
             "components": self.components.__to_dict__(),
         }
 
-    def stable(self, architecture: str = None, platform: str = None, snapshot: bool = False) -> 'InputManifest':
+    def stable(self) -> 'InputManifest':
         manifest: 'InputManifest' = copy.deepcopy(self)
-        manifest.build.__stabilize__(
-            platform=platform,
-            architecture=architecture,
-            snapshot=snapshot
-        )
         manifest.components.__stabilize__()
         return manifest
 
@@ -153,11 +148,6 @@ def __init__(self, data: Any):
             self.snapshot = data.get("snapshot", None)
             self.patches = data.get("patches", [])
 
-        def __stabilize__(self, platform: str, architecture: str, snapshot: bool) -> None:
-            self.architecture = architecture
-            self.platform = platform
-            self.snapshot = snapshot
-
         def __to_dict__(self) -> dict:
             return {
                 "name": self.name,
diff --git a/src/run_build.py b/src/run_build.py
--- a/src/run_build.py
+++ b/src/run_build.py
@@ -17,7 +17,6 @@
 from manifests.input_manifest import InputManifest
 from paths.build_output_dir import BuildOutputDir
 from system import console
-from system.os import current_architecture, current_platform
 from system.temporary_directory import TemporaryDirectory
 
 
@@ -27,11 +26,7 @@ def main():
     manifest = InputManifest.from_file(args.manifest)
 
     if args.ref_manifest:
-        manifest = manifest.stable(
-            architecture=args.architecture or current_architecture(),
-            platform=args.platform or current_platform(),
-            snapshot=args.snapshot if args.snapshot is not None else False
-        )
+        manifest = manifest.stable()
         if os.path.exists(args.ref_manifest):
             if manifest == InputManifest.from_path(args.ref_manifest):
                 logging.info(f"No changes since {args.ref_manifest}")


Test patch:
diff --git a/tests/jenkins/TestArchiveAssembleUpload.groovy b/tests/jenkins/TestArchiveAssembleUpload.groovy
--- a/tests/jenkins/TestArchiveAssembleUpload.groovy
+++ b/tests/jenkins/TestArchiveAssembleUpload.groovy
@@ -41,21 +41,6 @@ class TestArchiveAssembleUpload extends BuildPipelineTest {
 
     @Test
     public void testSHAExists() {
-        binding.env."BUILD_SHA_linux_x64_SHA" = 'sha1'
-        binding.env."BUILD_SHA_linux_x64_LOCK" = 'tests/jenkins/data/opensearch-1.3.0.yml.lock'
-        binding.env."BUILD_SHA_linux_x64_PATH" = 'assemble-upload-build/1.1.0/shas/linux/x64/sha1.yml'
-
-        super.testPipeline(
-            "tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile",
-            "tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile_sha"
-        )
-    }
-
-    @Test
-    public void testSHADoesNotExist() {
-        super.testPipeline(
-            "tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile",
-            "tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile_no_sha"
-        )
+        super.testPipeline("tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile")
     }
 }
diff --git a/tests/jenkins/TestBuildArchive.groovy b/tests/jenkins/TestBuildArchive.groovy
--- a/tests/jenkins/TestBuildArchive.groovy
+++ b/tests/jenkins/TestBuildArchive.groovy
@@ -21,19 +21,11 @@ class TestBuildArchive extends BuildPipelineTest {
         binding.setVariable('AWS_ACCOUNT_PUBLIC', 'account')
         binding.setVariable('ARTIFACT_BUCKET_NAME', 'artifact-bucket')
 
-        helper.registerAllowedMethod("sha1", [String], { filename ->
-            return 'sha1'
-        })
-
         helper.registerAllowedMethod("withCredentials", [List, Closure], { list, closure ->
             closure.delegate = delegate
             return helper.callClosure(closure)
         })
 
-        helper.registerAllowedMethod("sha1", [String], { filename ->
-            return 'sha1'
-        })
-
         helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure ->
             closure.delegate = delegate
             return helper.callClosure(closure)
@@ -44,26 +36,7 @@ class TestBuildArchive extends BuildPipelineTest {
     }
 
     @Test
-    public void testIncremental() {
-        helper.registerAllowedMethod("s3DoesObjectExist", [Map], { args ->
-            return true
-        })
-
-        super.testPipeline(
-            "tests/jenkins/jobs/BuildArchive_Jenkinsfile",
-            "tests/jenkins/jobs/BuildArchive_Jenkinsfile_incremental"
-        )
-    }
-
-    @Test
-    public void testNotIncremental() {
-        helper.registerAllowedMethod("s3DoesObjectExist", [Map], { args ->
-            return false
-        })
-
-        super.testPipeline(
-            "tests/jenkins/jobs/BuildArchive_Jenkinsfile",
-            "tests/jenkins/jobs/BuildArchive_Jenkinsfile_not_incremental"
-        )
+    public void testJenkinsfile() {
+        super.testPipeline("tests/jenkins/jobs/BuildArchive_Jenkinsfile")
     }
 }
diff --git a/tests/jenkins/TestBuildAssembleUpload.groovy b/tests/jenkins/TestBuildAssembleUpload.groovy
--- a/tests/jenkins/TestBuildAssembleUpload.groovy
+++ b/tests/jenkins/TestBuildAssembleUpload.groovy
@@ -30,10 +30,6 @@ class TestBuildAssembleUpload extends BuildPipelineTest {
             return helper.callClosure(closure)
         })
 
-        helper.registerAllowedMethod("sha1", [String], { filename ->
-            return 'sha1'
-        })
-
         helper.registerAllowedMethod("s3Upload", [Map])
         helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure ->
             closure.delegate = delegate
@@ -44,31 +40,11 @@ class TestBuildAssembleUpload extends BuildPipelineTest {
     }
 
     @Test
-    public void testIncremental() {
+    public void testJenkinsfile() {
         helper.registerAllowedMethod("s3DoesObjectExist", [Map], { args ->
             return true
         })
 
-        super.testPipeline(
-            "tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile",
-            "tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile_incremental"
-        )
-    }
-
-    @Test
-    public void testNotIncremental() {
-        Path source = Path.of("tests/data/opensearch-build-1.1.0.yml");
-        Path target = Path.of("builds/opensearch/manifest.yml");
-        Files.createDirectories(target.getParent());
-        Files.copy(source, target, StandardCopyOption.REPLACE_EXISTING);    
-
-        helper.registerAllowedMethod("s3DoesObjectExist", [Map], { args ->
-            return false
-        })
-
-        super.testPipeline(
-            "tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile",
-            "tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile_not_incremental"
-        )
+        super.testPipeline("tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile")
     }
 }
diff --git a/tests/jenkins/TestBuildUploadManifestSHA.groovy b/tests/jenkins/TestBuildUploadManifestSHA.groovy
new file mode 100644
--- /dev/null
+++ b/tests/jenkins/TestBuildUploadManifestSHA.groovy
@@ -0,0 +1,47 @@
+/*
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * The OpenSearch Contributors require contributions made to
+ * this file be licensed under the Apache-2.0 license or a
+ * compatible open source license.
+ */
+
+package jenkins.tests
+
+import org.junit.*
+import java.util.*
+
+class TestBuildUploadManifestSHA extends BuildPipelineTest {
+    @Override
+    @Before
+    void setUp() {
+        super.setUp()
+
+        binding.setVariable('JOB_NAME', 'get-manifest-sha-build')
+        binding.setVariable('AWS_ACCOUNT_PUBLIC', 'account')
+        binding.setVariable('ARTIFACT_BUCKET_NAME', 'artifact-bucket')
+
+        helper.registerAllowedMethod("sha1", [String], { filename ->
+            return 'sha1'
+        })
+
+        helper.registerAllowedMethod("s3Upload", [Map])
+        helper.registerAllowedMethod("withAWS", [Map, Closure], { args, closure ->
+            closure.delegate = delegate
+            return helper.callClosure(closure)
+        })
+
+        helper.registerAllowedMethod("git", [Map])
+    }
+
+    @Test
+    public void testDoesNotExist() {
+        helper.registerAllowedMethod("s3DoesObjectExist", [Map], { args ->
+            return false
+        })
+
+        super.testPipeline(
+            "tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile"
+        )
+    }
+}
diff --git a/tests/jenkins/data/opensearch-1.3.0.yml.lock b/tests/jenkins/data/opensearch-1.3.0.yml.lock
--- a/tests/jenkins/data/opensearch-1.3.0.yml.lock
+++ b/tests/jenkins/data/opensearch-1.3.0.yml.lock
@@ -1,8 +1,6 @@
 build:
   architecture: x64
   name: OpenSearch
-  platform: darwin
-  snapshot: false
   version: 1.3.0
 ci:
   image:
diff --git a/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile b/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile
--- a/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile
+++ b/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile
@@ -5,6 +5,7 @@ pipeline {
             steps {
                 script {
                     archiveAssembleUpload(
+                        manifest: 'tests/jenkins/data/opensearch-1.3.0.yml',
                         platform: 'linux',
                         architecture: 'x64'
                     )
diff --git a/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile_sha.txt b/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile.txt
similarity index 61%
rename from tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile_sha.txt
rename to tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile.txt
--- a/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile_sha.txt
+++ b/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile.txt
@@ -3,31 +3,26 @@
          ArchiveAssembleUpload_Jenkinsfile.echo(Executing on agent [label:none])
          ArchiveAssembleUpload_Jenkinsfile.stage(assemble from archive, groovy.lang.Closure)
             ArchiveAssembleUpload_Jenkinsfile.script(groovy.lang.Closure)
-               ArchiveAssembleUpload_Jenkinsfile.archiveAssembleUpload({platform=linux, architecture=x64})
-                  archiveAssembleUpload.echo(Read BUILD_SHA_linux_x64_[SHA|LOCK|PATH].)
-                  archiveAssembleUpload.echo(sha.sha=sha1)
-                  archiveAssembleUpload.echo(sha.lock=tests/jenkins/data/opensearch-1.3.0.yml.lock)
-                  archiveAssembleUpload.echo(sha.path=assemble-upload-build/1.1.0/shas/linux/x64/sha1.yml)
+               ArchiveAssembleUpload_Jenkinsfile.archiveAssembleUpload({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64})
                   archiveAssembleUpload.legacySCM(groovy.lang.Closure)
                   archiveAssembleUpload.library({identifier=jenkins@20211123, retriever=null})
-                  archiveAssembleUpload.echo(Assembling sha1 (tests/jenkins/data/opensearch-1.3.0.yml.lock))
+                  archiveAssembleUpload.echo(Assembling tests/jenkins/data/opensearch-1.3.0.yml)
                   archiveAssembleUpload.specific(33)
-                  archiveAssembleUpload.copyArtifacts({filter=sha1-*.zip, fingerprintArtifacts=true, projectName=vars-build, selector=null})
-                  archiveAssembleUpload.unzip({zipFile=sha1-builds.zip})
-                  archiveAssembleUpload.unzip({zipFile=sha1-manifest.zip})
-                  archiveAssembleUpload.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock})
+                  archiveAssembleUpload.copyArtifacts({filter=*.zip, fingerprintArtifacts=true, projectName=vars-build, selector=null})
+                  archiveAssembleUpload.unzip({zipFile=archived-builds.zip})
+                  archiveAssembleUpload.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml})
                   InputManifest.asBoolean()
-                  archiveAssembleUpload.assembleUpload({platform=linux, architecture=x64, manifest=builds/opensearch/manifest.yml, sha={sha=sha1, lock=tests/jenkins/data/opensearch-1.3.0.yml.lock, path=assemble-upload-build/1.1.0/shas/linux/x64/sha1.yml}})
+                  archiveAssembleUpload.assembleUpload({manifest=builds/opensearch/manifest.yml, platform=linux, architecture=x64})
                      assembleUpload.legacySCM(groovy.lang.Closure)
                      assembleUpload.library({identifier=jenkins@20211123, retriever=null})
-                     assembleUpload.assembleManifest({platform=linux, architecture=x64, manifest=builds/opensearch/manifest.yml, sha={sha=sha1, lock=tests/jenkins/data/opensearch-1.3.0.yml.lock, path=assemble-upload-build/1.1.0/shas/linux/x64/sha1.yml}})
+                     assembleUpload.assembleManifest({manifest=builds/opensearch/manifest.yml, platform=linux, architecture=x64})
                         assembleManifest.legacySCM(groovy.lang.Closure)
                         assembleManifest.library({identifier=jenkins@20211123, retriever=null})
                         assembleManifest.readYaml({file=builds/opensearch/manifest.yml})
                         BuildManifest.asBoolean()
                         BuildManifest.getArtifactRootUrl(https://ci.opensearch.org/dbc, vars-build, 33)
                         assembleManifest.sh(./assemble.sh "builds/opensearch/manifest.yml" --base-url https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64)
-                     assembleUpload.uploadArtifacts({platform=linux, architecture=x64, manifest=builds/opensearch/manifest.yml, sha={sha=sha1, lock=tests/jenkins/data/opensearch-1.3.0.yml.lock, path=assemble-upload-build/1.1.0/shas/linux/x64/sha1.yml}})
+                     assembleUpload.uploadArtifacts({manifest=builds/opensearch/manifest.yml, platform=linux, architecture=x64})
                         uploadArtifacts.legacySCM(groovy.lang.Closure)
                         uploadArtifacts.library({identifier=jenkins@20211123, retriever=null})
                         uploadArtifacts.readYaml({file=builds/opensearch/manifest.yml})
@@ -44,11 +39,9 @@ https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/dist/opensearch/mani
                            uploadArtifacts.writeFile({file=messages/stage.msg, text=https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/builds/opensearch/manifest.yml
 https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/dist/opensearch/manifest.yml})
                            uploadArtifacts.stash({includes=messages/*, name=messages-stage})
-                     assembleUpload.withAWS({role=opensearch-bundle, roleAccount=account, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
-                        assembleUpload.s3Upload({bucket=artifact-bucket, file=tests/jenkins/data/opensearch-1.3.0.yml.lock, path=assemble-upload-build/1.1.0/shas/linux/x64/sha1.yml})
-                     assembleUpload.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock})
+                     assembleUpload.readYaml({file=builds/opensearch/manifest.yml})
                      InputManifest.asBoolean()
                      assembleUpload.readYaml({file=builds/opensearch/manifest.yml})
                      BuildManifest.asBoolean()
                      InputManifest.getPublicDistUrl(https://ci.opensearch.org/dbc, vars-build, 33, linux, x64)
-                     assembleUpload.echo(Setting env."ARTIFACT_URL_linux_x64"=https://ci.opensearch.org/dbc/vars-build/1.3.0/33/linux/x64/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz)
+                     assembleUpload.echo(Setting env."ARTIFACT_URL_linux_x64"=https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/dist/opensearch/opensearch-1.1.0-linux-x64.tar.gz)
diff --git a/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile_no_sha.txt b/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile_no_sha.txt
deleted file mode 100644
--- a/tests/jenkins/jobs/ArchiveAssembleUpload_Jenkinsfile_no_sha.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-   ArchiveAssembleUpload_Jenkinsfile.run()
-      ArchiveAssembleUpload_Jenkinsfile.pipeline(groovy.lang.Closure)
-         ArchiveAssembleUpload_Jenkinsfile.echo(Executing on agent [label:none])
-         ArchiveAssembleUpload_Jenkinsfile.stage(assemble from archive, groovy.lang.Closure)
-            ArchiveAssembleUpload_Jenkinsfile.script(groovy.lang.Closure)
-               ArchiveAssembleUpload_Jenkinsfile.archiveAssembleUpload({platform=linux, architecture=x64})
-                  archiveAssembleUpload.echo(Read BUILD_SHA_linux_x64_[SHA|LOCK|PATH].)
-                  archiveAssembleUpload.echo(sha.sha=null)
-                  archiveAssembleUpload.echo(sha.lock=null)
-                  archiveAssembleUpload.echo(sha.path=null)
-                  archiveAssembleUpload.legacySCM(groovy.lang.Closure)
-                  archiveAssembleUpload.library({identifier=jenkins@20211123, retriever=null})
-                  Messages.asBoolean()
-                  Messages.add(stage, Skipped stage, linux-x64 was not built.)
-                     archiveAssembleUpload.writeFile({file=messages/stage.msg, text=Skipped stage, linux-x64 was not built.})
-                     archiveAssembleUpload.stash({includes=messages/*, name=messages-stage})
-                  archiveAssembleUpload.echo(Skipping, linux x64 was not built.)
diff --git a/tests/jenkins/jobs/AssembleUpload_Jenkinsfile b/tests/jenkins/jobs/AssembleUpload_Jenkinsfile
--- a/tests/jenkins/jobs/AssembleUpload_Jenkinsfile
+++ b/tests/jenkins/jobs/AssembleUpload_Jenkinsfile
@@ -6,11 +6,6 @@ pipeline {
                 script {
                     assembleUpload(
                         manifest: 'tests/data/opensearch-build-1.1.0.yml',
-                        sha: [
-                            sha: 'sha1',
-                            lock: 'tests/jenkins/data/opensearch-1.3.0.yml.lock',
-                            path: 'assemble-upload-build/1.1.0/shas/linux/x64/sha1.yml'
-                        ]
                     )
                 }
             }
diff --git a/tests/jenkins/jobs/AssembleUpload_Jenkinsfile.txt b/tests/jenkins/jobs/AssembleUpload_Jenkinsfile.txt
--- a/tests/jenkins/jobs/AssembleUpload_Jenkinsfile.txt
+++ b/tests/jenkins/jobs/AssembleUpload_Jenkinsfile.txt
@@ -3,17 +3,17 @@
          AssembleUpload_Jenkinsfile.echo(Executing on agent [label:none])
          AssembleUpload_Jenkinsfile.stage(assemble and upload, groovy.lang.Closure)
             AssembleUpload_Jenkinsfile.script(groovy.lang.Closure)
-               AssembleUpload_Jenkinsfile.assembleUpload({manifest=tests/data/opensearch-build-1.1.0.yml, sha={sha=sha1, lock=tests/jenkins/data/opensearch-1.3.0.yml.lock, path=assemble-upload-build/1.1.0/shas/linux/x64/sha1.yml}})
+               AssembleUpload_Jenkinsfile.assembleUpload({manifest=tests/data/opensearch-build-1.1.0.yml})
                   assembleUpload.legacySCM(groovy.lang.Closure)
                   assembleUpload.library({identifier=jenkins@20211123, retriever=null})
-                  assembleUpload.assembleManifest({manifest=tests/data/opensearch-build-1.1.0.yml, sha={sha=sha1, lock=tests/jenkins/data/opensearch-1.3.0.yml.lock, path=assemble-upload-build/1.1.0/shas/linux/x64/sha1.yml}})
+                  assembleUpload.assembleManifest({manifest=tests/data/opensearch-build-1.1.0.yml})
                      assembleManifest.legacySCM(groovy.lang.Closure)
                      assembleManifest.library({identifier=jenkins@20211123, retriever=null})
                      assembleManifest.readYaml({file=tests/data/opensearch-build-1.1.0.yml})
                      BuildManifest.asBoolean()
                      BuildManifest.getArtifactRootUrl(https://ci.opensearch.org/dbc, vars-build, 33)
                      assembleManifest.sh(./assemble.sh "tests/data/opensearch-build-1.1.0.yml" --base-url https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64)
-                  assembleUpload.uploadArtifacts({manifest=tests/data/opensearch-build-1.1.0.yml, sha={sha=sha1, lock=tests/jenkins/data/opensearch-1.3.0.yml.lock, path=assemble-upload-build/1.1.0/shas/linux/x64/sha1.yml}})
+                  assembleUpload.uploadArtifacts({manifest=tests/data/opensearch-build-1.1.0.yml})
                      uploadArtifacts.legacySCM(groovy.lang.Closure)
                      uploadArtifacts.library({identifier=jenkins@20211123, retriever=null})
                      uploadArtifacts.readYaml({file=tests/data/opensearch-build-1.1.0.yml})
@@ -30,11 +30,9 @@ https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/dist/opensearch/mani
                         uploadArtifacts.writeFile({file=messages/stage.msg, text=https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/builds/opensearch/manifest.yml
 https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/dist/opensearch/manifest.yml})
                         uploadArtifacts.stash({includes=messages/*, name=messages-stage})
-                  assembleUpload.withAWS({role=opensearch-bundle, roleAccount=account, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
-                     assembleUpload.s3Upload({bucket=artifact-bucket, file=tests/jenkins/data/opensearch-1.3.0.yml.lock, path=assemble-upload-build/1.1.0/shas/linux/x64/sha1.yml})
-                  assembleUpload.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock})
+                  assembleUpload.readYaml({file=tests/data/opensearch-build-1.1.0.yml})
                   InputManifest.asBoolean()
                   assembleUpload.readYaml({file=tests/data/opensearch-build-1.1.0.yml})
                   BuildManifest.asBoolean()
                   InputManifest.getPublicDistUrl(https://ci.opensearch.org/dbc, vars-build, 33, linux, x64)
-                  assembleUpload.echo(Setting env."ARTIFACT_URL_linux_x64"=https://ci.opensearch.org/dbc/vars-build/1.3.0/33/linux/x64/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz)
+                  assembleUpload.echo(Setting env."ARTIFACT_URL_linux_x64"=https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/dist/opensearch/opensearch-1.1.0-linux-x64.tar.gz)
diff --git a/tests/jenkins/jobs/BuildArchive_Jenkinsfile.txt b/tests/jenkins/jobs/BuildArchive_Jenkinsfile.txt
new file mode 100644
--- /dev/null
+++ b/tests/jenkins/jobs/BuildArchive_Jenkinsfile.txt
@@ -0,0 +1,16 @@
+   BuildArchive_Jenkinsfile.run()
+      BuildArchive_Jenkinsfile.pipeline(groovy.lang.Closure)
+         BuildArchive_Jenkinsfile.echo(Executing on agent [label:none])
+         BuildArchive_Jenkinsfile.stage(build and archive, groovy.lang.Closure)
+            BuildArchive_Jenkinsfile.script(groovy.lang.Closure)
+               BuildArchive_Jenkinsfile.buildArchive({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64})
+                  buildArchive.legacySCM(groovy.lang.Closure)
+                  buildArchive.library({identifier=jenkins@20211123, retriever=null})
+                  buildArchive.buildManifest({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64})
+                     buildManifest.sh(./build.sh tests/jenkins/data/opensearch-1.3.0.yml -p linux -a x64)
+                  buildArchive.echo(Archiving into zip: builds/**, tests/jenkins/data/opensearch-1.3.0.yml)
+                  buildArchive.zip({zipFile=archived-builds.zip, archive=true, glob=builds/**})
+                  Messages.asBoolean()
+                  Messages.add(stage, Built stage.)
+                     buildArchive.writeFile({file=messages/stage.msg, text=Built stage.})
+                     buildArchive.stash({includes=messages/*, name=messages-stage})
diff --git a/tests/jenkins/jobs/BuildArchive_Jenkinsfile_incremental.txt b/tests/jenkins/jobs/BuildArchive_Jenkinsfile_incremental.txt
deleted file mode 100644
--- a/tests/jenkins/jobs/BuildArchive_Jenkinsfile_incremental.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-   BuildArchive_Jenkinsfile.run()
-      BuildArchive_Jenkinsfile.pipeline(groovy.lang.Closure)
-         BuildArchive_Jenkinsfile.echo(Executing on agent [label:none])
-         BuildArchive_Jenkinsfile.stage(build and archive, groovy.lang.Closure)
-            BuildArchive_Jenkinsfile.script(groovy.lang.Closure)
-               BuildArchive_Jenkinsfile.buildArchive({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64})
-                  buildArchive.legacySCM(groovy.lang.Closure)
-                  buildArchive.library({identifier=jenkins@20211123, retriever=null})
-                  buildArchive.getManifestSHA({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64})
-                     getManifestSHA.buildManifest({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, lock=true})
-                        buildManifest.sh(./build.sh tests/jenkins/data/opensearch-1.3.0.yml -p linux -a x64 --lock)
-                     getManifestSHA.sha1(tests/jenkins/data/opensearch-1.3.0.yml.lock)
-                     getManifestSHA.echo(Manifest SHA: sha1)
-                     getManifestSHA.legacySCM(groovy.lang.Closure)
-                     getManifestSHA.library({identifier=jenkins@20211123, retriever=null})
-                     getManifestSHA.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock})
-                     InputManifest.asBoolean()
-                     InputManifest.getSHAsRoot(build-archive, linux, x64)
-                     getManifestSHA.echo(Manifest lock: tests/jenkins/data/opensearch-1.3.0.yml.lock)
-                     getManifestSHA.echo(Manifest SHA path: build-archive/1.3.0/shas/linux/x64/sha1.yml)
-                     getManifestSHA.withAWS({role=opensearch-bundle, roleAccount=account, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
-                        getManifestSHA.s3DoesObjectExist({bucket=artifact-bucket, path=build-archive/1.3.0/shas/linux/x64/sha1.yml})
-                     getManifestSHA.echo(Manifest SHA exists: true)
-                  Messages.asBoolean()
-                  Messages.add(stage, Skipped stage, build-archive/1.3.0/shas/linux/x64/sha1.yml exists.)
-                     buildArchive.writeFile({file=messages/stage.msg, text=Skipped stage, build-archive/1.3.0/shas/linux/x64/sha1.yml exists.})
-                     buildArchive.stash({includes=messages/*, name=messages-stage})
-                  buildArchive.echo(Skipping, build-archive/1.3.0/shas/linux/x64/sha1.yml already exists.)
diff --git a/tests/jenkins/jobs/BuildArchive_Jenkinsfile_not_incremental.txt b/tests/jenkins/jobs/BuildArchive_Jenkinsfile_not_incremental.txt
deleted file mode 100644
--- a/tests/jenkins/jobs/BuildArchive_Jenkinsfile_not_incremental.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-   BuildArchive_Jenkinsfile.run()
-      BuildArchive_Jenkinsfile.pipeline(groovy.lang.Closure)
-         BuildArchive_Jenkinsfile.echo(Executing on agent [label:none])
-         BuildArchive_Jenkinsfile.stage(build and archive, groovy.lang.Closure)
-            BuildArchive_Jenkinsfile.script(groovy.lang.Closure)
-               BuildArchive_Jenkinsfile.buildArchive({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64})
-                  buildArchive.legacySCM(groovy.lang.Closure)
-                  buildArchive.library({identifier=jenkins@20211123, retriever=null})
-                  buildArchive.getManifestSHA({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64})
-                     getManifestSHA.buildManifest({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, lock=true})
-                        buildManifest.sh(./build.sh tests/jenkins/data/opensearch-1.3.0.yml -p linux -a x64 --lock)
-                     getManifestSHA.sha1(tests/jenkins/data/opensearch-1.3.0.yml.lock)
-                     getManifestSHA.echo(Manifest SHA: sha1)
-                     getManifestSHA.legacySCM(groovy.lang.Closure)
-                     getManifestSHA.library({identifier=jenkins@20211123, retriever=null})
-                     getManifestSHA.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock})
-                     InputManifest.asBoolean()
-                     InputManifest.getSHAsRoot(build-archive, linux, x64)
-                     getManifestSHA.echo(Manifest lock: tests/jenkins/data/opensearch-1.3.0.yml.lock)
-                     getManifestSHA.echo(Manifest SHA path: build-archive/1.3.0/shas/linux/x64/sha1.yml)
-                     getManifestSHA.withAWS({role=opensearch-bundle, roleAccount=account, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
-                        getManifestSHA.s3DoesObjectExist({bucket=artifact-bucket, path=build-archive/1.3.0/shas/linux/x64/sha1.yml})
-                     getManifestSHA.echo(Manifest SHA exists: false)
-                  buildArchive.buildManifest({manifest=tests/jenkins/data/opensearch-1.3.0.yml.lock, platform=linux, architecture=x64})
-                     buildManifest.sh(./build.sh tests/jenkins/data/opensearch-1.3.0.yml.lock -p linux -a x64)
-                  buildArchive.echo(Archiving into sha1 zip: builds/**, tests/jenkins/data/opensearch-1.3.0.yml.lock)
-                  buildArchive.zip({zipFile=sha1-builds.zip, archive=true, glob=builds/**})
-                  buildArchive.zip({zipFile=sha1-manifest.zip, archive=true, glob=tests/jenkins/data/opensearch-1.3.0.yml.lock})
-                  Messages.asBoolean()
-                  Messages.add(stage, Built stage, sha1.)
-                     buildArchive.writeFile({file=messages/stage.msg, text=Built stage, sha1.})
-                     buildArchive.stash({includes=messages/*, name=messages-stage})
-                  buildArchive.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock})
-                  InputManifest.asBoolean()
-                  buildArchive.echo(Setting env.BUILD_SHA_darwin_x64_SHA=sha1)
-                  buildArchive.echo(Setting env.BUILD_SHA_darwin_x64_LOCK=tests/jenkins/data/opensearch-1.3.0.yml.lock)
-                  buildArchive.echo(Setting env.BUILD_SHA_darwin_x64_PATH=build-archive/1.3.0/shas/linux/x64/sha1.yml)
diff --git a/tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile_not_incremental.txt b/tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile.txt
similarity index 57%
rename from tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile_not_incremental.txt
rename to tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile.txt
--- a/tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile_not_incremental.txt
+++ b/tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile.txt
@@ -6,36 +6,21 @@
                BuildAssembleUpload_Jenkinsfile.buildAssembleUpload({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64})
                   buildAssembleUpload.legacySCM(groovy.lang.Closure)
                   buildAssembleUpload.library({identifier=jenkins@20211123, retriever=null})
-                  buildAssembleUpload.getManifestSHA({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64})
-                     getManifestSHA.buildManifest({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, lock=true})
-                        buildManifest.sh(./build.sh tests/jenkins/data/opensearch-1.3.0.yml -p linux -a x64 --lock)
-                     getManifestSHA.sha1(tests/jenkins/data/opensearch-1.3.0.yml.lock)
-                     getManifestSHA.echo(Manifest SHA: sha1)
-                     getManifestSHA.legacySCM(groovy.lang.Closure)
-                     getManifestSHA.library({identifier=jenkins@20211123, retriever=null})
-                     getManifestSHA.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock})
-                     InputManifest.asBoolean()
-                     InputManifest.getSHAsRoot(vars-build, linux, x64)
-                     getManifestSHA.echo(Manifest lock: tests/jenkins/data/opensearch-1.3.0.yml.lock)
-                     getManifestSHA.echo(Manifest SHA path: vars-build/1.3.0/shas/linux/x64/sha1.yml)
-                     getManifestSHA.withAWS({role=opensearch-bundle, roleAccount=account, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
-                        getManifestSHA.s3DoesObjectExist({bucket=artifact-bucket, path=vars-build/1.3.0/shas/linux/x64/sha1.yml})
-                     getManifestSHA.echo(Manifest SHA exists: false)
-                  buildAssembleUpload.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock})
+                  buildAssembleUpload.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml})
                   InputManifest.asBoolean()
-                  buildAssembleUpload.buildManifest({manifest=tests/jenkins/data/opensearch-1.3.0.yml.lock, platform=linux, architecture=x64})
-                     buildManifest.sh(./build.sh tests/jenkins/data/opensearch-1.3.0.yml.lock -p linux -a x64)
-                  buildAssembleUpload.assembleUpload({manifest=builds/opensearch/manifest.yml, platform=linux, architecture=x64, sha={sha=sha1, lock=tests/jenkins/data/opensearch-1.3.0.yml.lock, path=vars-build/1.3.0/shas/linux/x64/sha1.yml, exists=false}})
+                  buildAssembleUpload.buildManifest({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64})
+                     buildManifest.sh(./build.sh tests/jenkins/data/opensearch-1.3.0.yml -p linux -a x64)
+                  buildAssembleUpload.assembleUpload({manifest=builds/opensearch/manifest.yml, platform=linux, architecture=x64})
                      assembleUpload.legacySCM(groovy.lang.Closure)
                      assembleUpload.library({identifier=jenkins@20211123, retriever=null})
-                     assembleUpload.assembleManifest({manifest=builds/opensearch/manifest.yml, platform=linux, architecture=x64, sha={sha=sha1, lock=tests/jenkins/data/opensearch-1.3.0.yml.lock, path=vars-build/1.3.0/shas/linux/x64/sha1.yml, exists=false}})
+                     assembleUpload.assembleManifest({manifest=builds/opensearch/manifest.yml, platform=linux, architecture=x64})
                         assembleManifest.legacySCM(groovy.lang.Closure)
                         assembleManifest.library({identifier=jenkins@20211123, retriever=null})
                         assembleManifest.readYaml({file=builds/opensearch/manifest.yml})
                         BuildManifest.asBoolean()
                         BuildManifest.getArtifactRootUrl(https://ci.opensearch.org/dbc, vars-build, 33)
                         assembleManifest.sh(./assemble.sh "builds/opensearch/manifest.yml" --base-url https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64)
-                     assembleUpload.uploadArtifacts({manifest=builds/opensearch/manifest.yml, platform=linux, architecture=x64, sha={sha=sha1, lock=tests/jenkins/data/opensearch-1.3.0.yml.lock, path=vars-build/1.3.0/shas/linux/x64/sha1.yml, exists=false}})
+                     assembleUpload.uploadArtifacts({manifest=builds/opensearch/manifest.yml, platform=linux, architecture=x64})
                         uploadArtifacts.legacySCM(groovy.lang.Closure)
                         uploadArtifacts.library({identifier=jenkins@20211123, retriever=null})
                         uploadArtifacts.readYaml({file=builds/opensearch/manifest.yml})
@@ -52,11 +37,9 @@ https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/dist/opensearch/mani
                            uploadArtifacts.writeFile({file=messages/stage.msg, text=https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/builds/opensearch/manifest.yml
 https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/dist/opensearch/manifest.yml})
                            uploadArtifacts.stash({includes=messages/*, name=messages-stage})
-                     assembleUpload.withAWS({role=opensearch-bundle, roleAccount=account, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
-                        assembleUpload.s3Upload({bucket=artifact-bucket, file=tests/jenkins/data/opensearch-1.3.0.yml.lock, path=vars-build/1.3.0/shas/linux/x64/sha1.yml})
-                     assembleUpload.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock})
+                     assembleUpload.readYaml({file=builds/opensearch/manifest.yml})
                      InputManifest.asBoolean()
                      assembleUpload.readYaml({file=builds/opensearch/manifest.yml})
                      BuildManifest.asBoolean()
                      InputManifest.getPublicDistUrl(https://ci.opensearch.org/dbc, vars-build, 33, linux, x64)
-                     assembleUpload.echo(Setting env."ARTIFACT_URL_linux_x64"=https://ci.opensearch.org/dbc/vars-build/1.3.0/33/linux/x64/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz)
+                     assembleUpload.echo(Setting env."ARTIFACT_URL_linux_x64"=https://ci.opensearch.org/dbc/vars-build/1.1.0/33/linux/x64/dist/opensearch/opensearch-1.1.0-linux-x64.tar.gz)
diff --git a/tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile_incremental.txt b/tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile_incremental.txt
deleted file mode 100644
--- a/tests/jenkins/jobs/BuildAssembleUpload_Jenkinsfile_incremental.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-   BuildAssembleUpload_Jenkinsfile.run()
-      BuildAssembleUpload_Jenkinsfile.pipeline(groovy.lang.Closure)
-         BuildAssembleUpload_Jenkinsfile.echo(Executing on agent [label:none])
-         BuildAssembleUpload_Jenkinsfile.stage(build and assemble, groovy.lang.Closure)
-            BuildAssembleUpload_Jenkinsfile.script(groovy.lang.Closure)
-               BuildAssembleUpload_Jenkinsfile.buildAssembleUpload({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64})
-                  buildAssembleUpload.legacySCM(groovy.lang.Closure)
-                  buildAssembleUpload.library({identifier=jenkins@20211123, retriever=null})
-                  buildAssembleUpload.getManifestSHA({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64})
-                     getManifestSHA.buildManifest({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, lock=true})
-                        buildManifest.sh(./build.sh tests/jenkins/data/opensearch-1.3.0.yml -p linux -a x64 --lock)
-                     getManifestSHA.sha1(tests/jenkins/data/opensearch-1.3.0.yml.lock)
-                     getManifestSHA.echo(Manifest SHA: sha1)
-                     getManifestSHA.legacySCM(groovy.lang.Closure)
-                     getManifestSHA.library({identifier=jenkins@20211123, retriever=null})
-                     getManifestSHA.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock})
-                     InputManifest.asBoolean()
-                     InputManifest.getSHAsRoot(vars-build, linux, x64)
-                     getManifestSHA.echo(Manifest lock: tests/jenkins/data/opensearch-1.3.0.yml.lock)
-                     getManifestSHA.echo(Manifest SHA path: vars-build/1.3.0/shas/linux/x64/sha1.yml)
-                     getManifestSHA.withAWS({role=opensearch-bundle, roleAccount=account, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
-                        getManifestSHA.s3DoesObjectExist({bucket=artifact-bucket, path=vars-build/1.3.0/shas/linux/x64/sha1.yml})
-                     getManifestSHA.echo(Manifest SHA exists: true)
-                  Messages.asBoolean()
-                  Messages.add(stage, Skipped stage, vars-build/1.3.0/shas/linux/x64/sha1.yml exists.)
-                     buildAssembleUpload.writeFile({file=messages/stage.msg, text=Skipped stage, vars-build/1.3.0/shas/linux/x64/sha1.yml exists.})
-                     buildAssembleUpload.stash({includes=messages/*, name=messages-stage})
-                  buildAssembleUpload.echo(Skipping, vars-build/1.3.0/shas/linux/x64/sha1.yml already exists.)
diff --git a/tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile b/tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile
new file mode 100644
--- /dev/null
+++ b/tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile
@@ -0,0 +1,16 @@
+pipeline {
+    agent none
+    stages {
+        stage('upload manifest SHA') {
+            steps {
+                script {
+                    buildUploadManifestSHA(
+                        manifest: 'tests/jenkins/data/opensearch-1.3.0.yml',
+                        platform: 'linux',
+                        architecture: 'x64'
+                    )
+                }
+            }
+        }
+    }
+}
diff --git a/tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile.txt b/tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile.txt
new file mode 100644
--- /dev/null
+++ b/tests/jenkins/jobs/BuildUploadManifestSHA_Jenkinsfile.txt
@@ -0,0 +1,25 @@
+   BuildUploadManifestSHA_Jenkinsfile.run()
+      BuildUploadManifestSHA_Jenkinsfile.pipeline(groovy.lang.Closure)
+         BuildUploadManifestSHA_Jenkinsfile.echo(Executing on agent [label:none])
+         BuildUploadManifestSHA_Jenkinsfile.stage(upload manifest SHA, groovy.lang.Closure)
+            BuildUploadManifestSHA_Jenkinsfile.script(groovy.lang.Closure)
+               BuildUploadManifestSHA_Jenkinsfile.buildUploadManifestSHA({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64})
+                  buildUploadManifestSHA.legacySCM(groovy.lang.Closure)
+                  buildUploadManifestSHA.library({identifier=jenkins@20211123, retriever=null})
+                  buildUploadManifestSHA.getManifestSHA({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64})
+                     getManifestSHA.buildManifest({manifest=tests/jenkins/data/opensearch-1.3.0.yml, platform=linux, architecture=x64, lock=true})
+                        buildManifest.sh(./build.sh tests/jenkins/data/opensearch-1.3.0.yml -p linux -a x64 --lock)
+                     getManifestSHA.sha1(tests/jenkins/data/opensearch-1.3.0.yml.lock)
+                     getManifestSHA.echo(Manifest SHA: sha1)
+                     getManifestSHA.legacySCM(groovy.lang.Closure)
+                     getManifestSHA.library({identifier=jenkins@20211123, retriever=null})
+                     getManifestSHA.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock})
+                     InputManifest.asBoolean()
+                     InputManifest.getSHAsRoot(get-manifest-sha-build)
+                     getManifestSHA.echo(Manifest lock: tests/jenkins/data/opensearch-1.3.0.yml.lock)
+                     getManifestSHA.echo(Manifest SHA path: get-manifest-sha-build/1.3.0/shas/sha1.yml)
+                     getManifestSHA.withAWS({role=opensearch-bundle, roleAccount=account, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
+                        getManifestSHA.s3DoesObjectExist({bucket=artifact-bucket, path=get-manifest-sha-build/1.3.0/shas/sha1.yml})
+                     getManifestSHA.echo(Manifest SHA exists: false)
+                  buildUploadManifestSHA.withAWS({role=opensearch-bundle, roleAccount=account, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
+                     buildUploadManifestSHA.s3Upload({bucket=artifact-bucket, file=tests/jenkins/data/opensearch-1.3.0.yml.lock, path=get-manifest-sha-build/1.3.0/shas/sha1.yml})
diff --git a/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_does_not_exist.txt b/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_does_not_exist.txt
--- a/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_does_not_exist.txt
+++ b/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_does_not_exist.txt
@@ -12,13 +12,13 @@
                   getManifestSHA.library({identifier=jenkins@20211123, retriever=null})
                   getManifestSHA.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock})
                   InputManifest.asBoolean()
-                  InputManifest.getSHAsRoot(get-manifest-sha-build, linux, x64)
+                  InputManifest.getSHAsRoot(get-manifest-sha-build)
                   getManifestSHA.echo(Manifest lock: tests/jenkins/data/opensearch-1.3.0.yml.lock)
-                  getManifestSHA.echo(Manifest SHA path: get-manifest-sha-build/1.3.0/shas/linux/x64/sha1.yml)
+                  getManifestSHA.echo(Manifest SHA path: get-manifest-sha-build/1.3.0/shas/sha1.yml)
                   getManifestSHA.withAWS({role=opensearch-bundle, roleAccount=account, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
-                     getManifestSHA.s3DoesObjectExist({bucket=artifact-bucket, path=get-manifest-sha-build/1.3.0/shas/linux/x64/sha1.yml})
+                     getManifestSHA.s3DoesObjectExist({bucket=artifact-bucket, path=get-manifest-sha-build/1.3.0/shas/sha1.yml})
                   getManifestSHA.echo(Manifest SHA exists: false)
                GetManifestSHA_Jenkinsfile.echo(sha: sha1)
                GetManifestSHA_Jenkinsfile.echo(exists: false)
                GetManifestSHA_Jenkinsfile.echo(lock: tests/jenkins/data/opensearch-1.3.0.yml.lock)
-               GetManifestSHA_Jenkinsfile.echo(path: get-manifest-sha-build/1.3.0/shas/linux/x64/sha1.yml)
+               GetManifestSHA_Jenkinsfile.echo(path: get-manifest-sha-build/1.3.0/shas/sha1.yml)
diff --git a/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_exists.txt b/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_exists.txt
--- a/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_exists.txt
+++ b/tests/jenkins/jobs/GetManifestSHA_Jenkinsfile_exists.txt
@@ -12,13 +12,13 @@
                   getManifestSHA.library({identifier=jenkins@20211123, retriever=null})
                   getManifestSHA.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml.lock})
                   InputManifest.asBoolean()
-                  InputManifest.getSHAsRoot(get-manifest-sha-build, linux, x64)
+                  InputManifest.getSHAsRoot(get-manifest-sha-build)
                   getManifestSHA.echo(Manifest lock: tests/jenkins/data/opensearch-1.3.0.yml.lock)
-                  getManifestSHA.echo(Manifest SHA path: get-manifest-sha-build/1.3.0/shas/linux/x64/sha1.yml)
+                  getManifestSHA.echo(Manifest SHA path: get-manifest-sha-build/1.3.0/shas/sha1.yml)
                   getManifestSHA.withAWS({role=opensearch-bundle, roleAccount=account, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
-                     getManifestSHA.s3DoesObjectExist({bucket=artifact-bucket, path=get-manifest-sha-build/1.3.0/shas/linux/x64/sha1.yml})
+                     getManifestSHA.s3DoesObjectExist({bucket=artifact-bucket, path=get-manifest-sha-build/1.3.0/shas/sha1.yml})
                   getManifestSHA.echo(Manifest SHA exists: true)
                GetManifestSHA_Jenkinsfile.echo(sha: sha1)
                GetManifestSHA_Jenkinsfile.echo(exists: true)
                GetManifestSHA_Jenkinsfile.echo(lock: tests/jenkins/data/opensearch-1.3.0.yml.lock)
-               GetManifestSHA_Jenkinsfile.echo(path: get-manifest-sha-build/1.3.0/shas/linux/x64/sha1.yml)
+               GetManifestSHA_Jenkinsfile.echo(path: get-manifest-sha-build/1.3.0/shas/sha1.yml)
diff --git a/tests/jenkins/jobs/InputManifest_Jenkinsfile b/tests/jenkins/jobs/InputManifest_Jenkinsfile
--- a/tests/jenkins/jobs/InputManifest_Jenkinsfile
+++ b/tests/jenkins/jobs/InputManifest_Jenkinsfile
@@ -21,7 +21,7 @@ pipeline {
                     echo inputManifest.build.getFilename()
                     echo inputManifest.build.getFilenameWithExtension('windows', 'x86')
                     echo inputManifest.getPublicDistUrl('https://ci.opensearch.org/ci/dbc', 'bundle-build', '1', 'linux', 'x86')
-                    echo inputManifest.getSHAsRoot('bundle-build', 'linux', 'x86')
+                    echo inputManifest.getSHAsRoot('bundle-build')
                 }
             }
         }
@@ -36,7 +36,7 @@ pipeline {
                     echo inputManifest.build.getFilename()
                     echo inputManifest.build.getFilenameWithExtension('windows', 'x86')
                     echo inputManifest.getPublicDistUrl('https://ci.opensearch.org/ci/dbc', 'bundle-build', '1', 'linux', 'x86')
-                    echo inputManifest.getSHAsRoot('bundle-build', 'linux', 'x86')
+                    echo inputManifest.getSHAsRoot('bundle-build')
                 }
             }
         }
diff --git a/tests/jenkins/jobs/InputManifest_Jenkinsfile.txt b/tests/jenkins/jobs/InputManifest_Jenkinsfile.txt
--- a/tests/jenkins/jobs/InputManifest_Jenkinsfile.txt
+++ b/tests/jenkins/jobs/InputManifest_Jenkinsfile.txt
@@ -13,8 +13,8 @@
                InputManifest_Jenkinsfile.echo(opensearch-1.1.0-windows-x86.zip)
                InputManifest.getPublicDistUrl(https://ci.opensearch.org/ci/dbc, bundle-build, 1, linux, x86)
                InputManifest_Jenkinsfile.echo(https://ci.opensearch.org/ci/dbc/bundle-build/1.1.0/1/linux/x86/dist/opensearch/opensearch-1.1.0-linux-x86.tar.gz)
-               InputManifest.getSHAsRoot(bundle-build, linux, x86)
-               InputManifest_Jenkinsfile.echo(bundle-build/1.1.0/shas/linux/x86)
+               InputManifest.getSHAsRoot(bundle-build)
+               InputManifest_Jenkinsfile.echo(bundle-build/1.1.0/shas)
          InputManifest_Jenkinsfile.stage(input manifest 1.2.0, groovy.lang.Closure)
             InputManifest_Jenkinsfile.script(groovy.lang.Closure)
                InputManifest_Jenkinsfile.readYaml({file=manifests/1.2.0/opensearch-1.2.0.yml})
@@ -27,5 +27,5 @@
                InputManifest_Jenkinsfile.echo(opensearch-1.2.0-windows-x86.zip)
                InputManifest.getPublicDistUrl(https://ci.opensearch.org/ci/dbc, bundle-build, 1, linux, x86)
                InputManifest_Jenkinsfile.echo(https://ci.opensearch.org/ci/dbc/bundle-build/1.2.0/1/linux/x86/dist/opensearch/opensearch-1.2.0-linux-x86.tar.gz)
-               InputManifest.getSHAsRoot(bundle-build, linux, x86)
-               InputManifest_Jenkinsfile.echo(bundle-build/1.2.0/shas/linux/x86)
+               InputManifest.getSHAsRoot(bundle-build)
+               InputManifest_Jenkinsfile.echo(bundle-build/1.2.0/shas)
diff --git a/tests/test_run_build.py b/tests/test_run_build.py
--- a/tests/test_run_build.py
+++ b/tests/test_run_build.py
@@ -13,7 +13,6 @@
 
 from manifests.input_manifest import InputManifest
 from run_build import main
-from system.os import current_architecture, current_platform
 
 
 class TestRunBuild(unittest.TestCase):
@@ -119,7 +118,7 @@ def test_main_with_invalid_architecture(self, *mocks):
     def test_main_manifest_lock_without_changes(self, mock_logging, mock_to_file, mock_stable, *mocks):
         with self.assertRaises(SystemExit):
             main()
-        mock_stable.assert_called_with(architecture=current_architecture(), platform=current_platform(), snapshot=False)
+        mock_stable.assert_called_with()
         mock_to_file.assert_not_called()
         mock_logging.assert_called_with(f"No changes since {self.OPENSEARCH_MANIFEST}.lock")
 
@@ -132,7 +131,7 @@ def test_main_manifest_lock_without_changes(self, mock_logging, mock_to_file, mo
     def test_main_manifest_lock_with_changes(self, mock_logging, mock_to_file, mock_stable, *mocks):
         with self.assertRaises(SystemExit):
             main()
-        mock_stable.assert_called_with(architecture=current_architecture(), platform=current_platform(), snapshot=False)
+        mock_stable.assert_called_with()
         mock_to_file.assert_called_with(self.OPENSEARCH_MANIFEST + ".lock")
         mock_logging.assert_called_with(f"Updating {self.OPENSEARCH_MANIFEST}.lock")
 
@@ -145,7 +144,7 @@ def test_main_manifest_lock_with_changes(self, mock_logging, mock_to_file, mock_
     def test_main_manifest_new_lock(self, mock_logging, mock_to_file, mock_stable, *mocks):
         with self.assertRaises(SystemExit):
             main()
-        mock_stable.assert_called_with(architecture=current_architecture(), platform=current_platform(), snapshot=False)
+        mock_stable.assert_called_with()
         mock_to_file.assert_called_with(self.OPENSEARCH_MANIFEST + ".lock")
         mock_logging.assert_called_with(f"Creating {self.OPENSEARCH_MANIFEST}.lock")
 
@@ -158,6 +157,6 @@ def test_main_manifest_new_lock(self, mock_logging, mock_to_file, mock_stable, *
     def test_main_manifest_new_lock_with_overrides(self, mock_logging, mock_to_file, mock_stable, *mocks):
         with self.assertRaises(SystemExit):
             main()
-        mock_stable.assert_called_with(architecture="arm64", platform="windows", snapshot=True)
+        mock_stable.assert_called_with()
         mock_to_file.assert_called_with(self.OPENSEARCH_MANIFEST + ".lock")
         mock_logging.assert_called_with(f"Creating {self.OPENSEARCH_MANIFEST}.lock")
diff --git a/tests/tests_manifests/test_input_manifest.py b/tests/tests_manifests/test_input_manifest.py
--- a/tests/tests_manifests/test_input_manifest.py
+++ b/tests/tests_manifests/test_input_manifest.py
@@ -174,15 +174,13 @@ def test_stable(self, mock_output: Mock) -> None:
         self.assertEqual(opensearch.ref, "updated")
 
     @patch("subprocess.check_output")
-    def test_stable_override_build(self, mock_output: Mock) -> None:
+    @patch("git.git_repository.GitRepository.stable_ref", return_value=('abcd', '1234'))
+    def test_stable_override_build(self, git_repo: Mock, mock_output: Mock) -> None:
         mock_output.return_value.decode.return_value = "updated\tHEAD"
         path = os.path.join(self.manifests_path, "1.1.0", "opensearch-1.1.0.yml")
-        manifest = InputManifest.from_path(path).stable(platform="windows", architecture="arm64", snapshot=True)
-        self.assertEqual(manifest.build.name, "OpenSearch")
-        self.assertEqual(manifest.build.filename, "opensearch")
-        self.assertEqual(manifest.build.platform, "windows")
-        self.assertEqual(manifest.build.architecture, "arm64")
-        self.assertTrue(manifest.build.snapshot)
+        manifest = InputManifest.from_path(path).stable()
+        opensearch: InputComponentFromSource = manifest.components["OpenSearch"]  # type: ignore[assignment]
+        self.assertEqual(opensearch.ref, "abcd")
 
     def test_eq(self) -> None:
         path = os.path.join(self.manifests_path, "1.0.0", "opensearch-1.0.0.yml")