MonkCode

Exploring the digital world!

Bitbucket Pipelines

I use bitbucket for private projects. I just exceeded my build minutes.

bitbucket minutes

I need to switch my pipeline from default which builds on every commit to custom where I can manually choose when to deploy:

pipelines:
  default:
    - step:
        name: gatsby build artifact
        script:
          - node -v
          - npm install
          - npm install --global gatsby-cli
          - gatsby build
          - ls public
        artifacts:
          - public/**
    - step:
        name: deploy to s3 monkcode.com
        deployment: production
        script:
        - pipe: atlassian/aws-s3-deploy:0.4.0
          variables:
            AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
            AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
            AWS_DEFAULT_REGION: 'us-east-1'
            S3_BUCKET: 'monkcode.com'
            LOCAL_PATH: 'public'

I am hoping this will resolve my overbuilding on every commit, will have to wait until they give me more minutes to test.

pipelines:
  custom:
    gatsby:
      - step:
          name: gatsby build artifact
          script:
            - node -v
            - npm install
            - npm install --global gatsby-cli
            - gatsby build
            - ls public
          artifacts:
            - public/**
      - step:
          name: deploy to s3 monkcode.com
          deployment: production
          script:
          - pipe: atlassian/aws-s3-deploy:0.4.0
            variables:
              AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
              AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
              AWS_DEFAULT_REGION: 'us-east-1'
              S3_BUCKET: 'monkcode.com'
              LOCAL_PATH: 'public'