gitlab-app.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #
  2. # gitlab-app.yml - Template CI/CD for gulp
  3. #
  4. # Inputs:
  5. # APP "app"
  6. # AWS_PROFILE ACCOUNT
  7. # PROFILE dev, release, prod, ...
  8. # Outputs
  9. # build/app/ rendered pages
  10. #
  11. stages:
  12. - build
  13. - publish
  14. - deploy
  15. variables:
  16. APP: "app"
  17. before_script:
  18. - set -e
  19. - ./configure --profile ${PROFILE}
  20. - eval $(paks/assist/secrets --env '' --profile "${PROFILE}" --aws-profile "${AWS_PROFILE}" get || echo exit 2)
  21. build-app:
  22. stage: build
  23. script:
  24. - ./paks/assist/build-parts --profile "${PROFILE}"
  25. - mkdir -p ${APP}/build
  26. artifacts:
  27. expire_in: 1 hour
  28. name: "rendered"
  29. paths:
  30. - ${APP}/build/
  31. tags: ['macosx']
  32. publish-app:
  33. stage: publish
  34. script:
  35. - ./paks/assist/publish-parts --profile "${PROFILE}"
  36. only: [ 'tags', 'triggers', 'schedules', 'web', 'api' ]
  37. except:
  38. variables:
  39. - $DEPLOY =~ /no-deploy/
  40. tags: ['macosx']
  41. deploy-app:
  42. stage: deploy
  43. script:
  44. - ./paks/assist/deploy-parts --profile "${PROFILE}"
  45. only: [ 'tags', 'triggers', 'schedules', 'web', 'api' ]
  46. except:
  47. variables:
  48. - $DEPLOY =~ /no-deploy/
  49. tags: ['macosx']
  50. when: manual