File tree Expand file tree Collapse file tree 5 files changed +49
-9
lines changed Expand file tree Collapse file tree 5 files changed +49
-9
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,28 @@ jobs:
202
202
203
203
- *save_cache
204
204
205
+ # ----------------------------------------
206
+ # Job that publishes the build snapshots
207
+ # ----------------------------------------
208
+ publish_snapshots :
209
+ << : *job_defaults
210
+ steps :
211
+ # Since CircleCI currently does not have any way to easily restrict jobs to only run
212
+ # for push builds, we need to manually skip publishing if the jobs runs for a PR.
213
+ # https://discuss.circleci.com/t/workflows-pull-request-filter/14396/11
214
+ - run :
215
+ name : Check whether this job should be skipped.
216
+ command : ' [[ -n ${CIRCLE_PR_NUMBER} ]] && circleci step halt || true'
217
+
218
+ - *checkout_code
219
+ - *restore_cache
220
+ - *yarn_install
221
+ - *attach_release_output
222
+
223
+ - run : ./scripts/circleci/publish-snapshots.sh
224
+
225
+ - *save_cache
226
+
205
227
# ----------------------------------------------------------------------------------------
206
228
# Workflow definitions. A workflow usually groups multiple jobs together. This is useful if
207
229
# one job depends on another.
@@ -234,6 +256,9 @@ workflows:
234
256
- build_demoapp_aot :
235
257
requires :
236
258
- build_release_packages
259
+ - publish_snapshots :
260
+ requires :
261
+ - build_release_packages
237
262
238
263
# Lint workflow. As we want to lint in one job, this is a workflow with just one job.
239
264
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 8
8
9
9
cd " $( dirname $0 ) /../../"
10
10
11
- if [ -z ${MATERIAL2_DOCS_CONTENT_TOKEN } ]; then
11
+ if [ -z ${MATERIAL2_BUILDS_TOKEN } ]; then
12
12
echo " Error: No access token for GitHub could be found." \
13
- " Please set the environment variable 'MATERIAL2_DOCS_CONTENT_TOKEN '."
13
+ " Please set the environment variable 'MATERIAL2_BUILDS_TOKEN '."
14
14
exit 1
15
15
fi
16
16
@@ -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)
@@ -117,7 +117,7 @@ git config user.name "$commitAuthorName"
117
117
git config user.email " $commitAuthorEmail "
118
118
git config credential.helper " store --file=.git/credentials"
119
119
120
- echo " https://${MATERIAL2_DOCS_CONTENT_TOKEN } :@github.com" > .git/credentials
120
+ echo " https://${MATERIAL2_BUILDS_TOKEN } :@github.com" > .git/credentials
121
121
122
122
echo " Credentials for docs-content repository are now set up. Publishing.."
123
123
You can’t perform that action at this time.
0 commit comments