项目作者: for-the-new-order

项目描述 :
Reusable Azure Pipelines Build Templates used to deploy containerized bots
高级语言:
项目地址: git://github.com/for-the-new-order/BuildTemplates.git
创建时间: 2020-03-28T16:09:25Z
项目社区:https://github.com/for-the-new-order/BuildTemplates

开源协议:MIT License

下载


BuildTemplates

Reusable Azure Pipelines Build Templates used to deploy containerized bots

How to use

In another project, in your YAML build (azure-pipelines.yml), configure your build to use this template, see below for a working YAML example.

You need to create the following services:

  • An SSH Endpoint (named Google Cloud Bots in the example)
  • A Docker Registry endpoint (named Docker Hub in the example)
  • Have a secure environment file to read secrets from when running the container (named ogechobot.env in the example)
  • A git repository endpoint to pull the templates from (named for-the-new-order in the example)
  1. trigger:
  2. branches:
  3. include:
  4. - master
  5. pool:
  6. name: Hosted Ubuntu 1604
  7. variables:
  8. bot.image: 'carlhugo/ogechobot'
  9. bot.imageName: 'ogechobot'
  10. bot.sshEndpoint: 'Google Cloud Bots'
  11. bot.dockerRegistryEndpoint: 'Docker Hub'
  12. bot.envFile: 'ogechobot.env'
  13. resources:
  14. repositories:
  15. - repository: shared
  16. type: github
  17. name: for-the-new-order/BuildTemplates
  18. endpoint: for-the-new-order
  19. jobs:
  20. - template: BuildAndDeployBot.yml@shared
  21. parameters:
  22. bot:
  23. image: $(bot.image)
  24. imageName: $(bot.imageName)
  25. sshEndpoint: $(bot.sshEndpoint)
  26. dockerRegistryEndpoint: $(bot.dockerRegistryEndpoint)
  27. envFile: $(bot.envFile)
  28. buildNumber: $(Build.BuildNumber)