-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into task-add-git-ssh-…
…deploykeys
- Loading branch information
Showing
16 changed files
with
233 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
Tests: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- centos | ||
- debian | ||
- ubuntu | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set Python Cache Key | ||
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
bundle | ||
virtualenv | ||
key: Tests-${{ matrix.os }}-${{ env.PY }}-${{ hashFiles('Gemfile', 'test-requirements.txt') }} | ||
|
||
- name: Install System Deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y curl git python3-pip ruby-dev ruby-bundler shellcheck virtualenv | ||
- name: Install Python Deps | ||
run: | | ||
if [ ! -e virtualenv/bin/activate ]; then /usr/bin/virtualenv -p /usr/bin/python3 virtualenv; fi | ||
. virtualenv/bin/activate | ||
pip3 install -U -r test-requirements.txt | ||
- name: Install Ruby Deps | ||
run: | | ||
/usr/bin/bundle config set --local path 'bundle' | ||
/usr/bin/bundle config set --local without 'vagrant windows' | ||
/usr/bin/bundle install | ||
- name: Install GPG Key | ||
run: | | ||
install -d -m 700 gpgkeys | ||
gpg --no-default-keyring --homedir gpgkeys --import < tests/gpgkeys/test.txt | ||
- name: Test | ||
run: | | ||
. virtualenv/bin/activate | ||
shellcheck lib/kitchen/provisioner/*.sh* | ||
shellcheck assets/*.sh* | ||
LANG=en_US.UTF-8 /usr/bin/bundle exec rake "integration:verify[${{ matrix.os }}]" | ||
/usr/bin/bundle exec kitchen list ${{ matrix.os }} | ||
- name: Cleanup | ||
run: | | ||
/usr/bin/bundle exec rake "integration:destroy[${{ matrix.os }}]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,6 @@ html/ | |
.idea_modules/ | ||
atlassian-ide-plugin.xml | ||
.vscode | ||
|
||
# rbenv | ||
.ruby-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,18 @@ driver: | |
use_sudo: false | ||
socket: <%= ENV['DOCKER_HOST'] || 'unix:///var/run/docker.sock' %> | ||
provision_command: | ||
- DEBIAN_FRONTEND=noninteractive apt-get install -y python-pip python-dev gcc git locales console-data gnupg | ||
- DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip python3-dev gcc git locales console-data gnupg | ||
- mkdir -p /run/sshd | ||
- echo en_US.UTF-8 UTF-8 >> /etc/locale.gen; locale-gen; update-locale 'LANG="en_US.UTF-8"' | ||
- echo export LANG=en_US.UTF-8 > ~kitchen/.bashrc | ||
- echo 'export PATH=$PATH:/usr/sbin:/sbin' >> ~kitchen/.bashrc | ||
provisioner: | ||
name: salt_solo | ||
salt_install: bootstrap | ||
salt_version: latest | ||
salt_bootstrap_url: https://bootstrap.saltstack.com | ||
salt_bootstrap_options: -X -p git -p curl -p sudo | ||
salt_version: 3000.6 | ||
salt_bootstrap_url: https://bootstrap.saltproject.io | ||
salt_bootstrap_options: -X -x python3 -p git -p curl -p sudo stable 3000.6 | ||
pip_bin: pip3 | ||
formula: tests | ||
require_chef: false | ||
gpg_key: [email protected] | ||
|
@@ -75,45 +79,28 @@ platforms: | |
driver: | ||
run_command: '/usr/sbin/sshd -D -o UseDNS=no -o UsePAM=no -o PasswordAuthentication=yes -o PidFile=/tmp/sshd.pid' | ||
provisioner: | ||
salt_apt_repo: 'https://repo.saltstack.com/apt/ubuntu/18.04/amd64' | ||
salt_apt_repo_key: 'https://repo.saltstack.com/apt/ubuntu/18.04/amd64/latest/SALTSTACK-GPG-KEY.pub' | ||
salt_apt_repo: 'https://repo.saltproject.io/py3/ubuntu/18.04/amd64/archive' | ||
salt_apt_repo_key: 'https://repo.saltproject.io/py3/ubuntu/18.04/amd64/latest/SALTSTACK-GPG-KEY.pub' | ||
init_environment: | | ||
sudo mkdir -p /tmp/kitchen/var/cache/salt/master | ||
sudo apt-get update | ||
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y software-properties-common | ||
salt_bootstrap_options: -X -p git -p curl -p sudo -p software-properties-common | ||
- name: ubuntu-16.04 | ||
salt_bootstrap_options: -X -x python3 -p git -p curl -p sudo -p software-properties-common stable 3000.6 | ||
- name: debian-10 | ||
provisioner: | ||
init_environment: | | ||
sudo mkdir -p /tmp/kitchen/var/cache/salt/master | ||
sudo apt-get update | ||
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y software-properties-common | ||
salt_bootstrap_options: -X -p git -p curl -p sudo -p software-properties-common | ||
- name: debian-8 | ||
provisioner: | ||
salt_apt_repo: 'https://repo.saltstack.com/apt/debian/8/amd64' | ||
salt_apt_repo_key: 'https://repo.saltstack.com/apt/debian/8/amd64/latest/SALTSTACK-GPG-KEY.pub' | ||
- name: debian-9 | ||
provisioner: | ||
salt_apt_repo: 'https://repo.saltstack.com/apt/debian/9/amd64' | ||
salt_apt_repo_key: 'https://repo.saltstack.com/apt/debian/9/amd64/latest/SALTSTACK-GPG-KEY.pub' | ||
- name: centos-7 | ||
salt_apt_repo: 'https://repo.saltproject.io/py3/debian/10/amd64/archive' | ||
salt_apt_repo_key: 'https://repo.saltproject.io/py3/debian/10/amd64/latest/SALTSTACK-GPG-KEY.pub' | ||
- name: centos-8 | ||
driver_config: | ||
provision_command: | ||
- echo . /etc/profile >> ~kitchen/.bashrc | ||
- echo export LANG=en_US.UTF-8 >> ~kitchen/.bashrc | ||
- sed -i '/secure_path/d' /etc/sudoers | ||
- yum install -y epel-release | ||
- yum install -y python-pip python-devel gcc git gcc-c++ | ||
provisioner: | ||
salt_yum_repo: 'https://repo.saltstack.com/yum/redhat/$releasever/$basearch/%s' | ||
salt_yum_rpm_key: 'https://repo.saltstack.com/yum/redhat/7/x86_64/latest/SALTSTACK-GPG-KEY.pub' | ||
- name: centos-6 | ||
- yum install -y python3-pip python3-devel gcc git gcc-c++ | ||
provisioner: | ||
salt_yum_repo: 'https://repo.saltstack.com/yum/redhat/$releasever/$basearch/%s' | ||
salt_yum_rpm_key: 'https://repo.saltstack.com/yum/redhat/6/x86_64/latest/SALTSTACK-GPG-KEY.pub' | ||
pip_bin: pip2.7 | ||
driver_config: | ||
provision_command: | ||
- yum install -y epel-release https://centos6.iuscommunity.org/ius-release.rpm | ||
- yum install -y python27-pip python27-devel gcc git gcc-c++ | ||
salt_yum_repo: 'https://repo.saltproject.io/py3/redhat/8/x86_64/archive/%s' | ||
salt_yum_rpm_key: 'https://repo.saltproject.io/py3/redhat/8/x86_64/latest/SALTSTACK-GPG-KEY.pub' | ||
<% if @vagrant != false %> | ||
- name: windows-2012r2 | ||
driver: | ||
|
@@ -133,7 +120,7 @@ platforms: | |
$OldPath = (Get-ItemProperty -Path "$Reg" -Name PATH).Path | ||
$NewPath= $OldPath + ’;’ + $AddedLocation | ||
Set-ItemProperty -Path "$Reg" -Name PATH –Value $NewPath | ||
salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1 | ||
salt_bootstrap_url: https://winbootstrap.saltproject.io/develop | ||
salt_bootstrap_options: '' | ||
state_top: | ||
base: | ||
|
@@ -170,7 +157,6 @@ suites: | |
provisioner: | ||
salt_install: apt | ||
includes: | ||
- debian-8 | ||
- debian-9 | ||
- ubuntu-18.04 | ||
- ubuntu-16.04 | ||
|
@@ -181,7 +167,6 @@ suites: | |
sudo mkdir -p /tmp/kitchen/var/cache/salt/master | ||
sudo yum install -y git | ||
includes: | ||
- centos-6 | ||
- centos-7 | ||
- name: bootstrap | ||
<% if @vagrant != false %> | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,51 @@ | ||
# kitchen-salt # | ||
|
||
[![Gem Version](https://badge.fury.io/rb/kitchen-salt.svg)](https://badge.fury.io/rb/kitchen-salt) | ||
[![Gem Downloads](https://ruby-gem-downloads-badge.herokuapp.com/kitchen-salt?type=total&color=brightgreen)](https://rubygems.org/gems/kitchen-salt) | ||
[![Build Status](https://travis-ci.com/saltstack/kitchen-salt.png)](https://travis-ci.com/saltstack/kitchen-salt) | ||
[![Build Status](https://github.com/saltstack/kitchen-salt/workflows/Tests/badge.svg)](https://github.com/saltstack/kitchen-salt/actions) | ||
|
||
A Test Kitchen Provisioner for Salt | ||
|
||
The provider works by generating a salt-minion config, creating pillars based on attributes in .kitchen.yml and calling salt-call. | ||
|
||
This provisioner is tested with kitchen-docker against CentOS, Ubuntu, and Debian. | ||
|
||
## Documentation ## | ||
## Generate and locally view kitchen-salt docs ## | ||
|
||
To view the docs that were originally generated by this repository and hosted by Salt Project, the following should generate a local copy of the documentation. | ||
|
||
# Clear any locally generated documentation | ||
rm -rf html/ | ||
|
||
# Generate HTML documentation of kitchen-salt | ||
bundle install | ||
bundle exec yard doc | ||
firefox html/index.html | ||
|
||
# OPTIONAL | ||
# Start a local http server to view the rendered docs | ||
# Accessible via http://localhost:8808/ | ||
bundle exec yard server docroot=html/ | ||
|
||
## Installation and Setup ## | ||
|
||
You'll need the test-kitchen and kitchen-salt gem's installed in your system, along with kitchen-vagrant or some other suitable driver for test-kitchen. Please see the [gettingstarted documentation](docs/gettingstarted.md). | ||
|
||
## Provisioner Options ## | ||
|
||
More details on all the configuration options are in the [provisioner_options documentation](docs/provisioner_options.md). | ||
|
||
## Requirements ## | ||
|
||
You'll need a driver box that is supported by the SaltStack [bootstrap](https://github.com/saltstack/salt-bootstrap) system. | ||
|
||
## Continuous Integration and Testing ## | ||
|
||
PR's and other changes should validated using Github Actions, kitchen-docker, multiple state dependencies, the modified version of kitchen-salt and the latest version of test-kitchen. | ||
|
||
## Releasing ## | ||
|
||
<https://kitchen.saltstack.com> | ||
# hack. work. test. | ||
git add stuff | ||
git commit -v | ||
gem bump --release --tag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.