Skip to content

Commit

Permalink
Merge branch 'main' into idempotent-xcode-install
Browse files Browse the repository at this point in the history
  • Loading branch information
florianpiesche authored Jun 7, 2024
2 parents acf682a + 62f69c4 commit 77b3e01
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 11 deletions.
5 changes: 4 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
---
xcode_version: 12.5.1
xcode_versions_by_macos:
"12": "12.5.1"
"13": "14.3.1"
"14": "15.4.0"
35 changes: 25 additions & 10 deletions tasks/Darwin.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
---
- name: Set Xcode version for macOS {{ ansible_distribution_major_version }}
ansible.builtin.set_fact:
xcode_version: "{{ xcode_versions_by_macos[ansible_distribution_major_version] }}"

- name: Ensure Homebrew packages are linked to system PATH

Check failure on line 6 in tasks/Darwin.yml

View workflow job for this annotation

GitHub Actions / Linting

no-changed-when

Commands should not change things if nothing needs doing.

Check notice on line 6 in tasks/Darwin.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

[ansible-lint] tasks/Darwin.yml#L6

no-changed-when Commands should not change things if nothing needs doing
Raw output
tasks/Darwin.yml:6: no-changed-when Commands should not change things if nothing needs doing
ansible.builtin.command:
cmd: brew link {{ package }}
environment:
PATH: "/usr/local/bin:/opt/homebrew/bin:{{ ansible_env.PATH }}"
loop:
- jfrog-cli
- xcodes
loop_control:
loop_var: package

- name: Check for existing Xcode v{{ xcode_version }} # noqa: no-changed-when
ansible.builtin.command:
cmd: xcodes installed {{ xcode_version }}
Expand All @@ -13,17 +28,17 @@
ansible.builtin.command:
cmd: >
jf rt dl
--flat
--fail-no-op
--retries=100
--url="https://artifactory.ccdc.cam.ac.uk/artifactory"
--user={{ ansible_deployment_artifactory_user }}
--props="XCODE_VERSION={{ xcode_version }}"
--password="{{ ansible_deployment_artifactory_key }}"
"ccdc-3rdparty-macos-xcode-installers/"
/tmp/xcode-{{ xcode_version }}.xip
--flat
--fail-no-op
--retries=100
--url="https://artifactory.ccdc.cam.ac.uk/artifactory"
--user={{ ansible_deployment_artifactory_user }}
--props="XCODE_VERSION={{ xcode_version }}"
--password="{{ ansible_deployment_artifactory_key }}"
"ccdc-3rdparty-macos-xcode-installers/"
/tmp/xcode-{{ xcode_version }}.xip
environment:
PATH: "/opt/homebrew/bin:/usr/local/bin:{{ ansible_env.PATH }}"
PATH: "/usr/local/bin:/opt/homebrew/bin:{{ ansible_env.PATH }}"
CI: "true"
JFROG_CLI_OFFER_CONFIG: "false"
args:
Expand Down

0 comments on commit 77b3e01

Please sign in to comment.