This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: python:2.7 | |
before_script: | |
- echo "deb http://packages.cloud.google.com/apt cloud-sdk-jessie main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list | |
- curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
- apt-get update && apt-get install google-cloud-sdk | |
after_script: | |
- rm /tmp/$CI_PIPELINE_ID.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: node:latest | |
cache: | |
paths: | |
- node_modules/ | |
- app/bower_components | |
deploy_production: | |
stage: deploy | |
environment: Production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: python:2.7 | |
.deploy_template: &global_deploy_def | |
stage: deploy | |
before_script: | |
- echo "deb http://packages.cloud.google.com/apt cloud-sdk-jessie main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list | |
- curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
- apt-get update && apt-get install google-cloud-sdk | |
after_script: | |
- source .gitlab-ci.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rules": { | |
"queue": { | |
"tasks": { | |
"$task_id": { | |
".validate": "newData.hasChildren(['apiKey', 'someValue', 'anotherValue']) && root.child('apiKeys').child(apiKey).val() != null", | |
"apiKey": { | |
".validate": "newData.isString()" | |
}, | |
"someValue": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path /messages/{message_id} is Timestamped<Message>; | |
type Message { | |
id: FirebaseId | |
message_hash: Immutable<MD5Hash>, | |
message: String, | |
author: FirebaseId, | |
create() { isSignedIn() } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Message { | |
message: String, | |
author: FirebaseId, | |
create() { isSignedIn() } | |
read() { isSignedIn() } | |
update() { isCurrentUser(this.author) } | |
delete() { isCurrentUser(this.author) } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var visitsRef = firebase.database().ref('/visits'); | |
visitsRef.on('child_added', function (snapshot) { | |
var visitData = snapshot.val(); | |
var visitId = snapshot.key; | |
var updates = {}; | |
updates[util.format('/meta-data/visits/%s', visitId)] = { | |
created: firebase.database.ServerValue.TIMESTAMP, | |
modified: firebase.database.ServerValue.TIMESTAMP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path /visits/{visit_id} is Visit { | |
read() { canManageBusiness(this.businessId) } | |
write() { canManageBusiness(this.businessId) } | |
} | |
path /businessVisits/{business_id}/{visit_id} is Visit { | |
read() { canManageBusiness(business_id) } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Push the code up to the Google Cloud Repository | |
- git config credential.helper gcloud.sh | |
- git remote add google https://source.developers.google.com/p/$PROJECT_ID/r/default | |
- git push google --all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.deploy_gcp_template: &gcp_deploy_def | |
stage: gcp_deploy | |
before_script: | |
- echo "deb http://packages.cloud.google.com/apt cloud-sdk-jessie main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list | |
- curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
- apt-get update && apt-get install -y google-cloud-sdk | |
after_script: | |
- gcloud auth activate-service-account --key-file .tmp-keyfile.json |
OlderNewer