@@ -234,22 +234,28 @@ const hiveConfigSecret = new ServiceSecret('hive-config-secret', {
234
234
usageAccessToken : hiveConfig . requireSecret ( 'cliAccessToken' ) ,
235
235
} ) ;
236
236
237
- const publishGraphQLSchemaCommand = publishGraphQLSchema ( {
238
- graphql,
239
- registry : {
240
- endpoint : `https://${ environment . appDns } /registry` ,
241
- accessToken : hiveConfigSecret . raw . usageAccessToken ,
242
- target : hiveConfig . require ( 'target' ) ,
243
- } ,
244
- version : {
245
- commit : imagesTag ,
246
- } ,
247
- schemaPath : graphqlSchemaAbsolutePath ,
248
- } ) ;
237
+ // You can change this to `false` in cases when you don't want to publish commands.
238
+ // For example, if the entire env is down or if you are having SSL issues.
239
+ const RUN_PUBLISH_COMMANDS : boolean = true ;
240
+
241
+ const publishGraphQLSchemaCommand = RUN_PUBLISH_COMMANDS
242
+ ? publishGraphQLSchema ( {
243
+ graphql,
244
+ registry : {
245
+ endpoint : `https://${ environment . appDns } /registry` ,
246
+ accessToken : hiveConfigSecret . raw . usageAccessToken ,
247
+ target : hiveConfig . require ( 'target' ) ,
248
+ } ,
249
+ version : {
250
+ commit : imagesTag ,
251
+ } ,
252
+ schemaPath : graphqlSchemaAbsolutePath ,
253
+ } )
254
+ : null ;
249
255
250
256
let publishAppDeploymentCommand : pulumi . Resource | undefined ;
251
257
252
- if ( hiveAppPersistedDocumentsAbsolutePath ) {
258
+ if ( hiveAppPersistedDocumentsAbsolutePath && RUN_PUBLISH_COMMANDS ) {
253
259
publishAppDeploymentCommand = publishAppDeployment ( {
254
260
appName : 'hive-app' ,
255
261
registry : {
@@ -268,7 +274,7 @@ if (hiveAppPersistedDocumentsAbsolutePath) {
268
274
dockerSecret : docker . secret ,
269
275
} ,
270
276
// We need to wait until the new GraphQL schema is published before we can publish the app deployment.
271
- dependsOn : [ publishGraphQLSchemaCommand ] ,
277
+ dependsOn : publishGraphQLSchemaCommand ? [ publishGraphQLSchemaCommand ] : [ ] ,
272
278
} ) ;
273
279
}
274
280
@@ -316,18 +322,6 @@ deployCloudFlareSecurityTransform({
316
322
'/api/github' ,
317
323
'/api/slack' ,
318
324
] ,
319
- ignoredHosts : [
320
- // Ignore CSP for Production CDN
321
- 'cdn.graphql-hive.com' ,
322
- // Staging
323
- 'staging.graphql-hive.com' ,
324
- 'app.staging.graphql-hive.com' ,
325
- 'cdn.staging.graphql-hive.com' ,
326
- // Dev
327
- 'dev.graphql-hive.com' ,
328
- 'app.dev.graphql-hive.com' ,
329
- 'cdn.dev.graphql-hive.com' ,
330
- ] ,
331
325
} ) ;
332
326
333
327
export const graphqlApiServiceId = graphql . service . id ;
0 commit comments