Skip to content

Commit 3ece1e3

Browse files
committed
Fix snapshots test
1 parent 78f2a20 commit 3ece1e3

File tree

13 files changed

+32
-10
lines changed

13 files changed

+32
-10
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
build:
66
machine:
77
# Check https://circleci.com/developer/machine/image/ubuntu-2004 for details:
8-
image: ubuntu-2004:202201-02
8+
image: default
99
docker_layer_caching: true
1010
steps:
1111
- checkout

api/management/commands/ingest_ns_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def handle(self, *args, **kwargs):
1717

1818
# Fetch country codes
1919
country_code_url = "https://go-api.ifrc.org/api/NationalSocietiesContacts/"
20-
headers = {'Authorization': 'Basic Z290ZXN0dXNlcjoxMjM0NTY='}
20+
headers = {'Authorization': f'Basic {settings.NS_DOCUMENT_API_TOKEN}'}
2121
country_code_response = requests.get(url=country_code_url, headers=headers)
2222

2323
if country_code_response.status_code != 200:

capacity.xlsx

-95.1 KB
Binary file not shown.

deploy/bin/deploy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,5 @@ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
171171
--set env.ACAPS_API_TOKEN=${TF_VAR_ACAPS_API_TOKEN} \
172172
--set env.NS_DOCUMENT_API_KEY=${TF_VAR_NS_DOCUMENT_API_KEY} \
173173
--set env.NS_INITIATIVES_API_KEY=${TF_VAR_NS_INITIATIVES_API_KEY}
174+
--set env.NS_INITIATIVES_API_KEY=${NS_DOCUMENT_API_TOKEN}\
174175
fi

deploy/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ services:
7575
- TF_VAR_ACAPS_API_TOKEN=${ACAPS_API_TOKEN}
7676
- TF_VAR_NS_DOCUMENT_API_KEY=${NS_DOCUMENT_API_KEY}
7777
- TF_VAR_NS_INITIATIVES_API_KEY=${NS_INITIATIVES_API_KEY}
78+
- TF_VAR_NS_INITIATIVES_API_TOKEN=${NS_INITIATIVES_API_TOKEN}
7879
# Maintenance mode
7980
- TF_VAR_DJANGO_READ_ONLY=${DJANGO_READ_ONLY}
8081
# IFRC dynamic translation

deploy/helm/ifrcgo-helm/templates/config/secret.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ stringData:
4848
ACAPS_API_TOKEN: "{{ .Values.env.ACAPS_API_TOKEN}}"
4949
NS_DOCUMENT_API_KEY: "{{ .Values.env.NS_DOCUMENT_API_KEY}}"
5050
NS_INITIATIVES_API_KEY: "{{ .Values.env.NS_INITIATIVES_API_KEY}}"
51+
NS_INITIATIVES_API_TOKEN: "{{ .Values.env.NS_INITIATIVES_API_TOKEN}}"

deploy/helm/ifrcgo-helm/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ env:
5555
ACAPS_API_TOKEN: ''
5656
NS_DOCUMENT_API_KEY: ''
5757
NS_INITIATIVES_API_KEY: ''
58+
NS_DOCUMENT_API_TOKEN: ''
5859

5960
secrets:
6061
API_TLS_CRT: ''

deploy/terraform/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ module "resources" {
6565
ACAPS_API_TOKEN= var.ACAPS_API_TOKEN
6666
NS_DOCUMENT_API_KEY= var.NS_DOCUMENT_API_KEY
6767
NS_INITIATIVES_API_KEY= var.NS_INITIATIVES_API_KEY
68+
NS_INITIATIVES_API_TOKEN = var.NS_INITIATIVES_API_TOKEN
6869

6970
terraform {
7071
backend "azurerm" {

deploy/terraform/resources/helm-ifrcgo.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,4 +240,9 @@ resource "helm_release" "ifrcgo" {
240240
name = "env.NS_INITIATIVES_API_KEY"
241241
value = var.NS_INITIATIVES_API_KEY
242242
}
243+
244+
set {
245+
name = "env.NS_INITIATIVES_API_TOKEN"
246+
value = var.NS_INITIATIVES_API_TOKEN
247+
}
243248
}

deploy/terraform/resources/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ variable "NS_INITIATIVES_API_KEY" {
281281
default = ""
282282
}
283283

284+
variable "NS_DOCUMENT_API_TOKEN" {
285+
type = string
286+
default = ""
287+
}
288+
284289
# -----------------
285290
# Attach ACR
286291
# Defaults to common resources

0 commit comments

Comments
 (0)