bitbucket-pipelines.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. # This is a sample build configuration for Docker.
  2. # Check our guides at https://confluence.atlassian.com/x/O1toN for more examples.
  3. # Only use spaces to indent your .yml configuration.
  4. # -----
  5. # You can specify a custom docker image from Docker Hub as your build environment.
  6. # image: atlassian/default-image:latest
  7. # enable Docker for your repository
  8. options:
  9. docker: true
  10. image: kdanmobile/10.14.2:latest
  11. pipelines:
  12. branches:
  13. master:
  14. - step:
  15. script:
  16. - yarn install
  17. - yarn test
  18. - NODE_ENV=production ENV=production yarn build
  19. - docker build -t ${AWS_REGISTRY_URL}/pdf-reader-web:production --build-arg BRANCH=$BITBUCKET_BRANCH --build-arg COMMIT=$BITBUCKET_COMMIT --build-arg ENV=production .
  20. - eval $(aws ecr get-login --region ${AWS_DEFAULT_REGION} --no-include-email)
  21. - docker push ${AWS_REGISTRY_URL}/pdf-reader-web:production
  22. develop:
  23. - step:
  24. script:
  25. - yarn install
  26. # - yarn test
  27. - NODE_ENV=production ENV=preparing yarn build
  28. - docker build -t ${AWS_REGISTRY_URL}/pdf-reader-web:preparing --build-arg BRANCH=$BITBUCKET_BRANCH --build-arg COMMIT=$BITBUCKET_COMMIT --build-arg ENV=preparing .
  29. - eval $(aws ecr get-login --region ${AWS_DEFAULT_REGION} --no-include-email)
  30. - docker push ${AWS_REGISTRY_URL}/pdf-reader-web:preparing