Unverified Commit 09367306 authored by Lance Albertson's avatar Lance Albertson Committed by GitHub
Browse files

Merge pull request #259 from sous-chefs/sous-chefs-adoption

Sous Chefs Adoption
parents 6256f39f c6a0a767
---
name: Branch Cleanup
# This workflow is triggered on all closed pull requests.
# However the script does not do anything if a merge was not performed.
"on":
pull_request:
types: [closed]
env:
NO_BRANCH_DELETED_EXIT_CODE: 0
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: jessfraz/branch-cleanup-action@master
---
name: ci
"on":
pull_request:
push:
branches:
- master
jobs:
delivery:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
- name: Run Chef Delivery
uses: actionshub/chef-delivery@master
env:
CHEF_LICENSE: accept-no-persist
dokken:
needs: [delivery]
runs-on: ubuntu-latest
strategy:
matrix:
os:
- 'debian-9'
- 'debian-10'
- 'centos-7'
- 'ubuntu-1604'
- 'ubuntu-1804'
- 'ubuntu-2004'
suite:
- 'default'
- 'cacher'
- 'compile-time'
- 'unattended-upgrades'
exclude:
- os: centos-7
suite: cacher
- os: centos-7
suite: compile-time
- os: centos-7
suite: unattended-upgrades
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@master
- name: Install Chef
uses: actionshub/chef-install@master
- name: Dokken
uses: actionshub/kitchen-dokken@master
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.dokken.yml
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
final:
needs: [dokken]
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
name: delivery
on: [push, pull_request]
jobs:
delivery:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
- name: Run Chef Delivery
uses: actionshub/chef-delivery@master
env:
CHEF_LICENSE: accept-no-persist
\ No newline at end of file
rules "~MD013", "~MD024", "~MD025"
addons:
apt:
sources:
- chef-current-xenial
packages:
- chef-workstation
install: echo "skip bundle install"
env:
- CHEF_LICENSE=accept
branches:
only:
- master
services: docker
env:
matrix:
- INSTANCE=default-centos-7
- INSTANCE=default-debian-9
- INSTANCE=default-debian-10
- INSTANCE=default-ubuntu-1604
- INSTANCE=default-ubuntu-1804
- INSTANCE=default-ubuntu-2004
- INSTANCE=cacher-debian-9
- INSTANCE=cacher-debian-10
- INSTANCE=cacher-ubuntu-1604
- INSTANCE=compile-time-ubuntu-1604
- INSTANCE=compile-time-ubuntu-1804
- INSTANCE=compile-time-ubuntu-2004
- INSTANCE=compile-time-debian-9
- INSTANCE=compile-time-debian-10
- INSTANCE=unattended-upgrades-ubuntu-1604
before_script:
- sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
- eval "$(chef shell-init bash)"
- chef --version
script: KITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen verify ${INSTANCE}
\ No newline at end of file
......@@ -2,6 +2,13 @@
This file is used to list changes made in each version of the apt cookbook.
## Unreleased
- Sous Chefs Adoption
- Cookstyle fixes
- Standardise files with files in sous-chefs/repo-management
- Update libraries/helpers.rb
## 7.3.0 (2020-05-01)
- Cookstyle fixes - [@tas50](https://github.com/tas50)
......@@ -132,7 +139,7 @@ This cookbook now requires Chef 12\. If you require Chef 11 compatibility you wi
## v2.9.2
- # 168 Adding guard to package resource.
- # 168 Adding guard to package resource
## v2.9.1
......
# apt Cookbook
[![Build Status](https://img.shields.io/travis/chef-cookbooks/apt.svg)][travis] [![Cookbook Version](https://img.shields.io/cookbook/v/apt.svg)][cookbook]
[![Cookbook Version](https://img.shields.io/cookbook/v/apt.svg)](https://supermarket.chef.io/cookbooks/apt)
[![CI State](https://github.com/sous-chefs/apt/workflows/ci/badge.svg)](https://github.com/sous-chefs/apt/actions?query=workflow%3Aci)
[![OpenCollective](https://opencollective.com/sous-chefs/backers/badge.svg)](#backers)
[![OpenCollective](https://opencollective.com/sous-chefs/sponsors/badge.svg)](#sponsors)
[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)
This cookbook includes recipes to execute apt-get update to ensure the local APT package cache is up to date. There are recipes for managing the apt-cacher-ng caching proxy and proxy clients. It also includes a custom resource for pinning packages via /etc/apt/preferences.d.
## Maintainers
This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit [sous-chefs.org](https://sous-chefs.org/) or come chat with us on the Chef Community Slack in [#sous-chefs](https://chefcommunity.slack.com/messages/C2V7B88SF).
## Requirements
### Platforms
......@@ -39,18 +47,18 @@ Configures the node to use a `apt-cacher-ng` server to cache apt requests. Confi
```json
{
"apt": {
"cacher_client": {
"cacher_server": {
"host": "cache_server.mycorp.dmz",
"port": 1234,
"proxy_ssl": true,
"cache_bypass": {
"download.oracle.com": "http"
}
}
"apt": {
"cacher_client": {
"cacher_server": {
"host": "cache_server.mycorp.dmz",
"port": 1234,
"proxy_ssl": true,
"cache_bypass": {
"download.oracle.com": "http"
}
}
}
}
}
```
......@@ -62,15 +70,15 @@ To do this, you need to override the `cache_bypass` attribute with an hash of re
```json
{
"apt": {
"cacher_client": {
"cacher_server": {
"cache_bypass": {
"URL": "PROTOCOL"
}
}
"apt": {
"cacher_client": {
"cacher_server": {
"cache_bypass": {
"URL": "PROTOCOL"
}
}
}
}
}
```
......@@ -78,16 +86,16 @@ For example, to prevent caching and directly connect to the repository at `downl
```json
{
"apt": {
"cacher_client": {
"cacher_server": {
"cache_bypass": {
"download.oracle.com": "http",
"nginx.org": "https"
}
}
"apt": {
"cacher_client": {
"cacher_server": {
"cache_bypass": {
"download.oracle.com": "http",
"nginx.org": "https"
}
}
}
}
}
```
......@@ -189,27 +197,27 @@ The apt_update resource has been moved into chef-client in Chef 12.7.
See <https://docs.chef.io/resource_apt_update.html> for usage details
## Maintainers
## Contributors
This cookbook is maintained by Chef's Community Cookbook Engineering team. Our goal is to improve cookbook quality and to aid the community in contributing to cookbooks. To learn more about our team, process, and design goals see our [team documentation](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/COOKBOOK_TEAM.MD). To learn more about contributing to cookbooks like this see our [contributing documentation](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD), or if you have general questions about this cookbook come chat with us in #cookbok-engineering on the [Chef Community Slack](http://community-slack.chef.io/)
This project exists thanks to all the people who [contribute.](https://opencollective.com/sous-chefs/contributors.svg?width=890&button=false)
## License
### Backers
**Copyright:** 2009-2017, Chef Software, Inc.
Thank you to all our backers!
```
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
![https://opencollective.com/sous-chefs#backers](https://opencollective.com/sous-chefs/backers.svg?width=600&avatarHeight=40)
http://www.apache.org/licenses/LICENSE-2.0
### Sponsors
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
[cookbook]: https://community.chef.io/cookbooks/apt
[travis]: https://travis-ci.org/chef-cookbooks/apt
![https://opencollective.com/sous-chefs/sponsor/0/website](https://opencollective.com/sous-chefs/sponsor/0/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/1/website](https://opencollective.com/sous-chefs/sponsor/1/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/2/website](https://opencollective.com/sous-chefs/sponsor/2/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/3/website](https://opencollective.com/sous-chefs/sponsor/3/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/4/website](https://opencollective.com/sous-chefs/sponsor/4/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/5/website](https://opencollective.com/sous-chefs/sponsor/5/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/6/website](https://opencollective.com/sous-chefs/sponsor/6/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/7/website](https://opencollective.com/sous-chefs/sponsor/7/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/8/website](https://opencollective.com/sous-chefs/sponsor/8/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/9/website](https://opencollective.com/sous-chefs/sponsor/9/avatar.svg?avatarHeight=100)
---
driver:
name: dokken
privileged: true # because Docker and SystemD/Upstart
privileged: true # because Docker and SystemD
chef_version: <%= ENV['CHEF_VERSION'] || 'current' %>
chef_license: accept-no-persist
env: [CHEF_LICENSE=accept]
transport:
name: dokken
provisioner:
name: dokken
deprecations_as_errors: true
verifier:
name: inspec
platforms:
- name: debian-9
driver:
image: debian:9
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install -y systemd
- RUN rm /etc/systemd/system/getty.target.wants/getty\@tty1.service
- name: debian-10
driver:
# Need a custom Stretch image as dokken one contains extra packages and then we hit https://github.com/chef-cookbooks/apt/issues/234
image: debian:10
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install -y systemd
- RUN rm /etc/systemd/system/getty.target.wants/getty\@tty1.service
- name: centos-7
driver:
image: dokken/centos-7
pid_one_command: /usr/lib/systemd/systemd
- name: ubuntu-16.04
driver:
image: dokken/ubuntu-16.04
pid_one_command: /bin/systemd
- name: ubuntu-18.04
driver:
image: dokken/ubuntu-18.04
pid_one_command: /bin/systemd
- name: ubuntu-20.04
driver:
image: dokken/ubuntu-20.04
pid_one_command: /bin/systemd
- name: debian-9
driver:
image: dokken/debian-9
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- name: debian-10
driver:
image: dokken/debian-10
pid_one_command: /bin/systemd
intermediate_instructions:
- run /usr/bin/apt-get update
- name: centos-7
driver:
image: dokken/centos-7
pid_one_command: /usr/lib/systemd/systemd
- name: ubuntu-16.04
driver:
image: dokken/ubuntu-16.04
pid_one_command: /bin/systemd
intermediate_instructions:
- run /usr/bin/apt-get update
- name: ubuntu-18.04
driver:
image: dokken/ubuntu-18.04
pid_one_command: /bin/systemd
intermediate_instructions:
- run /usr/bin/apt-get update
- name: ubuntu-20.04
driver:
image: dokken/ubuntu-20.04
pid_one_command: /bin/systemd
intermediate_instructions:
- run /usr/bin/apt-get update
......@@ -3,8 +3,10 @@ driver:
provisioner:
name: chef_zero
product_name: chef
enforce_idempotency: true
multiple_converge: 2
deprecations_as_errors: true
chef_license: accept-no-persist
verifier:
name: inspec
......@@ -15,6 +17,7 @@ platforms:
- name: debian-10
- name: ubuntu-16.04
- name: ubuntu-18.04
- name: ubuntu-20.04
- name: ubuntu-16.04-chef-13.3
driver_config:
box: bento/ubuntu-16.04
......
name 'apt'
maintainer 'Chef Software, Inc.'
maintainer_email 'cookbooks@chef.io'
license 'Apache-2.0'
description 'Configures apt and apt caching.'
version '7.3.0'
name 'apt'
maintainer 'Sous Chefs'
maintainer_email 'help@sous-chefs.org'
license 'Apache-2.0'
description 'Configures apt and apt caching.'
version '7.3.0'
source_url 'https://github.com/sous-chefs/apt'
issues_url 'https://github.com/sous-chefs/apt/issues'
chef_version '>= 13.3'
supports 'ubuntu'
supports 'debian'
source_url 'https://github.com/chef-cookbooks/apt'
issues_url 'https://github.com/chef-cookbooks/apt/issues'
chef_version '>= 13.3'
supports 'ubuntu'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment