From e67b108cccc26a1b2caecc5d379635ade04c7010 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 13 Jan 2020 12:51:34 +0000 Subject: [PATCH 1/2] Initial Bitbucket Pipelines configuration --- bitbucket-pipelines.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 bitbucket-pipelines.yml diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml new file mode 100644 index 000000000..6d6d35bd1 --- /dev/null +++ b/bitbucket-pipelines.yml @@ -0,0 +1,28 @@ +# This is a sample build configuration for JavaScript. +# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples. +# Only use spaces to indent your .yml configuration. +# ----- +# You can specify a custom docker image from Docker Hub as your build environment. +image: node:10.15.3 + +pipelines: + branches: + master: + - step: + caches: + - node + script: # Modify the commands below to build your repository. + - cd ng6-seed + - npm install + - npm install -g @angular/cli + - ng build + - ls -ltr + - cd dist + - pipe: atlassian/aws-s3-deploy:0.3.8 + variables: + AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY + AWS_DEFAULT_REGION: 'ap-south-1' + S3_BUCKET: 'autodeploy001' + LOCAL_PATH: $(pwd) + \ No newline at end of file From cdccb2448a738e386d83158fd65616b11c8b3b42 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 13 Jan 2020 13:07:43 +0000 Subject: [PATCH 2/2] Delete Flag added and build script added --- bitbucket-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 6d6d35bd1..dcc46a56f 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -15,7 +15,7 @@ pipelines: - cd ng6-seed - npm install - npm install -g @angular/cli - - ng build + - npm run staging - ls -ltr - cd dist - pipe: atlassian/aws-s3-deploy:0.3.8 @@ -25,4 +25,5 @@ pipelines: AWS_DEFAULT_REGION: 'ap-south-1' S3_BUCKET: 'autodeploy001' LOCAL_PATH: $(pwd) + DELETE_FLAG: 'true' \ No newline at end of file