From 34ef93d364d0ad0c19ffea18d65529b3e4a446b3 Mon Sep 17 00:00:00 2001 From: Will Parker Date: Wed, 30 Oct 2019 10:15:31 +0000 Subject: [PATCH] pbTests: Removed build Role, altered testScript to use ansible --- ansible/pbTestScripts/testScript.sh | 5 ++-- .../AdoptOpenJDK_Windows_Playbook/main.yml | 1 - .../roles/Build/tasks/main.yml | 26 ------------------- 3 files changed, 3 insertions(+), 29 deletions(-) delete mode 100644 ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Build/tasks/main.yml diff --git a/ansible/pbTestScripts/testScript.sh b/ansible/pbTestScripts/testScript.sh index 6497dc21ec..d69c8130ea 100755 --- a/ansible/pbTestScripts/testScript.sh +++ b/ansible/pbTestScripts/testScript.sh @@ -148,8 +148,9 @@ testBuildWin() { # Ensures the git config won't change line endings vagrant powershell -c "Start-Process powershell -Verb runAs; C:/cygwin64/bin/sed -i -e 's/autocrlf.*/autocrlf = false/g' C:\\ProgramData/Git/config" - # Run the build role of the Playbook - cd $WORKSPACE/adoptopenjdkPBTests/$folderName-$branchName/ansible && ansible-playbook -i playbooks/AdoptOpenJDK_Windows_Playbook/hosts.win -u vagrant --tags build playbooks/AdoptOpenJDK_Windows_Playbook/main.yml + vagrant powershell -c "cd C:/; if (-not (Test-Path C:/openjdk-build -PathType Container) ) { echo 'Cloning openJDK-build repo' ; git clone https://github.com/adoptopenjdk/openjdk-build ; sleep 3 }" + # Runs the build script via ansible + cd $WORKSPACE/adoptopenjdkPBTests/$folderName-$branchName/ansible && ansible all -i playbooks/AdoptOpenJDK_Windows_Playbook/hosts.win -u vagrant -m raw -a "Start-Process powershell.exe -Verb runAs; cd C:/; sh C:/vagrant/pbTestScripts/buildJDKWin.sh" } # Takes the OS as arg 1 diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml index 7dcd57303c..6b7ea3b0c6 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml @@ -62,4 +62,3 @@ - nasm # OpenJ9 - Rust # IcedTea-Web - IcedTea-Web # For Jenkins webstart - - Build # Role to build JDK8 diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Build/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Build/tasks/main.yml deleted file mode 100644 index dfb1e48f88..0000000000 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Build/tasks/main.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -################ -# Build JDK8 # -################ -- name: check if openjdk-build repo exists - win_stat: - path: 'C:\openjdk-build' - register: build_repo_exists - tags: build - -- name: check if a JDK8 has been built previously - win_stat: - path: 'C:\workspace\build\src\build\' - register: previous_JDK_build - tags: build - -- name: git clone openjdk-build repo - raw: cd C:/; git clone https://github.com/adoptopenjdk/openjdk-build - when: (build_repo_exists.stat.exists == false) - tags: build - -- name: Start build Script - raw: Start-Process powershell.exe -Verb runAs; cd C:/; sh C:/vagrant/pbTestScripts/buildJDKWin.sh - when: (previous_JDK_build.stat.exists == false) - register: build_script - tags: build