项目作者: brennerm

项目描述 :
Concourse CI resource for packages in APT repos
高级语言: Python
项目地址: git://github.com/brennerm/apt-repo-resource.git
创建时间: 2018-07-15T20:11:31Z
项目社区:https://github.com/brennerm/apt-repo-resource

开源协议:

下载


Concourse CI APT repository resource

This Concourse CI resource will check for updated versions of a package in an APT repository.

Usage

The source is configured as follows:

  • repositories: list of repositories in sources.list format, e.g. “deb http://archive.ubuntu.com/ubuntu xenial main”
  • package: name of the package to query for new versions

The resource will provide at least the following two files:

  • $resource_dir/package: contains the name of the package
  • $resource_dir/version: contains the version of the package

If the parameter “download_deb” is set to True the .deb file will be available as well.
It’s name can be found in “$resource_dir/filename”.

Example

  1. resource_types:
  2. - name: apt-package
  3. type: docker-image
  4. source:
  5. repository: brennerm/apt-repo-resource
  6. tag: latest
  7. resources:
  8. - name: gitlab-deploy
  9. type: git
  10. source:
  11. uri: git@gitlab.company.com:ansible/gitlab-deploy.git
  12. - name: gitlab-package
  13. type: apt-package
  14. source:
  15. repositories:
  16. - deb https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ xenial main
  17. package: gitlab-ce
  18. jobs:
  19. - plan:
  20. - get: docker-package-xenial
  21. trigger: true
  22. - get: gitlab-deploy
  23. - task: deploy gitlab
  24. config:
  25. image_resource:
  26. type: docker-image
  27. source:
  28. repository: ansible
  29. tag: latest
  30. platform: linux
  31. inputs:
  32. - name: gitlab-deploy
  33. - name: gitlab-package
  34. run:
  35. path: /bin/bash
  36. args:
  37. - -c
  38. - |
  39. cd gitlab-deploy
  40. ansible-playbook -e "version=$(cat ../gitlab-package/version)" gitlab.yml