File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed
Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change 1- import { readFileSync } from 'fs' ;
21
32//hosting url
43export const HOST = 'https://bellecour.iex.ec' ;
@@ -17,16 +16,9 @@ export const APP_TAG = ['tee', 'scone'];
1716export const WEB3_MAIL_ENS_NAME_DEV = 'web3mail-dev.apps.iexec.eth' ;
1817export const WEB3_MAIL_ENS_NAME_PROD = 'web3mail.apps.iexec.eth' ;
1918
20- //scone image
21- const SCONIFIER_VERSION = '5.7.5-v12' ;
22- const dappVersion = JSON . parse (
23- readFileSync ( '../dapp/package.json' , 'utf-8' )
24- ) . version ;
2519
2620export const DOCKER_IMAGE_NAMESPACE = 'iexechub' ;
2721export const DOCKER_IMAGE_REPOSITORY = 'web3mail-dapp' ;
28- export const DOCKER_IMAGE_PROD_TAG = `${ dappVersion } -sconify-${ SCONIFIER_VERSION } -production` ;
29- export const DOCKER_IMAGE_DEV_TAG = `dev-${ process . env . GITHUB_SHA } -sconify-${ SCONIFIER_VERSION } -production` ;
3022
3123//GitHub Actions environment variables
3224export const GITHUB_DEPLOY_ENVIRONMENT =
Original file line number Diff line number Diff line change @@ -39,11 +39,12 @@ const main = async () => {
3939
4040 const iexec = getIExec ( privateKey ) ;
4141
42- let dockerImageTag ;
43- if ( deployEnvironment === GITHUB_DEPLOY_TO_DEV ) {
44- dockerImageTag = DOCKER_IMAGE_DEV_TAG ;
45- } else if ( deployEnvironment === GITHUB_DEPLOY_TO_PROD ) {
46- dockerImageTag = DOCKER_IMAGE_PROD_TAG ;
42+ const dockerImageTag = deployEnvironment === GITHUB_DEPLOY_TO_DEV
43+ ? DOCKER_IMAGE_DEV_TAG
44+ : DOCKER_IMAGE_PROD_TAG ;
45+
46+ if ( ! dockerImageTag ) {
47+ throw Error ( `Missing docker image tag for environment ${ deployEnvironment } ` ) ;
4748 }
4849
4950 //deploy app
You can’t perform that action at this time.
0 commit comments