Conversation
| command: | | ||
| if [[ -n "$GOOGLE_MAPS_API_KEY" ]]; then \ | ||
| echo "GOOGLE_MAPS_API_KEY=$GOOGLE_MAPS_API_KEY" >> secrets.properties | ||
| echo "MAPBOX_ACCESS_TOKEN=$MAPBOX_ACCESS_TOKEN" >> secrets.properties |
There was a problem hiding this comment.
Feels like it would be nicer to have separate conditionals for each of these but I suppose that for our usage it doesn't matter. A fork could presumably want to have only the Mapbox keys.
There was a problem hiding this comment.
Potentially! They could always mod this the config and then submit a PR back if so.
| command: | | ||
| if [[ "$CIRCLE_PROJECT_USERNAME" == "getodk" ]]; then \ | ||
| echo "y" | gcloud beta firebase test android run \ | ||
| echo "y" | gcloud beta firebase test android run \ |
There was a problem hiding this comment.
Should this also be wrapped in the check for the service key?
There was a problem hiding this comment.
Actually, what is the advantage of checking? Should these not just fail if GCLOUD_SERVICE_KEY isn't set? Otherwise, you'd end up with this job passing having done nothing. That would be bad in our situation, but also for a fork that might not realize they're not actually running integration tests.
lognaturel
left a comment
There was a problem hiding this comment.
Couple of questions that only affect forks. I think the GCloud lack of conditional could be annoying for developer forks but I'm not entirely sure, it depends on whether the job would fail.
|
Oh, and you haven't added the keys, right? They'll need to be added before we merge this? |
Yup! |
lognaturel
left a comment
There was a problem hiding this comment.
I have now added the three map-related keys in CircleCI.
This will set up
secrets.propertiesinbuild_releasewhere the following env variables are available:GOOGLE_MAPS_API_KEYMAPBOX_ACCESS_TOKENMAPBOX_DOWNLOADS_TOKEN@lognaturel as far as I can tell from docs (and from playing with SSH builds and the existing
GCLOUD_SERVICE_KEYenv variable) we can add these variables in Circle CI and they will only be available to builds running on branches on the maingetodk/collectrepo.