Skip to content

Commit 6276958

Browse files
pieternfacebook-github-bot
authored andcommitted
Turn setup_ci_environment into command
Summary: Pull Request resolved: #26163 Test Plan: Imported from OSS Differential Revision: D17366536 Pulled By: pietern fbshipit-source-id: 07181a77aaeba5457aa716ceac9cc404aacefe5f
1 parent 12086a6 commit 6276958

File tree

7 files changed

+38
-58
lines changed

7 files changed

+38
-58
lines changed

.circleci/config.yml

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ docker_config_defaults: &docker_config_defaults
1919
# This IAM user only allows read-write access to ECR
2020
aws_access_key_id: ${CIRCLECI_AWS_ACCESS_KEY_FOR_ECR_READ_WRITE_V4}
2121
aws_secret_access_key: ${CIRCLECI_AWS_SECRET_KEY_FOR_ECR_READ_WRITE_V4}
22-
23-
setup_ci_environment: &setup_ci_environment
24-
name: Set Up CI Environment After attach_workspace
25-
no_output_timeout: "1h"
26-
command: ~/workspace/.circleci/scripts/setup_ci_environment.sh
2722
commands:
2823
# NB: This command must be run as the first command in a job. It
2924
# attaches the workspace at ~/workspace; this workspace is generated
@@ -50,6 +45,13 @@ commands:
5045
no_output_timeout: "1h"
5146
command: ~/workspace/.circleci/scripts/setup_linux_system_environment.sh
5247

48+
setup_ci_environment:
49+
steps:
50+
- run:
51+
name: Set Up CI Environment After attach_workspace
52+
no_output_timeout: "1h"
53+
command: ~/workspace/.circleci/scripts/setup_ci_environment.sh
54+
5355
brew_update:
5456
description: "Update Homebrew and install base formulae"
5557
steps:
@@ -294,8 +296,7 @@ jobs:
294296
- should_run_job
295297
- setup_linux_system_environment
296298
- checkout
297-
- run:
298-
<<: *setup_ci_environment
299+
- setup_ci_environment
299300
- run:
300301
name: Build
301302
no_output_timeout: "1h"
@@ -351,8 +352,7 @@ jobs:
351352
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
352353
- should_run_job
353354
- setup_linux_system_environment
354-
- run:
355-
<<: *setup_ci_environment
355+
- setup_ci_environment
356356
- run:
357357
name: Test
358358
no_output_timeout: "90m"
@@ -390,8 +390,7 @@ jobs:
390390
- should_run_job
391391
- setup_linux_system_environment
392392
- checkout
393-
- run:
394-
<<: *setup_ci_environment
393+
- setup_ci_environment
395394
- run:
396395
name: Build
397396
no_output_timeout: "1h"
@@ -450,8 +449,7 @@ jobs:
450449
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
451450
- should_run_job
452451
- setup_linux_system_environment
453-
- run:
454-
<<: *setup_ci_environment
452+
- setup_ci_environment
455453
- run:
456454
name: Test
457455
no_output_timeout: "1h"
@@ -650,8 +648,7 @@ jobs:
650648
- attach_workspace:
651649
at: /home/circleci/project
652650
- setup_linux_system_environment
653-
- run:
654-
<<: *setup_ci_environment
651+
- setup_ci_environment
655652
- run:
656653
<<: *binary_checkout
657654
- run:
@@ -671,8 +668,7 @@ jobs:
671668
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
672669
- should_run_job
673670
- setup_linux_system_environment
674-
- run:
675-
<<: *setup_ci_environment
671+
- setup_ci_environment
676672
- attach_workspace:
677673
at: /home/circleci/project
678674
- run:
@@ -699,8 +695,7 @@ jobs:
699695
- attach_workspace:
700696
at: /home/circleci/project
701697
- setup_linux_system_environment
702-
- run:
703-
<<: *setup_ci_environment
698+
- setup_ci_environment
704699
- run:
705700
<<: *binary_checkout
706701
- run:
@@ -855,8 +850,7 @@ jobs:
855850
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
856851
- should_run_job
857852
- setup_linux_system_environment
858-
- run:
859-
<<: *setup_ci_environment
853+
- setup_ci_environment
860854
- run:
861855
name: Perf Test
862856
no_output_timeout: "1h"
@@ -890,8 +884,7 @@ jobs:
890884
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
891885
- should_run_job
892886
- setup_linux_system_environment
893-
- run:
894-
<<: *setup_ci_environment
887+
- setup_ci_environment
895888
- run:
896889
name: Doc Build and Push
897890
no_output_timeout: "1h"
@@ -936,8 +929,7 @@ jobs:
936929
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
937930
- should_run_job
938931
- setup_linux_system_environment
939-
- run:
940-
<<: *setup_ci_environment
932+
- setup_ci_environment
941933
- run:
942934
name: Doc Build and Push
943935
no_output_timeout: "1h"
@@ -1094,8 +1086,7 @@ jobs:
10941086
- should_run_job
10951087
- setup_linux_system_environment
10961088
- checkout
1097-
- run:
1098-
<<: *setup_ci_environment
1089+
- setup_ci_environment
10991090
- run:
11001091
name: pytorch android gradle build
11011092
no_output_timeout: "1h"
@@ -1189,8 +1180,7 @@ jobs:
11891180
fi
11901181
- setup_linux_system_environment
11911182
- checkout
1192-
- run:
1193-
<<: *setup_ci_environment
1183+
- setup_ci_environment
11941184
- run:
11951185
name: pytorch android gradle build only x86_32 (for PR)
11961186
no_output_timeout: "1h"

.circleci/verbatim-sources/binary-job-specs.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@
6161
- attach_workspace:
6262
at: /home/circleci/project
6363
- setup_linux_system_environment
64-
- run:
65-
<<: *setup_ci_environment
64+
- setup_ci_environment
6665
- run:
6766
<<: *binary_checkout
6867
- run:
@@ -82,8 +81,7 @@
8281
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
8382
- should_run_job
8483
- setup_linux_system_environment
85-
- run:
86-
<<: *setup_ci_environment
84+
- setup_ci_environment
8785
- attach_workspace:
8886
at: /home/circleci/project
8987
- run:
@@ -110,8 +108,7 @@
110108
- attach_workspace:
111109
at: /home/circleci/project
112110
- setup_linux_system_environment
113-
- run:
114-
<<: *setup_ci_environment
111+
- setup_ci_environment
115112
- run:
116113
<<: *binary_checkout
117114
- run:

.circleci/verbatim-sources/caffe2-job-specs.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
- should_run_job
88
- setup_linux_system_environment
99
- checkout
10-
- run:
11-
<<: *setup_ci_environment
10+
- setup_ci_environment
1211
- run:
1312
name: Build
1413
no_output_timeout: "1h"
@@ -67,8 +66,7 @@
6766
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
6867
- should_run_job
6968
- setup_linux_system_environment
70-
- run:
71-
<<: *setup_ci_environment
69+
- setup_ci_environment
7270
- run:
7371
name: Test
7472
no_output_timeout: "1h"

.circleci/verbatim-sources/commands.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ commands:
2424
no_output_timeout: "1h"
2525
command: ~/workspace/.circleci/scripts/setup_linux_system_environment.sh
2626

27+
setup_ci_environment:
28+
steps:
29+
- run:
30+
name: Set Up CI Environment After attach_workspace
31+
no_output_timeout: "1h"
32+
command: ~/workspace/.circleci/scripts/setup_ci_environment.sh
33+
2734
brew_update:
2835
description: "Update Homebrew and install base formulae"
2936
steps:

.circleci/verbatim-sources/header-section.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,3 @@ docker_config_defaults: &docker_config_defaults
1919
# This IAM user only allows read-write access to ECR
2020
aws_access_key_id: ${CIRCLECI_AWS_ACCESS_KEY_FOR_ECR_READ_WRITE_V4}
2121
aws_secret_access_key: ${CIRCLECI_AWS_SECRET_KEY_FOR_ECR_READ_WRITE_V4}
22-
23-
setup_ci_environment: &setup_ci_environment
24-
name: Set Up CI Environment After attach_workspace
25-
no_output_timeout: "1h"
26-
command: ~/workspace/.circleci/scripts/setup_ci_environment.sh

.circleci/verbatim-sources/job-specs-custom.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
1212
- should_run_job
1313
- setup_linux_system_environment
14-
- run:
15-
<<: *setup_ci_environment
14+
- setup_ci_environment
1615
- run:
1716
name: Perf Test
1817
no_output_timeout: "1h"
@@ -46,8 +45,7 @@
4645
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
4746
- should_run_job
4847
- setup_linux_system_environment
49-
- run:
50-
<<: *setup_ci_environment
48+
- setup_ci_environment
5149
- run:
5250
name: Doc Build and Push
5351
no_output_timeout: "1h"
@@ -92,8 +90,7 @@
9290
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
9391
- should_run_job
9492
- setup_linux_system_environment
95-
- run:
96-
<<: *setup_ci_environment
93+
- setup_ci_environment
9794
- run:
9895
name: Doc Build and Push
9996
no_output_timeout: "1h"
@@ -250,8 +247,7 @@
250247
- should_run_job
251248
- setup_linux_system_environment
252249
- checkout
253-
- run:
254-
<<: *setup_ci_environment
250+
- setup_ci_environment
255251
- run:
256252
name: pytorch android gradle build
257253
no_output_timeout: "1h"
@@ -345,8 +341,7 @@
345341
fi
346342
- setup_linux_system_environment
347343
- checkout
348-
- run:
349-
<<: *setup_ci_environment
344+
- setup_ci_environment
350345
- run:
351346
name: pytorch android gradle build only x86_32 (for PR)
352347
no_output_timeout: "1h"

.circleci/verbatim-sources/pytorch-job-specs.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ jobs:
88
- should_run_job
99
- setup_linux_system_environment
1010
- checkout
11-
- run:
12-
<<: *setup_ci_environment
11+
- setup_ci_environment
1312
- run:
1413
name: Build
1514
no_output_timeout: "1h"
@@ -65,8 +64,7 @@ jobs:
6564
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
6665
- should_run_job
6766
- setup_linux_system_environment
68-
- run:
69-
<<: *setup_ci_environment
67+
- setup_ci_environment
7068
- run:
7169
name: Test
7270
no_output_timeout: "90m"

0 commit comments

Comments
 (0)