Skip to content

Commit

Permalink
Update OS core systemd related test commands and switch to Ubuntu2404…
Browse files Browse the repository at this point in the history
… Agents (#5367)

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
  • Loading branch information
peterzhuamazon authored Mar 7, 2025
1 parent 04727bd commit 6060ef8
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion jenkins/docker/docker-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def docker_args = [
]

def agent_nodes = [
"linux": "Jenkins-Agent-Ubuntu2004-X64-M52xlarge-Docker-Builder",
"linux": "Jenkins-Agent-Ubuntu2404-X64-M52xlarge-Docker-Builder",
"windows": "Jenkins-Agent-Windows2019-X64-M54xlarge-Docker-Builder",
]

Expand Down
2 changes: 1 addition & 1 deletion jenkins/docker/docker-copy.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pipeline {
stage("Image Copy") {
agent {
docker {
label 'Jenkins-Agent-Ubuntu2004-X64-M52xlarge-Docker-Builder'
label 'Jenkins-Agent-Ubuntu2404-X64-M52xlarge-Docker-Builder'
image 'opensearchstaging/ci-runner:ubuntu2404-x64-docker-buildx0.9.1-qemu8.2-v1'
args '-u root -v /var/run/docker.sock:/var/run/docker.sock'
registryUrl 'https://public.ecr.aws/'
Expand Down
2 changes: 1 addition & 1 deletion jenkins/docker/docker-re-release.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pipeline {
stage("Docker re-release") {
agent {
docker {
label 'Jenkins-Agent-Ubuntu2004-X64-M52xlarge-Docker-Builder'
label 'Jenkins-Agent-Ubuntu2404-X64-M52xlarge-Docker-Builder'
image 'opensearchstaging/ci-runner:ubuntu2404-x64-docker-buildx0.9.1-qemu8.2-v1'
args '-u root -v /var/run/docker.sock:/var/run/docker.sock'
registryUrl 'https://public.ecr.aws/'
Expand Down
4 changes: 2 additions & 2 deletions jenkins/docker/docker-scan.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* compatible open source license.
*/

lib = library(identifier: 'jenkins@1.0.4', retriever: modernSCM([
lib = library(identifier: 'jenkins@8.2.2', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))
Expand Down Expand Up @@ -67,7 +67,7 @@ pipeline {
archiveArtifacts artifacts: 'scan_docker_image.*'
script {
postCleanup()
sh("trivy image --clear-cache")
sh("trivy clean --all")
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions jenkins/gradle/gradle-check.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pipeline {
choice(
name: 'AGENT_LABEL',
description: 'Choose which jenkins agent to run gradle check on',
choices: ['Jenkins-Agent-Ubuntu2004-X64-M58xlarge-Single-Host', 'Jenkins-Agent-Windows2019-X64-C524xlarge-Single-Host'],
choices: ['Jenkins-Agent-Ubuntu2004-X64-M58xlarge-Single-Host', 'Jenkins-Agent-Ubuntu2404-X64-M58xlarge-Single-Host', 'Jenkins-Agent-Windows2019-X64-C524xlarge-Single-Host'],
)
}
triggers {
Expand All @@ -70,9 +70,9 @@ pipeline {
printPostContent: false
)
parameterizedCron '''
H 3 * * * %GIT_REFERENCE=main;AGENT_LABEL=Jenkins-Agent-Ubuntu2004-X64-M58xlarge-Single-Host
H 6 * * * %GIT_REFERENCE=1.x;AGENT_LABEL=Jenkins-Agent-Ubuntu2004-X64-M58xlarge-Single-Host
H 9 * * * %GIT_REFERENCE=2.x;AGENT_LABEL=Jenkins-Agent-Ubuntu2004-X64-M58xlarge-Single-Host
H 3 * * * %GIT_REFERENCE=main;AGENT_LABEL=Jenkins-Agent-Ubuntu2404-X64-M58xlarge-Single-Host
H 6 * * * %GIT_REFERENCE=2.19;AGENT_LABEL=Jenkins-Agent-Ubuntu2404-X64-M58xlarge-Single-Host
H 9 * * * %GIT_REFERENCE=2.x;AGENT_LABEL=Jenkins-Agent-Ubuntu2404-X64-M58xlarge-Single-Host
'''
}
environment {
Expand Down
2 changes: 1 addition & 1 deletion jenkins/packer/packer-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pipeline {
}
agent {
docker {
label 'Jenkins-Agent-Ubuntu2004-X64-M52xlarge-Docker-Builder'
label 'Jenkins-Agent-Ubuntu2404-X64-M52xlarge-Docker-Builder'
image 'opensearchstaging/ci-runner:ubuntu2404-x64-docker-buildx0.9.1-qemu8.2-v1'
registryUrl 'https://public.ecr.aws/'
alwaysPull true
Expand Down
2 changes: 1 addition & 1 deletion manifests/3.0.0-alpha1/opensearch-3.0.0-alpha1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build:
ci:
image:
name: opensearchstaging/ci-runner:ci-runner-al2-opensearch-build-v1
args: -e JAVA_HOME=/opt/java/openjdk-23
args: -e JAVA_HOME=/opt/java/openjdk-21
components:
- name: OpenSearch
repository: https://github.com/opensearch-project/OpenSearch.git
Expand Down
2 changes: 1 addition & 1 deletion manifests/3.0.0-beta1/opensearch-3.0.0-beta1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build:
ci:
image:
name: opensearchstaging/ci-runner:ci-runner-al2-opensearch-build-v1
args: -e JAVA_HOME=/opt/java/openjdk-23
args: -e JAVA_HOME=/opt/java/openjdk-21
components:
- name: OpenSearch
repository: https://github.com/opensearch-project/OpenSearch.git
Expand Down
2 changes: 1 addition & 1 deletion scripts/components/OpenSearch/integtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ echo "Check if distribution is deb or rpm on linux"
if [ "$OSTYPE" = "linux-gnu" ]; then
if (dpkg -s opensearch > /dev/null 2>&1) || (rpm -q opensearch > /dev/null 2>&1); then
echo "Run systemd integTest for OpenSearch core engine"
./gradlew :qa:systemd-test:test --tests org.opensearch.systemdinteg.SystemdIntegTests --console=plain
./gradlew qa:systemd-test:integTest --tests org.opensearch.systemdinteg.SystemdIntegTests --console=plain
else
echo "No deb or rpm installed detected, skip test"
fi
Expand Down
2 changes: 1 addition & 1 deletion tests/jenkins/TestDockerBuild.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class TestDockerBuild extends BuildPipelineTest {
assertCallStack().contains("docker-build.sh(echo Account: jenkins-staging-dockerhub-credential)")

// Make sure dockerBuildOS is deciding agent_node docker_nodes docker_args correctly
assertCallStack().contains("docker-build.echo(Executing on agent [docker:[alwaysPull:true, args:-u root -v /var/run/docker.sock:/var/run/docker.sock, containerPerStageRoot:false, label:Jenkins-Agent-Ubuntu2004-X64-M52xlarge-Docker-Builder, image:opensearchstaging/ci-runner:ubuntu2404-x64-docker-buildx0.9.1-qemu8.2-v1, reuseNode:false, registryUrl:https://public.ecr.aws/, stages:[:]]])")
assertCallStack().contains("docker-build.echo(Executing on agent [docker:[alwaysPull:true, args:-u root -v /var/run/docker.sock:/var/run/docker.sock, containerPerStageRoot:false, label:Jenkins-Agent-Ubuntu2404-X64-M52xlarge-Docker-Builder, image:opensearchstaging/ci-runner:ubuntu2404-x64-docker-buildx0.9.1-qemu8.2-v1, reuseNode:false, registryUrl:https://public.ecr.aws/, stages:[:]]])")

printCallStack()
}
Expand Down
2 changes: 1 addition & 1 deletion tests/jenkins/TestDockerScanJob.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TestDockerScanJob extends BuildPipelineTest {

helper.registerSharedLibrary(
library().name('jenkins')
.defaultVersion('1.0.4')
.defaultVersion('8.2.2')
.allowOverride(true)
.implicit(true)
.targetPath('vars')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
docker-build.stage(Parameters Check, groovy.lang.Closure)
docker-build.script(groovy.lang.Closure)
docker-build.stage(docker-build, groovy.lang.Closure)
docker-build.echo(Executing on agent [docker:[alwaysPull:true, args:-u root -v /var/run/docker.sock:/var/run/docker.sock, containerPerStageRoot:false, label:Jenkins-Agent-Ubuntu2004-X64-M52xlarge-Docker-Builder, image:opensearchstaging/ci-runner:ubuntu2404-x64-docker-buildx0.9.1-qemu8.2-v1, reuseNode:false, registryUrl:https://public.ecr.aws/, stages:[:]]])
docker-build.echo(Executing on agent [docker:[alwaysPull:true, args:-u root -v /var/run/docker.sock:/var/run/docker.sock, containerPerStageRoot:false, label:Jenkins-Agent-Ubuntu2404-X64-M52xlarge-Docker-Builder, image:opensearchstaging/ci-runner:ubuntu2404-x64-docker-buildx0.9.1-qemu8.2-v1, reuseNode:false, registryUrl:https://public.ecr.aws/, stages:[:]]])
docker-build.script(groovy.lang.Closure)
docker-build.echo(The docker-build workflow will only push docker images to staging, please use docker-copy to move the image to other repositories)
docker-build.checkout({$class=GitSCM, branches=[{name=main}], userRemoteConfigs=[{url=https://github.com/opensearch-project/opensearch-build}]})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
docker-scan.run()
docker-scan.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git})
docker-scan.library({identifier=jenkins@1.0.4, retriever=null})
docker-scan.library({identifier=jenkins@8.2.2, retriever=null})
docker-scan.pipeline(groovy.lang.Closure)
docker-scan.timeout({time=30})
docker-scan.echo(Executing on agent [label:none])
Expand All @@ -11,7 +11,7 @@
docker-scan.scanDockerImage({imageFullName=alpine:3, imageResultFile=scan_docker_image})
scanDockerImage.sh(
touch scan_docker_image.txt scan_docker_image.json
trivy image --clear-cache
trivy clean --all
docker rmi `docker images -f "dangling=true" -q` || echo
docker rmi alpine:3 || echo
trivy image --format table --output scan_docker_image.txt alpine:3
Expand All @@ -21,4 +21,4 @@
docker-scan.script(groovy.lang.Closure)
docker-scan.postCleanup()
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true})
docker-scan.sh(trivy image --clear-cache)
docker-scan.sh(trivy clean --all)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
packer-build.library({identifier=jenkins@2.2.0, retriever=null})
packer-build.pipeline(groovy.lang.Closure)
packer-build.timeout({time=4, unit=HOURS})
packer-build.echo(Executing on agent [docker:[alwaysPull:true, args:, containerPerStageRoot:false, label:Jenkins-Agent-Ubuntu2004-X64-M52xlarge-Docker-Builder, image:opensearchstaging/ci-runner:ubuntu2404-x64-docker-buildx0.9.1-qemu8.2-v1, reuseNode:false, registryUrl:https://public.ecr.aws/, stages:[:]]])
packer-build.echo(Executing on agent [docker:[alwaysPull:true, args:, containerPerStageRoot:false, label:Jenkins-Agent-Ubuntu2404-X64-M52xlarge-Docker-Builder, image:opensearchstaging/ci-runner:ubuntu2404-x64-docker-buildx0.9.1-qemu8.2-v1, reuseNode:false, registryUrl:https://public.ecr.aws/, stages:[:]]])
packer-build.stage(Parameters Check, groovy.lang.Closure)
packer-build.script(groovy.lang.Closure)
packer-build.stage(packer-build, groovy.lang.Closure)
Expand Down

0 comments on commit 6060ef8

Please sign in to comment.