I have setup the CICD pipeline in bitbucket and I have amplify the folder in the repository to get the backend configuration. Right now I have setup the development environment and works fine. Existing bitbucket-pipeline.yml
pipelines:
default:
- step:
name: 'Install NPM and Angular'
script:
- npm update -g
- npm install npm@latest -g
- npm install -g @angular/cli
- step:
name: 'Build project'
script:
- npm install --force
- npm run build
- echo "Build Success"
custom:
Build:
- step:
name: 'Install NPM and Angular'
script:
- npm update -g
- npm install npm@latest -g
- npm install -g @angular/cli
- step:
name: 'Build project'
script:
- cd dist
- npm install --force
- npm run build
- echo "Build Success"
but I need to add production and development in the same repository.
Without amplify folder how to configure in the bitbucket pipeline when I try this I got this exception.
+ amplify configure --amplifyAppId '$AMPLIFY_APP_ID' --envName development --region 'dev'
Downloading release from https://package.cli.amplify.aws/11.0.2/amplify-pkg-linux-x64.tgz
amplify has been installed!
11.0.2
Follow these steps to set up access to your AWS account:
Sign in to your AWS administrator account:
https://console.aws.amazon.com/
Press Enter to continue
New bitbucket-pipelines.yml
pipelines:
branches:
production:
- step:
name: Deploy to production
deployment: production
caches:
- node
script:
- npm install -g @aws-amplify/cli
- amplify configure --amplifyAppId ${AMPLIFY_APP_ID} --envName development --region ${AWS_REGION}
- amplify pull
- npm run build
Test:
- step:
name: Deploy to Test
deployment: Test
caches:
- node
script:
- npm install -g @aws-amplify/cli
- amplify configure --amplifyAppId ${AMPLIFY_APP_ID} --envName development --region ${AWS_REGION}
Do we need to add multiple amplify folders for development and production ?