chore(build): upload dart artifacts to GCS#2952
Conversation
There was a problem hiding this comment.
Can you add dist/dart/angular2_material,dist/dart/angular2_benchmarks, dist/dart/benchpress to match the modules we publish to pub (see https://pub.dartlang.org/search?q=angular2)?
There was a problem hiding this comment.
wow the docs are really slim. Managed to track down to here
https://github.com/travis-ci/dpl/blob/4c8fd4f6084174da11ee1962e004ba4951f1f14b/lib/dpl/provider/gcs.rb#L31
that we can only give one local_dir, so I'm testing it with dist/dart to be sure it won't time out.
There was a problem hiding this comment.
It works but adds three more mins to the build (35m instead of 32m)
The timeout is 10m so this will work, but should we consider uploading an archive file instead?
There was a problem hiding this comment.
Also in the getting started guide they say
"If you plan on putting more than a few thousand objects into a bucket, then you should probably keep a list of them somewhere with an index, such as AppEngine datastore or bigtable, because asking for a bucket listing containing millions of objects can take a long time."
That makes me concerned that directory listing will get slower over time. In addition, when we add the JS side, I think we'll have no choice but to create and upload an archive file (eg. ZIP) so it will be different from Dart.
All that said, my inclination is to go ahead with this change, but let's discuss one more time. It would also be easy to make a dist/upload folder in gulp where we write an archive of whatever should be uploaded for the snapshot builds.
There was a problem hiding this comment.
Yes, sounds like gzip-ing the artifacts is the way to go.
Btw, we do a small amount of clean-up, from the sources in dist/dart before we push to pub (hence the copying over to dist/pub) https://github.com/angular/angular/blob/master/scripts/publish/pub_publish.sh#L34.
How about just changing the tasks that create our three final artifacts - dist/npm, dist/pub and dist/bundle, to put wrap them all in upload as dist/upload/npm, dist/upload/pub, etc.
There was a problem hiding this comment.
But we don't currently run those tasks on Travis, so we don't have them,
right? Would you want to start running pub_publish.sh on travis? It seems
to me that any steps we do when pushing a release don't need to be present
on snapshots.
The dist.tgz was easy, testing it now. I still like the fidelity of
uploading the same structure you'd get from running the build locally.
On Thu, Jul 9, 2015 at 10:40 AM Rado Kirov notifications@github.com wrote:
In .travis.yml
#2952 (comment):
- provider: gcs
This is for project angular-github-babysitter
- access_key_id: GOOGIOQTDBEOPBUAWFZQ
- secret_access_key:
secure: "MEDggllZ5fw4wI9CEUi8WR6jKsKXqdRF/DLxSNC2JpzM5RlVeBm0uqjntYT1Cf1dASvQ2/+vZCUikL/3A48NcoEYRHXGmxu8D6t/SvleQD8Xv434xFOdsa2QqP/HiCtqCLOI5jJz1JVoB5nNyKKZ33ogTUL1LV1TfcrAioyizW8="this bucket has a lifecycle to delete after 1 year:
$ echo '{"rule": [{"action": {"type": "Delete"}, "condition": {"age": 365}}]}' > lifecycle.json
$ gsutil lifecycle set lifecycle.json gs://angular2-snapshots
- bucket: angular2-snapshots
don't delete generated files
- skip_cleanup: true
serve to public at https://storage.googleapis.com/angular2-snapshots/SHA/dart_stable/path/to.file
- acl: public-read
Upload just enough files to mirror pub.
Be careful how many files are uploaded. 10k files makes the build time out. 1k seems to work.
- local-dir: dist/dart/angular2
Yes, sounds like gzip-ing the artifacts is the way to go.
Btw, we do a small amount of clean-up, from the sources in dist/dart
before we push to pub (hence the copying over to dist/pub)
https://github.com/angular/angular/blob/master/scripts/publish/pub_publish.sh#L34
.How about just changing the tasks that create our three final artifacts -
dist/npm, dist/pub and dist/bundle, to put wrap them all in upload as
dist/upload/npm, dist/upload/pub, etc.—
Reply to this email directly or view it on GitHub
https://github.com/angular/angular/pull/2952/files#r34281590.
There was a problem hiding this comment.
Without running scripts/publish/pubspec_cleaner.js the dist/dart is invalid and cannot be synced with Google either. I had to add dry_run option to pub_publish so I can run the modification without publishing for the sync script.
But if we reduce npm_publish and pub_publish to a simple copy, the dist.zip will be enough as it is. That would require moving pubspec_cleaner.js to build.dart which is not crazy.
second attempt after rollback of angular#2946 After each successful build in the dart stable variant, this uploads just enough of the dart artifacts to mirror what we would push to pub. By uploading the files instead of a zip, this lets dart users depend on an unreleased snapshot of angular2, and lets us easily fetch the dart artifacts for sync into google3 without having to re-build (potentially in a subtly different environment). This doesn't upload anything for pull requests.
|
okay, ready to merge, LG? |
|
LGTM. |
|
Merged in fe49a7f |
|
Filed #2969 to followup on the On Thu, Jul 9, 2015 at 12:58 PM Rado Kirov notifications@github.com wrote:
|
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
second attempt after rollback of #2946
After each successful build in the dart stable variant, this uploads just enough of the dart
artifacts to mirror what we would push to pub.
By uploading the files instead of a zip, this lets dart users depend on an unreleased snapshot
of angular2, and lets us easily fetch the dart artifacts for sync into google3
without having to re-build (potentially in a subtly different environment).
This doesn't upload anything for pull requests.
NOTE: this time I've scaled this back and tested properly. https://travis-ci.org/alexeagle/angular/jobs/70157553 uploaded its result to https://console.developers.google.com/project/resonant-tower-260/storage/browser/angular2-snapshots/e3c6f83df9ad0ee621d6bb1c81df63a4c277cbb5/