Skip to content

Commit

Permalink
Merge pull request #1009 from geoadmin/feat-PB-175-google-key
Browse files Browse the repository at this point in the history
PB-175: Changed Google API key path and updated docu - #minor
  • Loading branch information
ltshb authored Jul 18, 2024
2 parents 987f690 + 7f1fcce commit 1428f4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,24 +185,17 @@ For more information about loading environment variables see [Vue - Modes and En
### Tooling for translation update

Our translation master is hosted in a Google Spreadsheet, thus if you want to update translations you will need a valid Google API Key.
One can be found in our `gopass` store `infra-gopass-bgdi`.
One can be found in our AWS SSM store in `swisstopo-bgdi-builder` account.

For this purpose you will need to install [gopass](https://github.com/gopasspw/gopass), and to be more efficient use it with [summon](https://github.com/cyberark/summon).

In order for them to function together, they need to be linked with

```bash
mkdir /usr/local/lib/summon
ln -s $(which gopass) /usr/local/lib/summon/gopass
```
In order to easily access the google API key stored in AWS SSM we use [summon](https://github.com/cyberark/summon) as follow:

Translations can then be updated with

```bash
summon -p gopass npm run update:translations
summon -p ssm npm run update:translations
```

The file `secrets.yml` will tell `summon` which keys to get from `gopass`.
The file `secrets.yml` will tell `summon` which keys to get from AWS SSM.

### List of npm scripts

Expand Down
2 changes: 1 addition & 1 deletion secrets.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# required in order to access the translation spreadsheet (while running `npm run update:translations`)
GOOGLE_API_KEY: !var /google.com/web-mapviewer/api-key --profile swisstopo-bgdi-builder
GOOGLE_API_KEY: !var /google.com/kogis.iwi/tokens/web-mapviewer --profile swisstopo-bgdi-builder
CYPRESS_RECORD_KEY: !var /cypress.io/ppbgdi/web-mapviewer/record-key --profile swisstopo-bgdi-builder

0 comments on commit 1428f4f

Please sign in to comment.