diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 94caa36..803c471 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,10 +58,11 @@ test1: environment: name: test1 url: https://test1.startinblox.com + before_script: + - npm ci --cache .npm --prefer-offline --only=production script: - - echo "$APP_CONFIG_TEST1" > config.json + - echo "$APP_CONFIG_TEST2" > config.json - echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key - - npm install - npm run build - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test1@astral.startinblox.com:~/front/ only: @@ -75,10 +76,11 @@ test2: environment: name: test2 url: https://test2.startinblox.com + before_script: + - npm ci --cache .npm --prefer-offline --only=production script: - echo "$APP_CONFIG_TEST2" > config.json - echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key - - npm install - npm run build - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test2@astral.startinblox.com:~/front/ only: @@ -92,10 +94,11 @@ test3: environment: name: test3 url: https://test3.startinblox.com + before_script: + - npm ci --cache .npm --prefer-offline --only=production script: - - echo "$APP_CONFIG_TEST3" > config.json + - echo "$APP_CONFIG_TEST2" > config.json - echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key - - npm install - npm run build - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* test3@astral.startinblox.com:~/front/ only: @@ -109,10 +112,11 @@ stg1: environment: name: stg1 url: https://stg1.startinblox.com + before_script: + - npm ci --cache .npm --prefer-offline --only=production script: - - echo "$APP_CONFIG_STG1" > config.json + - echo "$APP_CONFIG_TEST2" > config.json - echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key - - npm install - npm run build - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* stg1@astral.startinblox.com:~/front/ only: @@ -126,10 +130,11 @@ stg2: environment: name: stg2 url: https://stg2.startinblox.com + before_script: + - npm ci --cache .npm --prefer-offline --only=production script: - - echo "$APP_CONFIG_STG2" > config.json + - echo "$APP_CONFIG_TEST2" > config.json - echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key - - npm install - npm run build - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* stg2@astral.startinblox.com:~/front/ only: @@ -157,10 +162,11 @@ community: environment: name: community url: https://community.startinblox.com + before_script: + - npm ci --cache .npm --prefer-offline --only=production script: - - echo "$APP_CONFIG_COMMUNITY" > config.json + - echo "$APP_CONFIG_TEST2" > config.json - echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key - - npm install - npm run build - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* community@astral.startinblox.com:~/front/ only: @@ -174,10 +180,11 @@ etuc: environment: name: etuc url: https://app.digitalplatformobservatory.org + before_script: + - npm ci --cache .npm --prefer-offline --only=production script: - - echo "$APP_CONFIG_DIGITALPLATFORMOBSERVATORY" > config.json + - echo "$APP_CONFIG_TEST2" > config.json - echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key - - npm install - npm run build - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* etuc@ssh-etuc.happy-dev.fr:~/sib/www/ only: @@ -191,10 +198,11 @@ nantes: environment: name: nantes url: https://app.nantes.happy-dev.fr + before_script: + - npm ci --cache .npm --prefer-offline --only=production script: - - echo "$APP_CONFIG_NANTESHD" > config.json + - echo "$APP_CONFIG_TEST2" > config.json - echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key - - npm install - npm run build - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* nantes@ssh-nantes.happy-dev.fr:~/sib/www/ only: @@ -208,10 +216,11 @@ paris: environment: name: paris url: https://app.paris.happy-dev.fr + before_script: + - npm ci --cache .npm --prefer-offline --only=production script: - - echo "$APP_CONFIG_PARIS" > config.json + - echo "$APP_CONFIG_TEST2" > config.json - echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key - - npm install - npm run build - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* paris@ssh-paris.happy-dev.fr:~/sib/www/ only: @@ -225,10 +234,11 @@ toulouse: environment: name: toulouse url: https://smart-toulouse.happy-dev.fr + before_script: + - npm ci --cache .npm --prefer-offline --only=production script: - - echo "$APP_CONFIG_TOULOUSE" > config.json + - echo "$APP_CONFIG_TEST2" > config.json - echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key - - npm install - npm run build - scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* smart-toulouse@ssh-smart-toulouse.happy-dev.fr:~/www/ only: