Skip to content

Commit

Permalink
Enable aqavit-test in alpine-linux container(#4625)
Browse files Browse the repository at this point in the history
Accelerator1996 committed Jun 15, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent e1e2c75 commit ac177fb
Showing 2 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions buildenv/jenkins/JenkinsfileBase
Original file line number Diff line number Diff line change
@@ -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()
@@ -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";
}
18 changes: 17 additions & 1 deletion buildenv/jenkins/openjdk_tests
Original file line number Diff line number Diff line change
@@ -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',
@@ -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}'"
@@ -449,6 +458,12 @@ def runTest() {
// 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()
@@ -611,4 +626,5 @@ def generateJobViaAutoGen(testJobName) {

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

0 comments on commit ac177fb

Please sign in to comment.