File tree 4 files changed +20
-6
lines changed
4 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 15
15
name : Checks
16
16
needs : [ check-tag-version-job ]
17
17
uses : ./.github/workflows/checks.yml
18
+ secrets : inherit
18
19
19
20
cd-job :
20
21
name : Continues Delivery
Original file line number Diff line number Diff line change @@ -13,3 +13,7 @@ This release adds integration tests for the most important calls to SaaS API.
13
13
14
14
* #14 : Added fixture waiting until SaaS database is running
15
15
* #25 : Fixed transitive dependencies required by generated API client
16
+
17
+ ## Bugfixes
18
+
19
+ * #34 : Fixed handling secrets in CI/CD build
Original file line number Diff line number Diff line change @@ -139,17 +139,18 @@ def database(
139
139
yield db
140
140
wait_for_delete_clearance (start )
141
141
finally :
142
+ db_repr = f"{ db .name } with ID { db .id } "
142
143
if db and not keep :
143
- LOG .info (f"Deleting database { db . name } " )
144
+ LOG .info (f"Deleting database { db_repr } " )
144
145
response = self .delete_database (db .id , ignore_delete_failure )
145
146
if response .status_code == 200 :
146
- LOG .info (f"Successfully deleted database { db . name } ." )
147
+ LOG .info (f"Successfully deleted database { db_repr } ." )
147
148
else :
148
149
LOG .warning (f"Ignoring status code { response .status_code } ." )
149
150
elif not db :
150
151
LOG .warning ("Cannot delete db None" )
151
152
else :
152
- LOG .info (f"Keeping database { db . name } as keep = { keep } " )
153
+ LOG .info (f"Keeping database { db_repr } as keep = { keep } " )
153
154
154
155
def get_database (self , database_id : str ) -> openapi .models .database .Database :
155
156
return get_database .sync (
Original file line number Diff line number Diff line change 9
9
timestamp_name ,
10
10
)
11
11
12
+
13
+ def _env (var : str ) -> str :
14
+ result = os .environ .get (var )
15
+ if result :
16
+ return result
17
+ raise RuntimeError (f"Environment variable { var } is empty." )
18
+
19
+
12
20
@pytest .fixture (scope = "session" )
13
21
def saas_host () -> str :
14
- return os . environ [ "SAAS_HOST" ]
22
+ return _env ( "SAAS_HOST" )
15
23
16
24
17
25
@pytest .fixture (scope = "session" )
18
26
def saas_pat () -> str :
19
- return os . environ [ "SAAS_PAT" ]
27
+ return _env ( "SAAS_PAT" )
20
28
21
29
22
30
@pytest .fixture (scope = "session" )
23
31
def saas_account_id () -> str :
24
- return os . environ [ "SAAS_ACCOUNT_ID" ]
32
+ return _env ( "SAAS_ACCOUNT_ID" )
25
33
26
34
27
35
@pytest .fixture (scope = "session" )
You can’t perform that action at this time.
0 commit comments