2025-02-27 13:47:45 +00:00
|
|
|
image: node:14.21.3
|
2021-10-19 13:06:04 +00:00
|
|
|
|
|
|
|
|
pipelines:
|
|
|
|
|
branches:
|
2025-03-03 13:18:54 +00:00
|
|
|
develop:
|
2025-02-27 13:47:45 +00:00
|
|
|
- step:
|
|
|
|
|
name: Build Staging
|
|
|
|
|
script:
|
|
|
|
|
- pushd jam-ui
|
|
|
|
|
- npm install
|
|
|
|
|
- popd
|
|
|
|
|
- pushd jam-ui/cicd
|
|
|
|
|
- npm install
|
|
|
|
|
- NODE_ENV=production ENVIRONMENT=staging ./generate.sh
|
|
|
|
|
- popd
|
|
|
|
|
- cd jam-ui
|
|
|
|
|
- NODE_ENV=production CI=false REACT_APP_ORIGIN=staging.jamkazam.com REACT_APP_CLIENT_BASE_URL=https://staging.jamkazam.com REACT_APP_API_BASE_URL=https://staging.jamkazam.com/api REACT_APP_BITBUCKET_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER REACT_APP_BITBUCKET_COMMIT=$BITBUCKET_COMMIT npm run build
|
|
|
|
|
artifacts:
|
|
|
|
|
- jam-ui/build/**
|
|
|
|
|
- step:
|
|
|
|
|
name: Deploy to staging - SPA
|
|
|
|
|
script:
|
|
|
|
|
- pipe: atlassian/aws-s3-deploy:1.6.2
|
|
|
|
|
variables:
|
|
|
|
|
S3_BUCKET: "jamkazam-ui/stg"
|
|
|
|
|
LOCAL_PATH: "jam-ui/build"
|
|
|
|
|
EXTRA_ARGS: "--exclude=*backing-tracks/*"
|
|
|
|
|
- step:
|
|
|
|
|
name: Deploy to staging - backing-tracks
|
|
|
|
|
script:
|
|
|
|
|
- pipe: atlassian/aws-s3-deploy:1.6.2
|
|
|
|
|
variables:
|
|
|
|
|
S3_BUCKET: "jamkazam-ui/stg/backing-tracks"
|
|
|
|
|
LOCAL_PATH: "jam-ui/build/backing-tracks"
|
|
|
|
|
EXTRA_ARGS: "--exclude=*.js --content-type text/html"
|
|
|
|
|
- step:
|
|
|
|
|
name: Deploy to staging - backing-tracks js
|
|
|
|
|
script:
|
|
|
|
|
- pipe: atlassian/aws-s3-deploy:1.6.2
|
|
|
|
|
variables:
|
|
|
|
|
S3_BUCKET: "jamkazam-ui/stg/js"
|
|
|
|
|
LOCAL_PATH: "jam-ui/build/js"
|
|
|
|
|
EXTRA_ARGS: "--content-type text/javascript"
|
2025-03-03 13:18:54 +00:00
|
|
|
# - step:
|
|
|
|
|
# name: Deploy to staging - invalidate cloudfront distribution
|
|
|
|
|
# deployment: staging
|
|
|
|
|
# script:
|
|
|
|
|
# - pipe: atlassian/aws-cloudfront-invalidate:0.10.1
|
|
|
|
|
# variables:
|
|
|
|
|
# DISTRIBUTION_ID: "E2AQIC9RSON94Q" # ESQDIABYLT0RV
|
2025-03-03 13:23:46 +00:00
|
|
|
custom:
|
|
|
|
|
build-and-deploy-to-production:
|
2025-02-27 13:47:45 +00:00
|
|
|
- step:
|
2025-03-03 13:18:54 +00:00
|
|
|
name: Build Production
|
2021-10-19 13:06:04 +00:00
|
|
|
script:
|
2025-03-03 13:18:54 +00:00
|
|
|
- pushd jam-ui
|
|
|
|
|
- npm install
|
|
|
|
|
- popd
|
|
|
|
|
- pushd jam-ui/cicd
|
|
|
|
|
- npm install
|
|
|
|
|
- NODE_ENV=production ENVIRONMENT=production ./generate.sh
|
|
|
|
|
- popd
|
2021-10-19 13:07:07 +00:00
|
|
|
- cd jam-ui
|
2025-03-03 13:18:54 +00:00
|
|
|
- NODE_ENV=production CI=false REACT_APP_ORIGIN=jamkazam.com REACT_APP_CLIENT_BASE_URL=https://www.jamkazam.com REACT_APP_API_BASE_URL=https://www.jamkazam.com/api REACT_APP_BITBUCKET_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER REACT_APP_BITBUCKET_COMMIT=$BITBUCKET_COMMIT npm run build
|
|
|
|
|
|
2021-10-19 13:06:04 +00:00
|
|
|
artifacts:
|
2021-10-19 20:16:35 +00:00
|
|
|
- jam-ui/build/**
|
2021-10-19 13:06:04 +00:00
|
|
|
- step:
|
2025-03-03 13:18:54 +00:00
|
|
|
name: Deploy to production - SPA
|
2021-10-26 07:58:39 +00:00
|
|
|
script:
|
2025-02-27 13:47:45 +00:00
|
|
|
- pipe: atlassian/aws-s3-deploy:1.6.2
|
2021-10-26 07:58:39 +00:00
|
|
|
variables:
|
2025-03-03 13:18:54 +00:00
|
|
|
S3_BUCKET: "jamkazam-ui/prd"
|
2021-10-26 07:58:39 +00:00
|
|
|
LOCAL_PATH: "jam-ui/build"
|
2025-03-03 13:18:54 +00:00
|
|
|
EXTRA_ARGS: "--exclude=*backing-tracks/*"
|
2021-10-26 14:48:45 +00:00
|
|
|
- step:
|
2025-03-03 13:18:54 +00:00
|
|
|
name: Deploy to production - backing-tracks
|
2021-10-26 14:48:45 +00:00
|
|
|
script:
|
2025-03-03 13:18:54 +00:00
|
|
|
- pipe: atlassian/aws-s3-deploy:1.6.2
|
|
|
|
|
variables:
|
|
|
|
|
S3_BUCKET: "jamkazam-ui/prd/backing-tracks"
|
|
|
|
|
LOCAL_PATH: "jam-ui/build/backing-tracks"
|
|
|
|
|
EXTRA_ARGS: "--exclude=*.js --content-type text/html"
|
2021-10-26 07:58:39 +00:00
|
|
|
- step:
|
2025-03-03 13:18:54 +00:00
|
|
|
name: Deploy to production - backing-tracks js
|
2021-10-19 13:06:04 +00:00
|
|
|
script:
|
2025-03-03 13:18:54 +00:00
|
|
|
- pipe: atlassian/aws-s3-deploy:1.6.2
|
2021-10-19 13:06:04 +00:00
|
|
|
variables:
|
2025-03-03 13:18:54 +00:00
|
|
|
S3_BUCKET: "jamkazam-ui/prd/js"
|
|
|
|
|
LOCAL_PATH: "jam-ui/build/js"
|
|
|
|
|
EXTRA_ARGS: "--content-type text/javascript"
|
|
|
|
|
#- step:
|
|
|
|
|
# name: Deploy to production - invalidate cloudfront distribution
|
|
|
|
|
# deployment: production
|
|
|
|
|
# script:
|
|
|
|
|
# - pipe: atlassian/aws-cloudfront-invalidate:0.10.1
|
|
|
|
|
# variables:
|
|
|
|
|
# DISTRIBUTION_ID: "ESQDIABYLT0RV"
|