Skip to content

Commit

Permalink
schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ArminaAiren committed Dec 8, 2023
1 parent ce8bcf6 commit cf9d544
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion deploy/tools/envs-validator/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,19 @@ const rollupSchema = yup
}),
});

const rampSchema = yup
.object()
.shape({
NEXT_PUBLIC_RAMP_HOST_API_KEY: yup.string(),
NEXT_PUBLIC_RAMP_DEFAULT_ASSET: yup
.string()
.when('NEXT_PUBLIC_RAMP_HOST_API_KEY', {
is: (value: string) => Boolean(value),
then: (schema) => schema,
otherwise: (schema) => schema.max(-1, 'NEXT_PUBLIC_RAMP_DEFAULT_ASSET cannot not be used without NEXT_PUBLIC_RAMP_HOST_API_KEY'),
}),
});

const adButlerConfigSchema = yup
.object<AdButlerConfig>()
.transform(replaceQuotes)
Expand Down Expand Up @@ -459,6 +472,7 @@ const schema = yup
.concat(rollupSchema)
.concat(beaconChainSchema)
.concat(bridgedTokensSchema)
.concat(sentrySchema);
.concat(sentrySchema)
.concat(rampSchema);

export default schema;
2 changes: 1 addition & 1 deletion deploy/values/review-l2/values.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ frontend:
NEXT_PUBLIC_L1_BASE_URL: https://blockscout-main.k8s-dev.blockscout.com
NEXT_PUBLIC_GRAPHIQL_TRANSACTION: 0x4a0ed8ddf751a7cb5297f827699117b0f6d21a0b2907594d300dc9fed75c7e62
NEXT_PUBLIC_USE_NEXT_JS_PROXY: true
NEXT_PUBLIC_RAMP_DEFAULT_ASSET: "ETH_ETH"
NEXT_PUBLIC_RAMP_DEFAULT_ASSET: "GOERLI_ETH"

envFromSecret:
NEXT_PUBLIC_RAMP_HOST_API_KEY: ref+vault://deployment-values/blockscout/dev/review?token_env=VAULT_TOKEN&address=https://vault.k8s.blockscout.com#/NEXT_PUBLIC_RAMP_HOST_API_KEY
Expand Down

0 comments on commit cf9d544

Please sign in to comment.