Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

Commit

Permalink
Release (#23)
Browse files Browse the repository at this point in the history
* Project import generated by Copybara.

PiperOrigin-RevId: 162346017

* Project import generated by Copybara.

PiperOrigin-RevId: 162346017

* Project import generated by Copybara.

PiperOrigin-RevId: 162346017

* Project import generated by Copybara.

PiperOrigin-RevId: 162346017

* Project import generated by Copybara.

PiperOrigin-RevId: 162346017

* Project import generated by Copybara.

PiperOrigin-RevId: 162346017

* Project import generated by Copybara.

PiperOrigin-RevId: 162346017

* Project import generated by Copybara.

PiperOrigin-RevId: 162346017

* Project import generated by Copybara.

PiperOrigin-RevId: 162346017

* Project import generated by Copybara.

PiperOrigin-RevId: 162346017

* Project import generated by Copybara.

PiperOrigin-RevId: 162346017

* Project import generated by Copybara.

PiperOrigin-RevId: 162346017

* Project import generated by Copybara.

PiperOrigin-RevId: 162346017

* Project import generated by Copybara.

PiperOrigin-RevId: 162346017

* Project import generated by Copybara.

PiperOrigin-RevId: 162346017
  • Loading branch information
Philmod authored Aug 1, 2017
1 parent b7117e4 commit 3ef6136
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ steps:
entrypoint: 'bash'
args: ['-c', './integration_tests/run_tests_on_vm.sh']

timeout: '20m'
timeout: '20m'
14 changes: 9 additions & 5 deletions localbuilder_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ func run(source string) error {
buildConfig.Substitutions = substMap
}

// Get the ProjectId to feed both the build and the metadata server.
// This command uses a runner without dryrun to return the real project.
projectInfo, err := gcloud.ProjectInfo(&runner.RealRunner{})
if err != nil {
return fmt.Errorf("Error getting project information from gcloud: %v", err)
}
buildConfig.ProjectId = projectInfo.ProjectID

// Validate the build.
if err := validate.CheckBuild(buildConfig); err != nil {
return fmt.Errorf("Error validating build: %v", err)
Expand Down Expand Up @@ -180,11 +188,7 @@ func run(source string) error {
metadataUpdater := metadata.RealUpdater{Local: true}
defer metadataUpdater.Stop(r)

// Get project info to feed the metadata server.
projectInfo, err := gcloud.ProjectInfo(r)
if err != nil {
return fmt.Errorf("Error getting project information from gcloud: %v", err)
}
// Feed the project info to the metadata server.
metadataUpdater.SetProjectInfo(projectInfo)

go supplyTokenToMetadata(metadataUpdater, r)
Expand Down

0 comments on commit 3ef6136

Please sign in to comment.