Skip to content

Commit

Permalink
fix(repository): amazonlinux repository url
Browse files Browse the repository at this point in the history
  • Loading branch information
javierbertoli committed Feb 9, 2022
1 parent 410078c commit 949551b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
10 changes: 8 additions & 2 deletions docker/osmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ Raspbian:


compose:
name: docker-compose
use_upstream: package
name: docker-compose
use_upstream: package

Amazon:
pkg:
docker:
Expand All @@ -85,3 +86,8 @@ Fedora:
- selinux-policy-minimum
- python3-dnf-plugin-versionlock
- python3-docker
docker:
repo:
baseurl: 'https://download.docker.com/linux/fedora/$releasever/$basearch/stable'
file: '/etc/yum.repos.d/docker-ce.repo'
gpgkey: 'https://download.docker.com/linux/fedora/gpg'
2 changes: 2 additions & 0 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,8 @@ suites:
inspec_tests:
- path: test/integration/package
- name: repo
excludes:
- arch-base-latest-master-py3
provisioner:
state_top:
base:
Expand Down
9 changes: 6 additions & 3 deletions test/integration/package/controls/repository.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# frozen_string_literal: true

only_if('archlinux does not has a repository') do
os[:name] != 'arch'
end

case platform.family
when 'redhat', 'fedora', 'suse'
os_name_repo_file = {
Expand All @@ -9,11 +13,10 @@

os_name_repo_url = {
'amazon' => 'https://download.docker.com/linux/centos/7/$basearch/stable',
'fedora' => 'https://download.docker.com/linux/fedora/$releasever/$basearch/stable',
'opensuse' => 'https://download.docker.com/linux/sles/$releasever/$basearch/stable'
}
# rubocop:disable Metrics/LineLength
os_name_repo_url.default = "https://download.docker.com/linux/#{platform.name}/$releasever/$basearch/stable"
# rubocop:enable Metrics/LineLength
os_name_repo_url.default = "https://download.docker.com/linux/centos/#{platform.release.to_i}/$basearch/stable"
repo_url = os_name_repo_url[platform.name]
repo_file = os_name_repo_file[platform.name]

Expand Down

0 comments on commit 949551b

Please sign in to comment.