56 lines
2.0 KiB
YAML
56 lines
2.0 KiB
YAML
image: node:14.17.1
|
|
|
|
definitions:
|
|
services:
|
|
docker:
|
|
memory: 3072
|
|
pipelines:
|
|
branches:
|
|
feature/VRFS-5283:
|
|
# - step:
|
|
# name: Build Container Image
|
|
# script:
|
|
# - docker build .
|
|
# services:
|
|
# - docker
|
|
- step: push-gcp
|
|
name: Push to GCP registry
|
|
image: google/cloud-sdk:alpine
|
|
script:
|
|
- echo $GCLOUD_API_KEYFILE | base64 -d > ./gcloud-api-key.json
|
|
- gcloud auth activate-service-account --key-file gcloud-api-key.json
|
|
- gcloud config set project $GCLOUD_PROJECT
|
|
develop:
|
|
- step:
|
|
name: Build Staging
|
|
script:
|
|
- cd jam-ui
|
|
- npm install
|
|
- CI=false REACT_APP_ORIGIN=staging.jamkazam.com REACT_APP_LEGACY_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
|
|
deployment: staging
|
|
script:
|
|
- pipe: atlassian/aws-s3-deploy:1.1.0
|
|
variables:
|
|
S3_BUCKET: "jamkazam-ui/stg"
|
|
LOCAL_PATH: "jam-ui/build"
|
|
- step:
|
|
name: Build Production
|
|
script:
|
|
- cd jam-ui
|
|
- npm install
|
|
- CI=false REACT_APP_ORIGIN=jamkazam.com REACT_APP_LEGACY_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
|
|
artifacts:
|
|
- jam-ui/build/**
|
|
|
|
- step:
|
|
name: Deploy to production
|
|
deployment: production
|
|
script:
|
|
- pipe: atlassian/aws-s3-deploy:1.1.0
|
|
variables:
|
|
S3_BUCKET: "jamkazam-ui/prd"
|
|
LOCAL_PATH: "jam-ui/build" |