|
1 | 1 | ---
|
| 2 | +- name: Downlaod Xcode v{{ xcode_version }} |
| 3 | + ansible.builtin.shell: > |
| 4 | + jf rt dl |
| 5 | + --flat |
| 6 | + --fail-no-op |
| 7 | + --retries=100 |
| 8 | + --url="https://artifactory.ccdc.cam.ac.uk/artifactory" |
| 9 | + --user={{ ansible_deployment_artifactory_user }} |
| 10 | + --props="XCODE_VERSION={{ xcode_version }}" |
| 11 | + --password="{{ ansible_deployment_artifactory_key }}" |
| 12 | + "ccdc-3rdparty-macos-xcode-installers/" |
| 13 | + /tmp/xcode-{{ xcode_version }}.xip |
| 14 | + environment: |
| 15 | + PATH: "/usr/local/bin:/usr/bin" |
| 16 | + CI: "true" |
| 17 | + JFROG_CLI_OFFER_CONFIG: "false" |
| 18 | + args: |
| 19 | + creates: /tmp/xcode-{{ xcode_version }}.xip |
| 20 | + |
2 | 21 | - name: Install Xcode v{{ xcode_version }} # noqa: name[template]
|
3 |
| - ansible.builtin.shell: | |
4 |
| - XCODES_USERNAME={{ lookup("env", "CCDC_APPLE_ID_USERNAME") }} \ |
5 |
| - XCODES_PASSWORD={{ lookup("env", "CCDC_APPLE_ID_PASSWORD") }} \ |
6 |
| - xcodes install {{ xcode_version }} --experimental-unxip --select |
| 22 | + ansible.builtin.shell: |
| 23 | + cmd: /usr/local/bin/xcodes install {{ xcode_version }} --path /tmp/xcode-{{ xcode_version }}.xip --experimental-unxip |
7 | 24 | args:
|
8 |
| - creates: "/Applications/Xcode_{{ xcode_version }}.app" |
| 25 | + creates: "/Applications/Xcode-{{ xcode_version }}.app" |
| 26 | + environment: |
| 27 | + PATH: /usr/local/bin:{{ ansible_env.PATH }} |
| 28 | + |
| 29 | +- name: Set CLI tools path |
| 30 | + ansible.builtin.command: |
| 31 | + cmd: xcode-select -s /Applications/Xcode-{{ xcode_version }}.app/Contents/Developer |
| 32 | + become: true |
9 | 33 |
|
10 | 34 | - name: Accept Xcode licence # noqa: no-changed-when
|
11 | 35 | ansible.builtin.command: xcodebuild -license accept
|
|
0 commit comments