ci: publish tarballs for the zone.js package as CI build artifacts (#33733)
Since #33321, Angular packages have been persisted on each build as CircleCI build artifacts (`.tgz` files), which can be used to install dependencies on a project (for the purpose of testing or trying out a change before a PR being merged and without having to build the packages from source locally). Previously, only packages published to npm under the `@angular` scope were persisted as build artifacts. This commit adds the `zone.js` package to the list of persisted packages. Fixes #33686 PR Close #33733
This commit is contained in:
parent
74b7d1ace1
commit
2ce9cdab9d
|
@ -570,15 +570,25 @@ jobs:
|
||||||
environment:
|
environment:
|
||||||
NG_PACKAGES_DIR: &ng_packages_dir 'dist/packages-dist'
|
NG_PACKAGES_DIR: &ng_packages_dir 'dist/packages-dist'
|
||||||
NG_PACKAGES_ARCHIVES_DIR: &ng_packages_archives_dir 'dist/packages-dist-archives'
|
NG_PACKAGES_ARCHIVES_DIR: &ng_packages_archives_dir 'dist/packages-dist-archives'
|
||||||
|
ZONEJS_PACKAGES_DIR: &zonejs_packages_dir 'dist/zone.js-dist'
|
||||||
|
ZONEJS_PACKAGES_ARCHIVES_DIR: &zonejs_packages_archives_dir 'dist/zone.js-dist-archives'
|
||||||
steps:
|
steps:
|
||||||
- custom_attach_workspace
|
- custom_attach_workspace
|
||||||
- init_environment
|
- init_environment
|
||||||
|
# Publish `@angular/*` packages.
|
||||||
- run:
|
- run:
|
||||||
name: Create artifacts
|
name: Create artifacts for @angular/* packages
|
||||||
command: ./scripts/ci/create-package-archives.sh $CI_PULL_REQUEST $CI_COMMIT $NG_PACKAGES_DIR $NG_PACKAGES_ARCHIVES_DIR
|
command: ./scripts/ci/create-package-archives.sh $CI_PULL_REQUEST $CI_COMMIT $NG_PACKAGES_DIR $NG_PACKAGES_ARCHIVES_DIR
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: *ng_packages_archives_dir
|
path: *ng_packages_archives_dir
|
||||||
destination: angular
|
destination: angular
|
||||||
|
# Publish `zone.js` package.
|
||||||
|
- run:
|
||||||
|
name: Create artifacts for zone.js package
|
||||||
|
command: ./scripts/ci/create-package-archives.sh $CI_PULL_REQUEST $CI_COMMIT $ZONEJS_PACKAGES_DIR $ZONEJS_PACKAGES_ARCHIVES_DIR
|
||||||
|
- store_artifacts:
|
||||||
|
path: *zonejs_packages_archives_dir
|
||||||
|
destination: zone.js
|
||||||
|
|
||||||
# This job updates the content of repos like github.com/angular/core-builds
|
# This job updates the content of repos like github.com/angular/core-builds
|
||||||
# for every green build on angular/angular.
|
# for every green build on angular/angular.
|
||||||
|
|
|
@ -15,11 +15,14 @@ echo " Preparing output directory: $outputDir"
|
||||||
rm -rf "$outputDir"
|
rm -rf "$outputDir"
|
||||||
mkdir -p "$outputDir"
|
mkdir -p "$outputDir"
|
||||||
|
|
||||||
# Create a compressed archive containing all packages.
|
# If there are more than one packages in `$inputDir`...
|
||||||
# (This is useful for copying all packages into `node_modules/` (without changing `package.json`).)
|
if [[ $(ls -1 "$inputDir" | wc -l) -gt 1 ]]; then
|
||||||
outputFileName=all$fileSuffix
|
# Create a compressed archive containing all packages.
|
||||||
echo " Creating archive with all packages --> '$outputFileName'..."
|
# (This is useful for copying all packages into `node_modules/` (without changing `package.json`).)
|
||||||
tar --create --gzip --directory "$inputDir" --file "$outputDir/$outputFileName" --transform s/^\./packages/ .
|
outputFileName=all$fileSuffix
|
||||||
|
echo " Creating archive with all packages --> '$outputFileName'..."
|
||||||
|
tar --create --gzip --directory "$inputDir" --file "$outputDir/$outputFileName" --transform s/^\./packages/ .
|
||||||
|
fi
|
||||||
|
|
||||||
# Create a compressed archive for each package.
|
# Create a compressed archive for each package.
|
||||||
# (This is useful for referencing the path/URL to the resulting archive in `package.json`.)
|
# (This is useful for referencing the path/URL to the resulting archive in `package.json`.)
|
||||||
|
|
Loading…
Reference in New Issue