Snippets

Frederik Banke VueJS to S3 pipeline

Created by Frederik Banke

File bitbucket-pipelines.yml Added

  • Ignore whitespace
  • Hide word diff
+image: node:8.11.3
+
+pipelines:
+  default:
+    - step:
+        caches:
+          - node
+        script: 
+          - echo "VUE_APP_FIREBASE_APIKEY="$VUE_APP_FIREBASE_APIKEY >> .env.local
+          - echo "VUE_APP_FIREBASE_AUTHDOMAIN="$VUE_APP_FIREBASE_AUTHDOMAIN >> .env.local
+          - echo "VUE_APP_FIREBASE_DATABASEURL="$VUE_APP_FIREBASE_DATABASEURL >> .env.local
+          - echo "VUE_APP_FIREBASE_PROJECTID="$VUE_APP_FIREBASE_PROJECTID >> .env.local
+          - echo "VUE_APP_FIREBASE_STORAGEBUCKET="$VUE_APP_FIREBASE_STORAGEBUCKET >> .env.local
+          - echo "VUE_APP_FIREBASE_SENDERID="$VUE_APP_FIREBASE_SENDERID >> .env.local
+          - echo "VUE_APP_API_BASE_URL="$VUE_APP_API_BASE_URL >> .env.local
+          - npm install
+          - npm test
+          - npm run build
+        artifacts:
+          - dist/**
+    - step:
+        # set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as environment variables
+        name: Deploy to S3
+        deployment: test   # set to test, staging or production
+        trigger: manual 
+        image: atlassian/pipelines-awscli
+        script:
+          - aws s3 sync --delete dist s3://xxx.xxx.xx