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

Enable aqavit-test in alpine-linux container(#4625) #4626

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions buildenv/jenkins/JenkinsfileBase
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def setup() {
dir( WORKSPACE) {
// use sshagent with Jenkins credentials ID for all platforms except zOS
// on zOS use the user's ssh key
if (!env.SPEC.startsWith('zos')) {
if (!env.SPEC.startsWith('zos') && !(env.SPEC.contains('alpine-linux') && env.DOCKER_REQUIRED)) {
get_sources_with_authentication()
} else {
get_sources()
Expand Down Expand Up @@ -553,7 +553,7 @@ def makeCompileTest(){
makeTestCmd = "unset LD_LIBRARY_PATH; $makeTestCmd"
}
dir('aqa-tests') {
if (!env.SPEC.startsWith('zos')) {
if (!env.SPEC.startsWith('zos') && !(env.SPEC.contains('alpine-linux') && env.DOCKER_REQUIRED)) {
sshagent (credentials: ["$params.SSH_AGENT_CREDENTIAL"], ignoreMissing: true) {
sh "$makeTestCmd";
}
Expand Down
18 changes: 17 additions & 1 deletion buildenv/jenkins/openjdk_tests
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def PLATFORM_MAP = [
'x86-64_alpine-linux' : [
'SPEC' : 'alpine-linux_x86-64',
'LABEL' : 'ci.role.test&&hw.arch.x86&&sw.os.alpine-linux',
'DockerAgents' : ['default']
],
'x86-32_linux' : [
'SPEC' : 'linux_x86',
Expand Down Expand Up @@ -338,6 +339,14 @@ timestamps{
LABEL += '&&hw.arch.x86'
if (!LABEL.contains('&&sw.tool.docker')) {
LABEL += '&&sw.tool.docker'
env.DOCKER_REQUIRED = true
}
}
if (dockerAgentLabel.equals('default') && SPEC.equals('alpine-linux_x86-64')) {
LABEL = LABEL.minus("&&sw.os.alpine-linux")
if (!LABEL.contains('&&sw.tool.docker')) {
LABEL += '&&sw.tool.docker'
env.DOCKER_REQUIRED = true
}
}
println "Cannot find any idle nodes. Starting run test on docker node, nodeLabel: '${LABEL}', dockerAgentLabel: '${dockerAgentLabel}'"
Expand Down Expand Up @@ -445,10 +454,17 @@ def runTest() {
// Automatically registers foreign file formats with the kernel using binfmt_static to simplify execution of multi-architecture binaries and Docker containers
// In fact, this command only needs to be executed once
sh "docker run --rm --privileged multiarch/qemu-user-static --reset -p yes"
// Dockerfile: https://github.com/dragonwell-project/docker-qemu-riscv64/blob/master/Dockerfile
docker.image('alibabadragonwell/riscv-normal-qemu_6.0.0-rvv-1.0:latest').pull()
// The ${HOME} directory must be mounted, otherwise xvfb will fail to startup
docker.image('alibabadragonwell/riscv-normal-qemu_6.0.0-rvv-1.0:latest').inside("-v ${env.HOME}:${env.HOME}") {
jenkinsfile.testBuild()
} else if (dockerAgentLabel.equals('default') && LABEL.contains('&&sw.tool.docker') && SPEC.equals('alpine-linux_x86-64')) {
// Dockerfile: https://github.com/dragonwell-releng/aqa-tests-dockerfile/blob/main/alpine-linux_test.Dockerfile
docker.image('alibabadragonwelljdk/alpine_test_image').pull()
docker.image('alibabadragonwelljdk/alpine_test_image').inside("-v ${env.HOME}:${env.HOME} --network host --privileged -v /etc/hosts:/etc/hosts:ro -v /etc/group:/etc/group:ro -v /etc/passwd:/etc/passwd:ro -v /etc/shadow:/etc/shadow:ro") {
jenkinsfile.testBuild()
}
}
} else {
jenkinsfile.testBuild()
Expand Down Expand Up @@ -611,4 +627,4 @@ def generateJobViaAutoGen(testJobName) {

build job: 'Test_Job_Auto_Gen', parameters: jobParams, propagate: true
}
}
}