File tree Expand file tree Collapse file tree 5 files changed +46
-6
lines changed Expand file tree Collapse file tree 5 files changed +46
-6
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,28 @@ jobs:
203
203
204
204
- *save_cache
205
205
206
+ # ----------------------------------------
207
+ # Job that publishes the build snapshots
208
+ # ----------------------------------------
209
+ publish_snapshots :
210
+ << : *job_defaults
211
+ steps :
212
+ # Since CircleCI currently does not have any way to easily restrict jobs to only run
213
+ # for push builds, we need to manually skip publishing if the jobs runs for a PR.
214
+ # https://discuss.circleci.com/t/workflows-pull-request-filter/14396/11
215
+ - run :
216
+ name : Check whether this job should be skipped.
217
+ command : ' [[ -n ${CIRCLE_PR_NUMBER} ]] && circleci step halt || true'
218
+
219
+ - *checkout_code
220
+ - *restore_cache
221
+ - *yarn_install
222
+ - *attach_release_output
223
+
224
+ - run : ./scripts/circleci/publish-snapshots.sh
225
+
226
+ - *save_cache
227
+
206
228
# ----------------------------------------------------------------------------------------
207
229
# Workflow definitions. A workflow usually groups multiple jobs together. This is useful if
208
230
# one job depends on another.
@@ -235,6 +257,9 @@ workflows:
235
257
- build_demoapp_aot :
236
258
requires :
237
259
- build_release_packages
260
+ - publish_snapshots :
261
+ requires :
262
+ - build_release_packages
238
263
239
264
# Lint workflow. As we want to lint in one job, this is a workflow with just one job.
240
265
lint :
Original file line number Diff line number Diff line change 27
27
include :
28
28
- env : " MODE=payload"
29
29
- env : " MODE=saucelabs_required"
30
- - env : " DEPLOY_MODE=build-artifacts"
31
- if : type = push
32
- - env : " DEPLOY_MODE=docs-content"
33
- if : type = push
34
30
- env : " DEPLOY_MODE=dashboard"
35
31
if : type = cron
36
32
env :
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # This script should fail if one of the individual publish scripts fails.
4
+ set -e
5
+
6
+ # Go to project directory.
7
+ cd $( dirname ${0} ) /../..
8
+
9
+ # Deploy build artifacts to the GitHub build repositories. The release output is already
10
+ # fetched from the CircleCI workspace storage.
11
+ ./scripts/deploy/publish-build-artifacts.sh --no-build
12
+
13
+ # Build the docs output before publishing the docs content.
14
+ yarn gulp docs
15
+
16
+ # Deploy the docs content to the Github repository. We don't want to build the examples
17
+ # package here again because it's already fetched from the CircleCI workspace storage.
18
+ ./scripts/deploy/publish-docs-content.sh --no-build
19
+
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ publishPackage() {
31
31
32
32
buildDir=" $( pwd) /dist/releases/${packageName} "
33
33
buildVersion=$( node -pe " require('./package.json').version" )
34
- branchName=${TRAVIS_BRANCH :- ' master' }
34
+ branchName=${CIRCLE_BRANCH :- ' master' }
35
35
36
36
commitSha=$( git rev-parse --short HEAD)
37
37
commitAuthorName=$( git --no-pager show -s --format=' %an' HEAD)
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ docsContentRepoUrl="https://github.com/angular/material2-docs-content"
38
38
buildVersion=$( node -pe " require('./package.json').version" )
39
39
40
40
# Name of the branch that is currently being deployed.
41
- branchName=${TRAVIS_BRANCH :- ' master' }
41
+ branchName=${CIRCLE_BRANCH :- ' master' }
42
42
43
43
# Additional information about the last commit for docs-content commits.
44
44
commitSha=$( git rev-parse --short HEAD)
You can’t perform that action at this time.
0 commit comments