fog-google 1.3.3 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +1 -5
  4. data/.travis.yml +3 -0
  5. data/CHANGELOG.md +79 -0
  6. data/CONTRIBUTING.md +9 -10
  7. data/README.md +5 -5
  8. data/ci/README.md +5 -10
  9. data/ci/credentials.yml.template +28 -0
  10. data/ci/pipeline.yml +72 -11
  11. data/ci/tasks/run-int.sh +2 -1
  12. data/ci/tasks/run-int.yml +1 -0
  13. data/examples/create_instance.rb +4 -4
  14. data/examples/get_list_images.rb +1 -1
  15. data/examples/load-balance.rb +1 -1
  16. data/examples/metadata.rb +1 -1
  17. data/examples/network.rb +1 -1
  18. data/examples/storage_json.rb +1 -1
  19. data/fog-google.gemspec +3 -1
  20. data/lib/fog/compute/google.rb +2 -0
  21. data/lib/fog/compute/google/mock.rb +0 -19
  22. data/lib/fog/compute/google/models/disk.rb +12 -5
  23. data/lib/fog/compute/google/models/instance_group.rb +4 -0
  24. data/lib/fog/compute/google/models/network.rb +8 -2
  25. data/lib/fog/compute/google/models/server.rb +28 -4
  26. data/lib/fog/compute/google/models/servers.rb +1 -0
  27. data/lib/fog/compute/google/models/subnetworks.rb +1 -1
  28. data/lib/fog/compute/google/models/target_pool.rb +12 -1
  29. data/lib/fog/compute/google/requests/insert_disk.rb +12 -5
  30. data/lib/fog/compute/google/requests/insert_server.rb +6 -1
  31. data/lib/fog/compute/google/requests/insert_url_map.rb +12 -1
  32. data/lib/fog/compute/google/requests/set_server_metadata.rb +2 -0
  33. data/lib/fog/google/shared.rb +1 -2
  34. data/lib/fog/google/version.rb +1 -1
  35. data/lib/fog/storage/google_json/models/file.rb +31 -1
  36. data/lib/fog/storage/google_json/requests/put_object.rb +22 -12
  37. data/lib/fog/storage/google_xml/models/directory.rb +2 -3
  38. data/lib/fog/storage/google_xml/models/file.rb +2 -13
  39. data/lib/fog/storage/google_xml/requests/put_bucket.rb +1 -1
  40. data/lib/fog/storage/google_xml/requests/put_object.rb +1 -1
  41. data/lib/fog/storage/google_xml/requests/put_object_acl.rb +11 -2
  42. data/lib/fog/storage/google_xml/utils.rb +11 -0
  43. data/tasks/test.rake +63 -1
  44. data/test/integration/compute/addresses/addresses_shared.rb +1 -1
  45. data/test/integration/compute/test_compute_addresses_collection.rb +4 -3
  46. data/test/integration/compute/test_compute_networks_collection.rb +9 -6
  47. data/test/integration/compute/test_servers.rb +9 -0
  48. data/test/integration/compute/test_target_pools.rb +22 -0
  49. data/test/integration/factories/collection_factory.rb +1 -1
  50. data/test/integration/monitoring/test_timeseries.rb +78 -28
  51. data/test/integration/storage/test_files.rb +1 -1
  52. data/test/integration/storage/test_objects.rb +6 -0
  53. data/test/integration/test_authentication.rb +0 -18
  54. data/test/unit/compute/test_common_collections.rb +31 -0
  55. data/test/unit/compute/test_common_models.rb +36 -0
  56. metadata +39 -6
  57. data/ci/credentials.yml.tpl +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b60274f37b6c27b7f7ca99c2e6da44c688e42de0
4
- data.tar.gz: 334ebad30e1cc9c16148b5733c851ebef0bf4687
3
+ metadata.gz: 25f56693e0f8c005b505e5e23f0204d1b75fd266
4
+ data.tar.gz: 8df393b29cf36efd2326f9304aef1863b1333b4e
5
5
  SHA512:
6
- metadata.gz: 26ccb1f592a38548a673c8424985f77b9fcdbaf8968d0bb7b76c02cb932afac3153686c24f084f7c84716654152ca4e71812183d791c406918d9b75212b7377b
7
- data.tar.gz: 7a0ad20aa3c081a831596e7c546f58011523aa68a81dc56ff100c65a794f3abb0d5d003c49c4f2f3b0ca73a43f91b7e44892b271188a2593ab6d089c360c4378
6
+ metadata.gz: b95a1e585ae9ba8955cbb83cd750947b298b38460b2f0ad36359d499824ad0223ad1bc48d98f1ee2a2092ab217d668a99a42e3b1807d2f8401eb2999eef53e8c
7
+ data.tar.gz: 4059adc10b104329118784615ae0121f2af762ee1816d206ef05a0b8bb80c9fd60cdb882a7e6969db76043d52d7135ec8d8d0934e1ef95ada3c3303328863320
data/.gitignore CHANGED
@@ -17,3 +17,4 @@ mkmf.log
17
17
  .DS_Store
18
18
  .env
19
19
  .fog
20
+ .byebug_history
data/.rubocop.yml CHANGED
@@ -17,7 +17,7 @@ Style/FrozenStringLiteralComment:
17
17
  Enabled: false
18
18
 
19
19
  Style/HashSyntax:
20
- EnforcedStyle: hash_rockets
20
+ EnforcedStyle: no_mixed_keys
21
21
 
22
22
  # HoundCI config
23
23
 
@@ -59,7 +59,6 @@ Style/IfUnlessModifier:
59
59
  Description: Favor modifier if/unless usage when you have a single-line body.
60
60
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
61
61
  Enabled: false
62
- MaxLineLength: 80
63
62
  Style/OptionHash:
64
63
  Description: Don't use option hashes when you can use keyword arguments.
65
64
  Enabled: false
@@ -241,9 +240,6 @@ Lint/HandleExceptions:
241
240
  Description: Don't suppress exception.
242
241
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
243
242
  Enabled: false
244
- Lint/LiteralInCondition:
245
- Description: Checks of literals used in conditions.
246
- Enabled: false
247
243
  Lint/LiteralInInterpolation:
248
244
  Description: Checks for literals used in interpolation.
249
245
  Enabled: false
data/.travis.yml CHANGED
@@ -12,6 +12,9 @@ matrix:
12
12
  - rvm: 2.5
13
13
  - rvm: jruby-head
14
14
  allow_failures:
15
+ # allow 2.5 to fail until Travis CI is fixed.
16
+ # See travis-ci/travis-ci#8969
17
+ - rvm: 2.5
15
18
  - rvm: jruby-head
16
19
  notifications:
17
20
  email: false
data/CHANGELOG.md ADDED
@@ -0,0 +1,79 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+ The format is loosely based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
4
+
5
+ ## 1.4.0
6
+
7
+ ### User-facing
8
+
9
+ #### Added
10
+
11
+ - \#336 `Fog::Compute::Google::Server.set_metadata` is now working properly and adopted a simpler format, e.g. `{'foo' => 'bar', 'baz'=>'foo'}`
12
+ - \#334 Added a new helper method: `Fog::Compute::Google::Server.public_ip_address` [temikus]
13
+ - \#314 Added `Fog::Compute::Google::InstanceGroup.add_instance` method back [temikus]
14
+ - \#326 Added support for using predefined ACLs, refactor valid ACLs [vimutter]
15
+ - \#318 Added fog_public support in Storage JSON API [jayhsu21]
16
+
17
+ #### Fixed
18
+
19
+ - \#354 Bump Google API client to 0.23 [temikus]
20
+ - \#346 Fixed get_health when called with an instance name [bpaquet]
21
+ - \#317 Fixed source_image selection to get the image from name if the format is not compatible with new Google API Client [temikus]
22
+ - \#321 Fix string key instead of symbol for subnetworks listing [tumido]
23
+ - \#351 Fixed trailing spaces and added data presence check to `Fog::Storage::GoogleJSON.put_object` [vimutter]
24
+
25
+ ### Development changes
26
+
27
+ #### Added
28
+
29
+ - \#353 Added collection/model unit tests to be run by Travis CI [temikus]
30
+ - \#347 Added target pool tests [temikus]
31
+
32
+ #### Fixed
33
+
34
+ - \#322 Fixed all broken integration tests, all tests now pass in CI [temikus]
35
+ - \#344 Updated CI pipeline to run in parallel, broke out test tasks [temikus]
36
+
37
+ ## 1.0.1
38
+
39
+ \#290 - Fixes paperclip integration
40
+ \#288 - Fixes typo in server network code
41
+
42
+ ## 1.0.0
43
+
44
+ 1.0.0!!!!!!!!!!!!
45
+
46
+ This rewrites everything except for the legacy storage backend!
47
+
48
+ Shoutout to @emilymye, @Temikus, @DawidJanczak, @Everlag and everyone who has been asking for this for ~forever.
49
+
50
+ We did this major refactor because as of version 0.9, google-api-client rewrote their entire api, thus limiting our ability to integrate with google APIs, and also running into a bunch of deprecated gem collisions.
51
+
52
+ You no longer need to require google-api-client, we are now doing that for you.
53
+
54
+ HELP: We need help testing. Please report bugs! As this is a complete rewrite of the request layer, there are undoubetedly bugs. We had to throw away most of our tests, and due to the time this has taken us, we chose to ship, instead of writing tests for everything all over again. If you would like to write tests, we would love your PRs, as well as any ideas you have about how we can test this code better.
55
+
56
+ Thanks!
57
+
58
+ ## 0.6.0
59
+
60
+ NOTE: New Monitoring models are not compatible in any way to old ones because of significant rewrite to monitoring api since v2beta2.
61
+
62
+ ## 0.5.5
63
+
64
+ Adds support for SSL certificates, https proxies and global IP addresses: #244
65
+
66
+ ## 0.5.4
67
+
68
+ Fixes a storage bug #224 and fixes an issue with compute snapshots #240
69
+
70
+ ## 0.5.3
71
+
72
+ Fixes a bunch of bugs and adds subnetworks support.
73
+
74
+ PRs that change functionality: #212, #215, #203, #198, #201, #221, #222, #216
75
+
76
+ ## 0.5.2
77
+
78
+ Rapid-releasing 0.5.2 due to regression fixed by #190 still present in v0.5.1
79
+ We encourage people using 0.5.1 to upgrade.
data/CONTRIBUTING.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  New contributors are always welcome, and when in doubt please ask questions! We strive to be an open and welcoming community. Please be nice to one another.
4
4
 
5
- I recommend heading over to fog's [CONTRIBUTING](https://github.com/fog/fog/blob/master/CONTRIBUTING.md) and having a look around as well. It has information and context about the state of the `fog` project as a whole.
5
+ We recommend heading over to fog's [CONTRIBUTING](https://github.com/fog/fog/blob/master/CONTRIBUTING.md) and having a look around as well. It has information and context about the state of the `fog` project as a whole.
6
6
 
7
7
  ### Coding
8
8
 
@@ -56,19 +56,16 @@ This module is tested with [Minitest](https://github.com/seattlerb/minitest). R
56
56
  test:
57
57
  google_project: my-project
58
58
  google_client_email: xxxxxxxxxxxxx-xxxxxxxxxxxxx@developer.gserviceaccount.com
59
- google_key_location: /path/to/my-project-xxxxxxxxxxxxx.p12
60
59
  google_json_key_location: /path/to/my-project-xxxxxxxxxxxxx.json
61
60
  ```
62
61
 
63
- Note that you need both a `.p12` and a `.json` key file for all the tests to pass.
64
-
65
62
  Then you can run all the live tests:
66
63
 
67
64
  ```shell
68
65
  $ rake test
69
66
  ```
70
67
 
71
- or just one:
68
+ or just one file:
72
69
 
73
70
  ```shell
74
71
  $ rake test TEST=test/integration/compute/test_servers.rb TESTOPTS="--name=TestServers#test_bootstrap_ssh_destroy"
@@ -76,13 +73,15 @@ $ rake test TEST=test/integration/compute/test_servers.rb TESTOPTS="--name=TestS
76
73
 
77
74
  #### The transition from `shindo` to Minitest
78
75
 
79
- Previously, [shindo](https://github.com/geemus/shindo) was the primary testing framework. We've started moving away from it, and to Minitest, but some artifacts remain.
76
+ Previously, [shindo](https://github.com/geemus/shindo) was the primary testing framework. We've started moving away from it, and to Minitest, but some artifacts may remain.
77
+
78
+ For more information on transition, read [#50](https://github.com/fog/fog-google/issues/50).
79
+
80
+ #### Continuous integration
80
81
 
81
- - The `test` directory contains the new Minitest tests, which currently only cover live integration testing for `compute`.
82
- - The `tests` directory contains the old `shindo` tests, which generally pass if mocking is turned on. No promises if mocking is off.
83
- - Travis CI runs the mocked `shindo` tests, though hopefully in the long run it will run the unit and integration `Minitest` tests. Currently, Google maintains its own Jenkins instance that runs the Minitest integraiton tests.
82
+ Currently Google maintains a [Concourse CI](https://concourse-ci.org/) server, running a pipeline defined in `ci` folder. It automatically runs all integration tests against every pull-request marked with `integration` label.
84
83
 
85
- Follow [#50](https://github.com/fog/fog-google/issues/50) for the status of the transition from `shindo` to Minitest.
84
+ For more information on the pipeline please refer to the [ci README](https://github.com/fog/fog-google/blob/master/ci/README.md).
86
85
 
87
86
  #### Some notes about the tests as they stand
88
87
 
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Fog::Google
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/fog-google.svg)](http://badge.fury.io/rb/fog-google) [![Build Status](https://travis-ci.org/fog/fog-google.svg?branch=master)](https://travis-ci.org/fog/fog-google) [![Dependency Status](https://gemnasium.com/fog/fog-google.svg)](https://gemnasium.com/fog/fog-google) [![Coverage Status](https://img.shields.io/coveralls/fog/fog-google.svg)](https://coveralls.io/r/fog/fog-google) [![Code Climate](https://codeclimate.com/github/fog/fog-google.png)](https://codeclimate.com/github/fog/fog-google)
3
+ [![Gem Version](https://badge.fury.io/rb/fog-google.svg)](http://badge.fury.io/rb/fog-google) [![Build Status](https://travis-ci.org/fog/fog-google.svg?branch=master)](https://travis-ci.org/fog/fog-google) [![Coverage Status](https://img.shields.io/coveralls/fog/fog-google.svg)](https://coveralls.io/r/fog/fog-google) [![Maintainability](https://api.codeclimate.com/v1/badges/18f585fe1b9e6dbb6794/maintainability)](https://codeclimate.com/github/fog/fog-google/maintainability)
4
4
 
5
5
  The main maintainers for the Google sections are @icco, @Temikus and @plribeiro3000. Please send pull requests to them.
6
6
 
@@ -13,12 +13,12 @@ The main maintainers for the Google sections are @icco, @Temikus and @plribeiro3
13
13
 
14
14
  There are two ways to access [Google Cloud Storage](https://cloud.google.com/storage/). The old S3 API and the new JSON API. `Fog::Storage::Google` will automatically direct you to the appropriate API based on the credentials you provide it.
15
15
 
16
- * The [XML API](https://developers.google.com/storage/docs/xml-api-overview) is almost identical to S3. Use [Google's interoperability keys](https://cloud.google.com/storage/docs/migrating#keys) to access it.
17
- * The new [JSON API](https://developers.google.com/storage/docs/json_api/) is faster and uses auth similarly to the rest of the Google Cloud APIs using a [service account private key](https://developers.google.com/identity/protocols/OAuth2ServiceAccount).
16
+ * The [XML API](https://cloud.google.com/storage/docs/xml-api-overview/) is almost identical to S3. Use [Google's interoperability keys](https://cloud.google.com/storage/docs/migrating#keys) to access it.
17
+ * The new [JSON API](https://cloud.google.com/storage/docs/json_api/) is faster and uses auth similarly to the rest of the Google Cloud APIs using a [service account private key](https://developers.google.com/identity/protocols/OAuth2ServiceAccount).
18
18
 
19
19
  ## Compute
20
20
 
21
- Google Compute Engine is a Virtual Machine hosting service. Currently it is built on version [v1](https://developers.google.com/compute/docs/reference/v1/) of the GCE API.
21
+ Google Compute Engine is a Virtual Machine hosting service. Currently it is built on version [v1](https://cloud.google.com/compute/docs/reference/v1/) of the GCE API.
22
22
 
23
23
  As of 2017-12-15, we are still working on making Fog for Google Compute engine (`Fog::Compute::Google`) feature complete. If you are using Fog to interact with GCE, please keep Fog up to date and [file issues](https://github.com/fog/fog-google/issues) for any anomalies you see or features you would like.
24
24
 
@@ -41,7 +41,7 @@ We are always looking for people to improve our code and test coverage, so pleas
41
41
 
42
42
  Note: You **must** have a version of google-api-client > 0.8.5 to use the Pub/Sub API; previous versions will not work.
43
43
 
44
- Fog mostly implements [v1](https://cloud.google.com/pubsub/reference/rest/) of the Google Cloud Pub/Sub API; however some less common API methods are missing. Pull requests for additions would be greatly appreciated.
44
+ Fog mostly implements [v1](https://cloud.google.com/pubsub/docs/reference/rest/) of the Google Cloud Pub/Sub API; however some less common API methods are missing. Pull requests for additions would be greatly appreciated.
45
45
 
46
46
  ## Installation
47
47
 
data/ci/README.md CHANGED
@@ -1,11 +1,6 @@
1
1
  # fog-google CI
2
2
 
3
- This pipeline performs two functions.
4
-
5
- 1. Performing an integration test of the
6
- upgrade-google-client branch whenever new changes appear there.
7
-
8
- 1. Running integration tests against every PR with the
3
+ This pipeline performs integration tests against every PR with the
9
4
  `integrate` label. This allows whitelisted PRs to be tested
10
5
  automatically before being merged. Status is updated on the
11
6
  PR when the test completes.
@@ -14,7 +9,7 @@ PR when the test completes.
14
9
 
15
10
  In order to run the fog-google Concourse Pipeline you must have an existing
16
11
  [Concourse](http://concourse.ci) environment.
17
- See [Deploying Concourse on Google Compute Engine](https://github.com/cloudfoundry-incubator/bosh-google-cpi-release/blob/master/docs/deploy_concourse.md)
12
+ See [Deploying Concourse on Google Compute Engine](https://github.com/cloudfoundry-incubator/bosh-google-cpi-release/blob/master/docs/concourse/README.md)
18
13
  for instructions.
19
14
 
20
15
  To deploy the pipeline:
@@ -24,7 +19,7 @@ To deploy the pipeline:
24
19
  * Login to your Concourse:
25
20
 
26
21
  ```
27
- fly -t fog-google login -c <YOUR CONCOURSE URL>
22
+ fly -t fog-ci login -c <YOUR CONCOURSE URL>
28
23
  ```
29
24
 
30
25
  * Update the [credentials.yml](https://github.com/fog/fog-google/blob/master/ci/credentials.yml.tpl)
@@ -33,13 +28,13 @@ file. See [Credentials Requirements](#credentials-requirements) for specific ins
33
28
  * Set the fog-google pipeline:
34
29
 
35
30
  ```
36
- fly -t fog-google set-pipeline -p fog-google -c pipeline.yml -l credentials.yml
31
+ fly -t fog-ci set-pipeline -p fog-google -c pipeline.yml -l credentials.yml
37
32
  ```
38
33
 
39
34
  * Unpause the fog-google pipeline:
40
35
 
41
36
  ```
42
- fly -t fog-google unpause-pipeline -p fog-google
37
+ fly -t fog-ci unpause-pipeline -p fog-google
43
38
  ```
44
39
 
45
40
  ## Credentials Requirements
@@ -0,0 +1,28 @@
1
+ ---
2
+ # Google Cloud Platform project to run under
3
+ google_project:
4
+ # Google Compute Engine Service Account email
5
+ google_client_email:
6
+ # Google Compute Engine Service Account JSON
7
+ google_json_key_data: |
8
+ {
9
+ "type": "service_account",
10
+ "project_id": "myproject",
11
+ "private_key_id": "number",
12
+ "private_key": "-----BEGIN PRIVATE KEY-----\nIAMAVERYLONGKEYAMA==\n-----END PRIVATE KEY-----\n",
13
+ "client_email": "account@myproject.iam.gserviceaccount.com",
14
+ "client_id": "7435873987592347",
15
+ "auth_uri": "https://accounts.google.com/o/oauth2/auth",
16
+ "token_uri": "https://accounts.google.com/o/oauth2/token",
17
+ "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
18
+ "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/account%40myproject.iam.gserviceaccount.com"
19
+ }
20
+
21
+ # An access token with repo:status access from an account that has push access to the repo
22
+ github_access_token:
23
+ # A SSH private key associated with the access token's account or
24
+ # a repo push deploy key
25
+ github_private_key: |
26
+ -----BEGIN RSA PRIVATE KEY-----
27
+ IAMAVERYLONGKEYAMA=
28
+ -----END RSA PRIVATE KEY-----
data/ci/pipeline.yml CHANGED
@@ -1,19 +1,22 @@
1
1
  jobs:
2
- - name: base-int
2
+ - name: integration-tests-compute
3
3
  plan:
4
- - aggregate:
5
- - {
6
- get: fog-google-src, resource: fog-google-src-in, trigger: true
7
- }
4
+ - get: fog-google-src
5
+ resource: pull-request
6
+ version: every
7
+ trigger: true
8
+ - put: pull-request
9
+ params: {path: fog-google-src, status: pending}
8
10
 
9
11
  - task: full-integration-tests
10
12
  file: fog-google-src/ci/tasks/run-int.yml
11
13
  params:
14
+ rake_task: test:compute
12
15
  google_project: {{google_project}}
13
16
  google_json_key_data: {{google_json_key_data}}
14
17
  google_client_email: {{google_client_email}}
15
18
 
16
- - name: pr-int
19
+ - name: integration-tests-monitoring
17
20
  plan:
18
21
  - get: fog-google-src
19
22
  resource: pull-request
@@ -25,9 +28,72 @@ jobs:
25
28
  - task: full-integration-tests
26
29
  file: fog-google-src/ci/tasks/run-int.yml
27
30
  params:
31
+ rake_task: test:monitoring
28
32
  google_project: {{google_project}}
29
33
  google_json_key_data: {{google_json_key_data}}
30
34
  google_client_email: {{google_client_email}}
35
+
36
+ - name: integration-tests-pubsub
37
+ plan:
38
+ - get: fog-google-src
39
+ resource: pull-request
40
+ version: every
41
+ trigger: true
42
+ - put: pull-request
43
+ params: {path: fog-google-src, status: pending}
44
+
45
+ - task: full-integration-tests
46
+ file: fog-google-src/ci/tasks/run-int.yml
47
+ params:
48
+ rake_task: test:pubsub
49
+ google_project: {{google_project}}
50
+ google_json_key_data: {{google_json_key_data}}
51
+ google_client_email: {{google_client_email}}
52
+
53
+ - name: integration-tests-sql
54
+ plan:
55
+ - get: fog-google-src
56
+ resource: pull-request
57
+ version: every
58
+ trigger: true
59
+ - put: pull-request
60
+ params: {path: fog-google-src, status: pending}
61
+
62
+ - task: full-integration-tests
63
+ file: fog-google-src/ci/tasks/run-int.yml
64
+ params:
65
+ rake_task: test:sql
66
+ google_project: {{google_project}}
67
+ google_json_key_data: {{google_json_key_data}}
68
+ google_client_email: {{google_client_email}}
69
+
70
+ - name: integration-tests-storage
71
+ plan:
72
+ - get: fog-google-src
73
+ resource: pull-request
74
+ version: every
75
+ trigger: true
76
+ - put: pull-request
77
+ params: {path: fog-google-src, status: pending}
78
+
79
+ - task: full-integration-tests
80
+ file: fog-google-src/ci/tasks/run-int.yml
81
+ params:
82
+ rake_task: test:storage
83
+ google_project: {{google_project}}
84
+ google_json_key_data: {{google_json_key_data}}
85
+ google_client_email: {{google_client_email}}
86
+
87
+ - name: github-pr-aggregator
88
+ plan:
89
+ - get: fog-google-src
90
+ resource: pull-request
91
+ passed: [integration-tests-storage,
92
+ integration-tests-sql,
93
+ integration-tests-pubsub,
94
+ integration-tests-monitoring,
95
+ integration-tests-compute]
96
+ trigger: true
31
97
  on_success:
32
98
  put: pull-request
33
99
  params:
@@ -40,11 +106,6 @@ jobs:
40
106
  status: failure
41
107
 
42
108
  resources:
43
- - name: fog-google-src-in
44
- type: git
45
- source:
46
- uri: https://github.com/fog/fog-google.git
47
- branch: upgrade-google-client
48
109
  - name: pull-request
49
110
  type: pull-request
50
111
  source:
data/ci/tasks/run-int.sh CHANGED
@@ -15,6 +15,7 @@ popd > /dev/null
15
15
  check_param google_project
16
16
  check_param google_client_email
17
17
  check_param google_json_key_data
18
+ check_param rake_task
18
19
 
19
20
  echo $google_json_key_data > `pwd`/service_account_key.json
20
21
 
@@ -29,6 +30,6 @@ pushd ${release_dir} > /dev/null
29
30
 
30
31
  bundle install
31
32
 
32
- FOG_MOCK=false rake test
33
+ FOG_MOCK=false rake ${rake_task}
33
34
 
34
35
  popd > /dev/null
data/ci/tasks/run-int.yml CHANGED
@@ -9,6 +9,7 @@ inputs:
9
9
  run:
10
10
  path: src/fog-google/ci/tasks/run-int.sh
11
11
  params:
12
+ rake_task: replace-me
12
13
  google_project: replace-me
13
14
  google_client_email: replace-me
14
15
  google_json_key_data: |
@@ -12,8 +12,8 @@ def test
12
12
  disk = connection.disks.create(
13
13
  :name => "fog-smoke-test-#{Time.now.to_i}",
14
14
  :size_gb => 10,
15
- :zone_name => "us-central1-f",
16
- :source_image => "debian-8-jessie-v20161215"
15
+ :zone => "us-central1-f",
16
+ :source_image => "debian-8-jessie-v20180329"
17
17
  )
18
18
 
19
19
  disk.wait_for { disk.ready? }
@@ -24,10 +24,10 @@ def test
24
24
  :machine_type => "n1-standard-1",
25
25
  :private_key_path => File.expand_path("~/.ssh/id_rsa"),
26
26
  :public_key_path => File.expand_path("~/.ssh/id_rsa.pub"),
27
- :zone_name => "us-central1-f",
27
+ :zone => "us-central1-f",
28
28
  :username => ENV["USER"],
29
29
  :tags => ["fog"],
30
- :service_accounts => %w(sql-admin bigquery https://www.googleapis.com/auth/compute)
30
+ :service_accounts => { :scopes => %w(sql-admin bigquery https://www.googleapis.com/auth/compute) }
31
31
  )
32
32
 
33
33
  # Wait_for routine copied here to show errors, if necessary.