Skip to content

Commit 1f64121

Browse files
Restore deploy and migrate queue_pusher to go111 (#928)
* Migrate queue_pusher to go111 * Restore deploy of queue_pusher for all projects.
1 parent 158a487 commit 1f64121

File tree

6 files changed

+510
-23
lines changed

6 files changed

+510
-23
lines changed

.travis.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,15 @@ deploy:
175175

176176
## Service: queue-pusher -- AppEngine Standard Environment.
177177
## Removed for issue https://github.com/m-lab/etl/issues/751
178+
- provider: script
179+
script:
180+
GOPATH=$HOME/go111 $TRAVIS_BUILD_DIR/travis/deploy_app.sh mlab-sandbox
181+
SERVICE_ACCOUNT_mlab_sandbox $TRAVIS_BUILD_DIR/appengine/queue_pusher
182+
skip_cleanup: true
183+
on:
184+
repo: m-lab/etl
185+
all_branches: true
186+
condition: $TRAVIS_BRANCH == qp-sandbox-*
178187

179188
## Service: cloud function -- AppEngine Flexible Environment.
180189
- provider: script
@@ -231,7 +240,7 @@ deploy:
231240
on:
232241
repo: m-lab/etl
233242
all_branches: true
234-
condition: $TRAVIS_BRANCH == sandbox-*
243+
condition: $TRAVIS_BRANCH == sandbox-*
235244

236245

237246
## Service: etl-universal-parser -- AppEngine Flexible Environment.
@@ -275,16 +284,15 @@ deploy:
275284
script:
276285
$TRAVIS_BUILD_DIR/travis/activate_service_account.sh SERVICE_ACCOUNT_mlab_staging
277286
&& gcloud app deploy --project=mlab-staging $TRAVIS_BUILD_DIR/appengine/queue.yaml
278-
&&
279-
travis/kubectl.sh mlab-staging data-processing ./apply-cluster.sh
280-
&&
281-
$TRAVIS_BUILD_DIR/travis/run_with_application_credentials.sh mlab-staging
282-
SERVICE_ACCOUNT_mlab_staging $TRAVIS_BUILD_DIR/cmd/update-schema update-schema
283-
&&
284-
BIGQUERY_DATASET="tmp_ndt"
285-
$TRAVIS_BUILD_DIR/travis/kubectl.sh mlab-staging data-processing ./apply-cluster.sh
287+
&& GOPATH=$HOME/go111 $TRAVIS_BUILD_DIR/travis/deploy_app.sh mlab-staging
288+
SERVICE_ACCOUNT_mlab_staging $TRAVIS_BUILD_DIR/appengine/queue_pusher
289+
&& travis/kubectl.sh mlab-staging data-processing ./apply-cluster.sh
290+
&& $TRAVIS_BUILD_DIR/travis/run_with_application_credentials.sh mlab-staging
291+
SERVICE_ACCOUNT_mlab_staging $TRAVIS_BUILD_DIR/cmd/update-schema update-schema
292+
&& BIGQUERY_DATASET="tmp_ndt"
293+
$TRAVIS_BUILD_DIR/travis/kubectl.sh mlab-staging data-processing ./apply-cluster.sh
286294
&& $TRAVIS_BUILD_DIR/travis/deploy_app.sh mlab-staging
287-
SERVICE_ACCOUNT_mlab_staging $TRAVIS_BUILD_DIR/cmd/etl_worker app-batch.yaml
295+
SERVICE_ACCOUNT_mlab_staging $TRAVIS_BUILD_DIR/cmd/etl_worker app-batch.yaml
288296
&& cd $TRAVIS_BUILD_DIR/functions
289297
&& gcloud functions deploy createStagingTaskOnFileNotification --project=mlab-staging --stage-bucket=functions-mlab-staging --trigger-event=providers/cloud.storage/eventTypes/object.change --trigger-resource=archive-mlab-staging
290298
&& gcloud functions deploy createStagingTaskOnEmbargoFileNotification --project=mlab-staging --stage-bucket=functions-mlab-staging --trigger-event=providers/cloud.storage/eventTypes/object.change --trigger-resource=embargo-mlab-staging
@@ -333,7 +341,9 @@ deploy:
333341
script:
334342
$TRAVIS_BUILD_DIR/travis/activate_service_account.sh SERVICE_ACCOUNT_mlab_oti
335343
&& $TRAVIS_BUILD_DIR/travis/run_with_application_credentials.sh mlab-oti
336-
SERVICE_ACCOUNT_mlab_oti $TRAVIS_BUILD_DIR/cmd/update-schema update-schema
344+
SERVICE_ACCOUNT_mlab_oti $TRAVIS_BUILD_DIR/cmd/update-schema update-schema
345+
&& GOPATH=$HOME/go111 $TRAVIS_BUILD_DIR/travis/deploy_app.sh mlab-oti
346+
SERVICE_ACCOUNT_mlab_oti $TRAVIS_BUILD_DIR/appengine/queue_pusher
337347
# && $TRAVIS_BUILD_DIR/etl-schema/schema/sync_tables_with_schema.sh mlab-oti base_tables nodryrun
338348
skip_cleanup: true
339349
on:

appengine/queue_pusher/app.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
runtime: go
2-
api_version: go1
1+
runtime: go111
32
service: queue-pusher
43

54
handlers:
65
- url: /.*
7-
script: _go_app
6+
script: auto
87

98
env_variables:
109
# These should be substituted in the travis deployment script.
1110
RELEASE_TAG: ${TRAVIS_TAG}
12-
COMMIT_HASH: ${TRAVIS_COMMIT}
11+
COMMIT_HASH: ${TRAVIS_COMMIT}

appengine/queue_pusher/go.mod

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module github.com/m-lab/etl-queue-pusher
2+
3+
go 1.11
4+
5+
require (
6+
cloud.google.com/go v0.62.0 // indirect
7+
cloud.google.com/go/bigquery v1.10.0 // indirect
8+
github.com/go-test/deep v1.0.7 // indirect
9+
github.com/m-lab/etl v2.4.3+incompatible
10+
github.com/m-lab/go v0.1.42 // indirect
11+
github.com/prometheus/client_golang v1.7.1 // indirect
12+
google.golang.org/appengine v1.6.6
13+
)

0 commit comments

Comments
 (0)