Skip to content

Commit 93fd6fe

Browse files
committed
Install pnpm shims
1 parent c3a0bfc commit 93fd6fe

File tree

3 files changed

+19
-22
lines changed

3 files changed

+19
-22
lines changed

tasks/_inc_client_build_steps.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,20 @@
55

66
- name: Install packages with yarn
77
yarn:
8-
executable: "{{ __galaxy_major_version is version('25.1', '==') | ternary('corepack ', '') }}yarn --network-timeout 300000 --check-files"
8+
executable: "yarn --network-timeout 300000 --check-files"
99
path: "{{ galaxy_server_dir }}/client"
1010
environment:
1111
PATH: "{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}"
1212
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
13-
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
1413
when: __galaxy_major_version is version('26.0', '<')
1514

1615
- name: Install packages with pnpm
17-
command: "corepack pnpm install"
16+
command: "pnpm install"
1817
args:
1918
chdir: "{{ galaxy_server_dir }}/client"
2019
environment:
2120
PATH: "{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}"
2221
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
23-
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
2422
when: __galaxy_major_version is version('26.0', '>=')
2523

2624
- name: Ensure deconstructed build is supported
@@ -31,57 +29,52 @@
3129
fail_msg: "Deconstructed client build is not supported for Galaxy version {{ __galaxy_major_version }}, please set 'galaxy_client_make_target'"
3230

3331
- name: Run gulp # noqa no-changed-when
34-
command: "{{ __galaxy_major_version is version('25.1', '==') | ternary('corepack yarn', 'yarn') }} run gulp {{ item }}"
32+
command: "yarn run gulp {{ item }}"
3533
args:
3634
chdir: "{{ galaxy_server_dir }}/client"
3735
with_items: "{{ galaxy_client_build_steps[__galaxy_major_version] | default(galaxy_client_build_steps.default) }}"
3836
environment:
3937
PATH: "{{ galaxy_server_dir }}/client/node_modules/.bin:{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}"
4038
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
4139
NODE_ENV: "{{ galaxy_client_node_env }}"
42-
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
4340
when: __galaxy_major_version is version('26.0', '<')
4441

4542
- name: Build plugins # noqa no-changed-when
46-
command: "corepack pnpm run plugins"
43+
command: "pnpm run plugins"
4744
args:
4845
chdir: "{{ galaxy_server_dir }}/client"
4946
environment:
5047
PATH: "{{ galaxy_server_dir }}/client/node_modules/.bin:{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}"
5148
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
5249
NODE_ENV: "{{ galaxy_client_node_env }}"
53-
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
5450
when: __galaxy_major_version is version('26.0', '>=')
5551

5652
- name: Run webpack # noqa no-changed-when
57-
command: "{{ __galaxy_major_version is version('25.1', '==') | ternary('corepack yarn', 'yarn') }} run webpack{{ (galaxy_client_node_env == 'production') | ternary('-production', '') }}"
53+
command: "yarn run webpack{{ (galaxy_client_node_env == 'production') | ternary('-production', '') }}"
5854
args:
5955
chdir: "{{ galaxy_server_dir }}/client"
6056
environment:
6157
PATH: "{{ galaxy_server_dir }}/client/node_modules/.bin:{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}"
6258
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
6359
NODE_OPTIONS: --max_old_space_size=8192
64-
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
6560
when: __galaxy_major_version is version('26.0', '<')
6661

6762
- name: Run client build # noqa no-changed-when
68-
command: "corepack pnpm run build-production"
63+
command: "pnpm run build-production"
6964
args:
7065
chdir: "{{ galaxy_server_dir }}/client"
7166
environment:
7267
PATH: "{{ galaxy_server_dir }}/client/node_modules/.bin:{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}"
7368
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
74-
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
7569
NODE_OPTIONS: --max_old_space_size=8192
7670
SKIP_VIZ: "1"
7771
when: __galaxy_major_version is version('26.0', '>=')
7872

7973
- name: Stage built client
80-
command: "{{ __galaxy_major_version is version('25.1', '==') | ternary('corepack yarn', 'yarn') }} run stage-build"
74+
command: "yarn run stage-build"
8175
args:
8276
chdir: "{{ galaxy_server_dir }}/client"
8377
environment:
8478
PATH: "{{ galaxy_server_dir }}/client/node_modules/.bin:{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}"
8579
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
86-
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
8780
when: __galaxy_major_version is version('23.0', '>=') and __galaxy_major_version is version('26.0', '<')

tasks/_inc_client_install_tools.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
include_tasks: _inc_galaxy_version.yml
44
when: __galaxy_major_version is undefined
55

6+
- name: Enable corepack shims # noqa no-changed-when
7+
command: "corepack enable --install-directory {{ galaxy_venv_dir }}/bin"
8+
environment:
9+
PATH: "{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}"
10+
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
11+
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
12+
when: __galaxy_major_version is version('25.1', '>=')
13+
614
- name: Install client build tools
715
when: __galaxy_major_version is version('25.1', '<')
816
block:

tasks/client.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,45 +73,41 @@
7373

7474
- name: Install prebuilt client with yarn
7575
yarn:
76-
executable: "{{ __galaxy_major_version is version('25.1', '>=') | ternary('corepack ', '') }}yarn --check-files"
76+
executable: "yarn --check-files"
7777
path: "{{ galaxy_server_dir }}"
7878
environment:
7979
PATH: "{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}"
8080
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
81-
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
8281
register: __yarn_install
8382
changed_when: "'already up-to-date' not in __yarn_install.out | lower"
8483
when: __galaxy_major_version is version('26.0', '<')
8584

8685
- name: Install prebuilt client with pnpm
87-
command: "corepack pnpm install"
86+
command: "pnpm install"
8887
args:
8988
chdir: "{{ galaxy_server_dir }}"
9089
environment:
9190
PATH: "{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}"
9291
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
93-
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
9492
register: __pnpm_install
9593
when: __galaxy_major_version is version('26.0', '>=')
9694

9795
- name: Stage prebuilt client (yarn) # noqa no-changed-when
98-
command: "{{ __galaxy_major_version is version('25.1', '>=') | ternary('corepack ', '') }}yarn run stage"
96+
command: "yarn run stage"
9997
args:
10098
chdir: "{{ galaxy_server_dir }}"
10199
environment:
102100
PATH: "{{ galaxy_server_dir }}/client/node_modules/.bin:{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}"
103101
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
104-
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
105102
when: __galaxy_major_version is version('26.0', '<') and __yarn_install.changed
106103

107104
- name: Stage prebuilt client (pnpm) # noqa no-changed-when
108-
command: "corepack pnpm run stage"
105+
command: "pnpm run stage"
109106
args:
110107
chdir: "{{ galaxy_server_dir }}"
111108
environment:
112109
PATH: "{{ galaxy_server_dir }}/client/node_modules/.bin:{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}"
113110
VIRTUAL_ENV: "{{ galaxy_venv_dir }}"
114-
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0"
115111
when: __galaxy_major_version is version('26.0', '>=') and __pnpm_install.changed
116112

117113
remote_user: "{{ galaxy_remote_users.privsep | default(__galaxy_remote_user) }}"

0 commit comments

Comments
 (0)