Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove hardcode git clone for the jenkins #2038

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion jenkins/vulnerability-scan/whitesource-scan.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ pipeline {
}

void scan() {
git url: 'https://github.com/opensearch-project/opensearch-build.git', branch: 'main'
sh """
curl -SLO https://services.gradle.org/distributions/gradle-6.6.1-bin.zip
unzip gradle-6.6.1-bin.zip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
BuildDockerImage_Jenkinsfile.stage(build docker image, groovy.lang.Closure)
BuildDockerImage_Jenkinsfile.script(groovy.lang.Closure)
BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, artifactUrlX64=opensearch.linux.x64, artifactUrlArm64=opensearch.linux.arm64})
buildDockerImage.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main})
buildDockerImage.legacySCM(groovy.lang.Closure)
buildDockerImage.library({identifier=jenkins@20211123, retriever=null})
buildDockerImage.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
BuildDockerImage_Jenkinsfile.stage(build docker image, groovy.lang.Closure)
BuildDockerImage_Jenkinsfile.script(groovy.lang.Closure)
BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, artifactUrlX64=opensearch.linux.x64, artifactUrlArm64=null})
buildDockerImage.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main})
buildDockerImage.legacySCM(groovy.lang.Closure)
buildDockerImage.library({identifier=jenkins@20211123, retriever=null})
buildDockerImage.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
BuildDockerImage_Jenkinsfile.stage(build docker image, groovy.lang.Closure)
BuildDockerImage_Jenkinsfile.script(groovy.lang.Closure)
BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, artifactUrlX64=null, artifactUrlArm64=null})
buildDockerImage.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main})
buildDockerImage.legacySCM(groovy.lang.Closure)
buildDockerImage.library({identifier=jenkins@20211123, retriever=null})
buildDockerImage.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
BuildDockerImage_Jenkinsfile.stage(build docker image, groovy.lang.Closure)
BuildDockerImage_Jenkinsfile.script(groovy.lang.Closure)
BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, artifactUrlX64=null, artifactUrlArm64=opensearch.linux.arm64})
buildDockerImage.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main})
buildDockerImage.legacySCM(groovy.lang.Closure)
buildDockerImage.library({identifier=jenkins@20211123, retriever=null})
buildDockerImage.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
BuildDockerImage_Qualifier_Jenkinsfile.stage(build docker image, groovy.lang.Closure)
BuildDockerImage_Qualifier_Jenkinsfile.script(groovy.lang.Closure)
BuildDockerImage_Qualifier_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-2.0.0.yml, artifactUrlX64=opensearch.linux.x64, artifactUrlArm64=opensearch.linux.arm64})
buildDockerImage.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main})
buildDockerImage.legacySCM(groovy.lang.Closure)
buildDockerImage.library({identifier=jenkins@20211123, retriever=null})
buildDockerImage.readYaml({file=tests/jenkins/data/opensearch-2.0.0.yml})
Expand Down
4 changes: 0 additions & 4 deletions tests/jenkins/jobs/DetectDockerImage_Jenkinsfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
DetectDockerImage_Jenkinsfile.stage(opensearch-1.1.0, groovy.lang.Closure)
DetectDockerImage_Jenkinsfile.script(groovy.lang.Closure)
DetectDockerImage_Jenkinsfile.detectDockerAgent({manifest=manifests/1.1.0/opensearch-1.1.0.yml})
detectDockerAgent.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main})
detectDockerAgent.legacySCM(groovy.lang.Closure)
detectDockerAgent.library({identifier=jenkins@20211123, retriever=null})
detectDockerAgent.readYaml({file=manifests/1.1.0/opensearch-1.1.0.yml})
Expand All @@ -15,7 +14,6 @@
DetectDockerImage_Jenkinsfile.stage(opensearch-1.2.0, groovy.lang.Closure)
DetectDockerImage_Jenkinsfile.script(groovy.lang.Closure)
DetectDockerImage_Jenkinsfile.detectDockerAgent({manifest=manifests/1.2.0/opensearch-1.2.0.yml})
detectDockerAgent.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main})
detectDockerAgent.legacySCM(groovy.lang.Closure)
detectDockerAgent.library({identifier=jenkins@20211123, retriever=null})
detectDockerAgent.readYaml({file=manifests/1.2.0/opensearch-1.2.0.yml})
Expand All @@ -26,7 +24,6 @@
DetectDockerImage_Jenkinsfile.stage(opensearch-dashboards-1.1.0, groovy.lang.Closure)
DetectDockerImage_Jenkinsfile.script(groovy.lang.Closure)
DetectDockerImage_Jenkinsfile.detectDockerAgent({manifest=manifests/1.1.0/opensearch-dashboards-1.1.0.yml})
detectDockerAgent.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main})
detectDockerAgent.legacySCM(groovy.lang.Closure)
detectDockerAgent.library({identifier=jenkins@20211123, retriever=null})
detectDockerAgent.readYaml({file=manifests/1.1.0/opensearch-dashboards-1.1.0.yml})
Expand All @@ -37,7 +34,6 @@
DetectDockerImage_Jenkinsfile.stage(opensearch-dashboards-1.2.0, groovy.lang.Closure)
DetectDockerImage_Jenkinsfile.script(groovy.lang.Closure)
DetectDockerImage_Jenkinsfile.detectDockerAgent({manifest=manifests/1.2.0/opensearch-dashboards-1.2.0.yml})
detectDockerAgent.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main})
detectDockerAgent.legacySCM(groovy.lang.Closure)
detectDockerAgent.library({identifier=jenkins@20211123, retriever=null})
detectDockerAgent.readYaml({file=manifests/1.2.0/opensearch-dashboards-1.2.0.yml})
Expand Down
2 changes: 0 additions & 2 deletions vars/buildDockerImage.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
void call(Map args = [:]) {
git url: 'https://github.com/opensearch-project/opensearch-build.git', branch: 'main'

def lib = library(identifier: 'jenkins@20211123', retriever: legacySCM(scm))
def inputManifest = lib.jenkins.InputManifest.new(readYaml(file: args.inputManifest))
def build_qualifier = inputManifest.build.qualifier
Expand Down
3 changes: 1 addition & 2 deletions vars/detectDockerAgent.groovy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Map call(Map args = [:]) {
git url: 'https://github.com/opensearch-project/opensearch-build.git', branch: 'main'
def lib = library(identifier: "jenkins@20211123", retriever: legacySCM(scm))
String manifest = args.manifest ?: "manifests/${INPUT_MANIFEST}"
def inputManifest = lib.jenkins.InputManifest.new(readYaml(file: manifest))
Expand All @@ -10,4 +9,4 @@ Map call(Map args = [:]) {
image: dockerImage,
args: dockerArgs
]
}
}