-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unixpb: Add Xcode11 installation tasks to Unix playbook (#3197)
* unixPb: add xcode11 install tasks to playbook * update message * correct tags * correct condition and update comment * fix conditional * change command to shell * xcode11 * change hosts parameter back to original * typo * switch to blob storage --------- Co-authored-by: George Adams <[email protected]>
- Loading branch information
1 parent
8519a18
commit a1c45af
Showing
2 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Xcode11/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
# Xcode 11.7 is needed to build x64 JDK8 om Arm64 Mac | ||
# Xcode11.7 can be downloaded from https://developer.apple.com/download/all after authentication with apple ID and password | ||
# See https://github.com/adoptium/infrastructure/issues/2536#issuecomment-1708716478 | ||
|
||
- name: Check if Xcode11.7 is installed | ||
stat: | ||
path: /Applications/Xcode-11.7.app/ | ||
register: xcode11_installed | ||
|
||
- name: Check if SAS variable is defined | ||
set_fact: | ||
apple_variables: yes | ||
when: not xcode11_installed.stat.exists and XCode11.7_SAS_TOKEN is defined | ||
|
||
- name: Display Information when XCode11.7_SAS_TOKEN is not defined | ||
debug: | ||
msg: "XCode11.7_SAS_TOKEN is not defined. Xcode will need to be installed manually. | ||
Skipping Xcode installation" | ||
when: not xcode11_installed.stat.exists and apple_variables is not defined | ||
|
||
- name: Install Xcode11.7 | ||
when: not xcode11_installed.stat.exists and apple_variables is defined | ||
block: | ||
- name: Download XCode 11.7 from Azure blob storage | ||
get_url: | ||
url: "https://ansiblestorageadopt.blob.core.windows.net/xcode11-7/Xcode_11.7.xip?{{ XCode11.7_SAS_TOKEN }}" | ||
dest: /tmp/Xcode_11.7.xip | ||
mode: 0755 | ||
|
||
- name: Extract Xcode11.7 | ||
shell: xip -x /tmp/Xcode_11.7.xip | ||
args: | ||
chdir: /tmp | ||
creates: /tmp/Xcode.app | ||
|
||
- name: Move Xcode11.7 to /Applications directory | ||
copy: | ||
src: /tmp/Xcode.app | ||
dest: /Applications/Xcode-11.7.app/ | ||
remote_src: true | ||
|
||
- name: Clean up Xcode11.7.xip file | ||
file: | ||
path: /tmp/Xcode_11.7.xip | ||
state: absent |