Skip to content

Commit a4dcf3e

Browse files
authored
Merge pull request #92 from trinitronx/develop
Merge develop to master
2 parents f20ee14 + 4bb004e commit a4dcf3e

File tree

148 files changed

+2702
-1023
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+2702
-1023
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# These are supported funding model platforms
22

33
github: [trinitronx] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4-
#patreon: # Replace with a single Patreon username
4+
patreon: phasik # Replace with a single Patreon username
55
#open_collective: # Replace with a single Open Collective username
6-
#ko_fi: # Replace with a single Ko-fi username
6+
ko_fi: trinitronx # Replace with a single Ko-fi username
77
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
88
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
99
liberapay: trinitronx
1010
#issuehunt: # Replace with a single IssueHunt username
1111
#otechie: # Replace with a single Otechie username
1212
custom: ['https://paypal.me/JamesCuzella'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
13-

.github/workflows/ci.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
name: ci
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- master
8+
- main
9+
- develop
10+
push:
11+
branches:
12+
- master
13+
- main
14+
- develop
15+
16+
jobs:
17+
rake-ci:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Check out code
21+
uses: actions/checkout@v2
22+
- uses: ruby/setup-ruby@v1
23+
with:
24+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
25+
- name: Run rake ci
26+
run: |
27+
bundle exec rake ci
28+
29+
integration:
30+
needs: [rake-ci]
31+
runs-on: ${{ matrix.os }}
32+
strategy:
33+
matrix:
34+
#exclude:
35+
include:
36+
- os: 'macos-11'
37+
suite: '--log-level debug default'
38+
KITCHEN_LOCAL_YAML: '.kitchen.exec.yml'
39+
- os: 'macos-12'
40+
suite: '--log-level debug default'
41+
KITCHEN_LOCAL_YAML: '.kitchen.exec.yml'
42+
fail-fast: false
43+
44+
steps:
45+
- name: Check out code
46+
uses: actions/checkout@v2
47+
- name: Install Chef
48+
uses: actionshub/chef-install@main
49+
- name: Test Kitchen
50+
uses: actionshub/test-kitchen@main
51+
env:
52+
TERM: xterm-color
53+
CHEF_LICENSE: accept-no-persist
54+
CHEF_INSTALL_STRATEGY: skip
55+
CHEF_OMNIBUS_ROOT: /opt/chef-workstation
56+
KITCHEN_LOCAL_YAML: ${{ matrix.KITCHEN_LOCAL_YAML }}
57+
with:
58+
suite: ${{ matrix.suite }}
59+
os: ${{ matrix.os }}
60+
- name: Print debug output on failure
61+
if: failure()
62+
run: |
63+
set -x
64+
export TERM=xterm-color
65+
log show --color always --last 5m
66+
KITCHEN_LOCAL_YAML=${{ matrix.KITCHEN_LOCAL_YAML }} kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "syslog"
67+
68+
integration_result:
69+
needs: [integration]
70+
if: always()
71+
runs-on: [ubuntu-latest]
72+
steps:
73+
- name: check the jobs # get the matrix job status and combination info
74+
run: |
75+
job_status=$(curl -X GET -s --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq ".jobs[] | {job_status: .conclusion, matrix: .name}")
76+
echo echo ::set-env JOB_STATUS=$job_status
77+
- name: Set matrix job status
78+
if: contains(env.JOB_STATUS, 'failed')
79+
run: |
80+
echo 'One or more integration matrix jobs failed!'
81+
exit 1

.github/workflows/pre-commit.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- main
8+
- develop
9+
push:
10+
branches:
11+
- master
12+
- main
13+
- develop
14+
15+
jobs:
16+
pre-commit:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- uses: actions/setup-python@v3
21+
- uses: pre-commit/[email protected]

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ Berksfile.lock
1212
Gemfile.lock
1313
bin/*
1414
.bundle/*
15-

.kitchen.exec.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
driver:
3+
name: exec
4+
5+
transport:
6+
name: exec
7+
8+
provisioner:
9+
name: chef_zero
10+
deprecations_as_errors: true
11+
install_strategy: <%= ENV['CHEF_INSTALL_STRATEGY'] || 'once' %>
12+
chef_omnibus_root: <%= ENV['CHEF_OMNIBUS_ROOT'] || '/opt/chef-workstation' %>
13+
14+
verifier:
15+
# This will eventually become 'inputs'
16+
# References:
17+
# - https://github.com/inspec/kitchen-inspec/issues/237
18+
# - https://github.com/inspec/inspec/pull/4398
19+
# - https://docs.chef.io/inspec/inputs/#what-happened-to-attributes
20+
attributes:
21+
test_kitchen_user: <%= ENV['USER'] || 'vagrant' %>
22+
23+
platforms:
24+
- name: macos-11
25+
- name: macos-12

.kitchen.libvirt.ssh.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<%
2+
# Hack to fix a bug in TK. TK supports using an SSH gateway in its SSH transport, but appears not to support configuring
3+
# separate keys for the gateway and the destination.
4+
require 'kitchen/transport/ssh'
5+
6+
GATEWAY_KEYS = ["#{ENV['HOME']}/.ssh/identity.lyra"]
7+
8+
class Kitchen::Transport::Ssh::Connection
9+
# Replace this method in TK core with a version that uses the logged in user's key to access the SSH gateway.
10+
def establish_connection_via_gateway(opts)
11+
retry_connection(opts) do
12+
Net::SSH::Gateway.new(ssh_gateway, ssh_gateway_username, options.merge(keys: GATEWAY_KEYS))
13+
.ssh(hostname, username, options)
14+
end
15+
end
16+
end
17+
%>
18+
---
19+
driver:
20+
name: vagrant
21+
provider: libvirt
22+
vagrantfiles:
23+
- 'test/fixtures/Vagrantfile.libvirt-ssh'
24+
synced_folders:
25+
- [".", "/tmp/kitchen/soloist", "disabled: false, type: 'rsync'"]
26+
# TODO: Find & fix bugs in Vagrant where it checks for vagrant-host path... needs to support remote NFS & 9p libvirt mounts
27+
# TODO: Fix mount: false setting for 9p
28+
# TODO: Fix auto-mount capability for Darwin / macOS... needs mount_9p support (see man mount_9p)
29+
# Need to implement mount_9p_shared_folder capability for macOS / Darwin
30+
# https://github.com/vagrant-libvirt/vagrant-libvirt/search?q=mount_9p_shared_folder
31+
# NOTE: For qemu+ssh remote libvirt VM, create a fake directory matching hostpath on the host running vagrant
32+
# In this use case, both hostpath & guestpath live on the same remote libvirt + qemu hypervisor host & VM (guest)
33+
# - ["/opt/export/terabyte", "/System/Volumes/Data/terabyte", "hostpath: '/export/terabyte', guestpath: '/System/Volumes/Data/terabyte', disabled: false, type: '9p', mount: false, accessmode: 'squash', owner:'1000'"]
34+
# - ["/export/terabyte", "/System/Volumes/Data/terabyte", "disabled: false, type: 'nfs', nfs_export: false, bsd__nfs_options: '-fstype=nfs,nolockd,resvport,hard,bg,intr,rw,tcp,nfc'"]
35+
# ssh_gateway_username: trinitronx
36+
37+
# customize:
38+
# memory: 1024
39+
40+
transport:
41+
ssh_gateway: saturn.local
42+
ssh_gateway_username: trinitronx
43+
# username: vagrant
44+
45+
provisioner:
46+
# name: chef_zero
47+
transport:
48+
ssh_gateway: saturn.local
49+
ssh_gateway_username: trinitronx
50+
51+
# deprecations_as_errors: true
52+
deprecations_as_errors: false
53+
# multiple_converge: 2
54+
# enforce_idempotency: true
55+
56+
verifier:
57+
name: inspec
58+
# This will eventually become 'inputs'
59+
# References:
60+
# - https://github.com/inspec/kitchen-inspec/issues/237
61+
# - https://github.com/inspec/inspec/pull/4398
62+
# - https://docs.chef.io/inspec/inputs/#what-happened-to-attributes
63+
attributes:
64+
test_kitchen_user: 'vagrant'
65+
## Client error, can't connect to 'ssh' backend: Only one of proxy_command or bastion_host needs to be specified]
66+
## Apparently the transport ssh_gateway option is actually passed through to InSpec
67+
# proxy_command: ssh saturn.local -q0 %h:%p
68+
69+
platforms:
70+
# - name: ubuntu-20.04
71+
# driver:
72+
# box: generic/ubuntu2004
73+
# lifecycle:
74+
# pre_converge:
75+
# - remote: sudo addgroup --system admin
76+
# - remote: sudo usermod -a -G admin kitchen
77+
- name: macos-12.1
78+
lifecycle:
79+
pre_converge:
80+
- remote: sudo mkdir -p /tmp/kitchen
81+
- remote: sudo chown -R vagrant:vagrant /tmp/kitchen
82+
driver:
83+
box: lyraphase-runner/macos-monterey-base
84+
box_url: http://saturn.local:8888/lyraphase-runner-macos-monterey-base.box
85+
communicator: ssh
86+
gui: true
87+
customize:
88+
memory: 4096
89+
# cpus: 2
90+
91+
#suites:
92+
# - name: default
93+
# run_list:
94+
# - recipe[sprout-base::default]
95+
# includes: [ubuntu-20.04, macos-latest]

.kitchen.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,26 @@ driver:
44

55
provisioner:
66
name: chef_zero
7+
client_rb:
8+
ohai.optional_plugins: [ ':Passwd' ]
9+
encrypted_data_bag_secret_key_path: 'test/fixtures/encrypted_data_bag_secret'
10+
data_bags_path: 'test/fixtures/data_bags'
11+
12+
verifier:
13+
name: inspec
714

815
platforms:
916
- name: macosx-10.10
1017

1118
suites:
1219
- name: default
13-
run_list: recipe[lyraphase_workstation::ableton_live]
20+
run_list:
21+
- recipe[lyraphase_workstation::ableton_live]
22+
- recipe[lyraphase_workstation::bashrc]
23+
- recipe[lyraphase_workstation::bitfocus_companion]
24+
attributes:
25+
lyraphase_workstation:
26+
bashrc:
27+
user_fullname: 'vagrant'
28+
user_email: '[email protected]'
29+
user_gpg_keyid: '0xBADC0DE00FEED000'

0 commit comments

Comments
 (0)