Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit c9cb05d

Browse files
committed
chore(ci): fix failing deploy-code job
In #17114, the `deploy-code` CI job was modified to also run some commands via `yarn`. It turns out that this breaks on CI, because the `deploy-code` job uses the `cloud-sdk` executor that does not have `yarn` installed. ([Example failure][1]) This commit fixes this by splitting the `deploy-code` job into two jobs: - `deploy-code-files` uses the `cloud-sdk` and uploads the files to Google Cloud. (This is essentially the `deploy-code` job from before #17114.) - `deploy-code-firebase` uses the `default` executor (which has `yarn` installed) and deploys to Firebase. (This essentially includes the new bits added in #17114.) [1]: https://circleci.com/gh/angular/angular.js/2712
1 parent 6f0d32a commit c9cb05d

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

Diff for: .circleci/config.yml

+27-7
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,13 @@ commands:
222222
no_output_timeout: 30m
223223
- stop_saucelabs
224224

225+
deploy_code_prerequisites:
226+
steps:
227+
- skip_on_pr_and_fork_builds
228+
- custom_attach_workspace
229+
- init_environment
230+
- skip_unless_tag_or_master_or_stable_branch
231+
225232
# Job definitions
226233
# Jobs can include parameters that are passed in the workflow job invocation.
227234
# https://circleci.com/docs/2.0/reusing-config/#authoring-parameterized-jobs
@@ -346,20 +353,17 @@ jobs:
346353
paths:
347354
- ./ng
348355

349-
# The `deploy-code` job should only run when all of these conditions are true for the build:
356+
# The `deploy-code-files` job should only run when all of these conditions are true for the build:
350357
# - It is for the `angular/angular.js` repository (not a fork).
351358
# - It is not for a pull request.
352359
# - It is for a tag or the master branch or the stable branch(*).
353360
#
354361
# *: The stable branch is the one that has the value `latest` in `package.json > distTag`.
355-
deploy-code:
362+
deploy-code-files:
356363
executor:
357364
name: cloud-sdk
358365
steps:
359-
- skip_on_pr_and_fork_builds
360-
- custom_attach_workspace
361-
- init_environment
362-
- skip_unless_tag_or_master_or_stable_branch
366+
- deploy_code_prerequisites
363367
- run: ls scripts/code.angularjs.org-firebase/deploy
364368
- run:
365369
name: Authenticate and configure Docker
@@ -370,6 +374,18 @@ jobs:
370374
name: Sync files to code.angularjs.org
371375
command: |
372376
gsutil -m rsync -r scripts/code.angularjs.org-firebase/deploy gs://code-angularjs-org-338b8.appspot.com
377+
378+
# The `deploy-code-firebase` job should only run when all of these conditions are true for the build:
379+
# - It is for the `angular/angular.js` repository (not a fork).
380+
# - It is not for a pull request.
381+
# - It is for a tag or the master branch or the stable branch(*).
382+
#
383+
# *: The stable branch is the one that has the value `latest` in `package.json > distTag`.
384+
deploy-code-firebase:
385+
executor:
386+
name: default-executor
387+
steps:
388+
- deploy_code_prerequisites
373389
# Install dependencies for Firebase functions to prevent parsing errors during deployment.
374390
# See https://github.com/angular/angular.js/pull/16453.
375391
- run:
@@ -471,7 +487,11 @@ workflows:
471487
- e2e-test-jquery-1
472488
- e2e-test-jquery-2a
473489
- e2e-test-jquery-2b
474-
- deploy-code:
490+
- deploy-code-files:
491+
<<: *run-on-tags-and-master-and-version-branches
492+
requires:
493+
- prepare-deployment
494+
- deploy-code-firebase:
475495
<<: *run-on-tags-and-master-and-version-branches
476496
requires:
477497
- prepare-deployment

0 commit comments

Comments
 (0)