mirror of
https://github.com/puppetlabs/beaker-vmpooler.git
synced 2026-01-25 18:48:41 -05:00
Compare commits
11 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f055e1202b | ||
|
|
c027b1bcef | ||
|
|
c309bf02ce | ||
|
|
4f5ee09807 | ||
|
|
278515e460 | ||
|
|
6acbc08aba | ||
|
|
d8ea6a2e4c | ||
| 5be58b1e82 | |||
|
|
5d04a41003 | ||
|
|
596e0d83f9 | ||
| e012919f08 |
8 changed files with 110 additions and 41 deletions
3
.github/dependabot.yml
vendored
3
.github/dependabot.yml
vendored
|
|
@ -3,6 +3,5 @@ updates:
|
|||
- package-ecosystem: bundler
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "13:00"
|
||||
interval: weekly
|
||||
open-pull-requests-limit: 10
|
||||
|
|
|
|||
39
.github/workflows/release.yml
vendored
Normal file
39
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
name: Release
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'puppetlabs/beaker-vmpooler'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Get Version
|
||||
id: gv
|
||||
run: |
|
||||
version=$(grep VERSION lib/beaker-vmpooler/version.rb |rev |cut -d "'" -f2 |rev)
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
echo "Found version $version from lib/beaker-vmpooler/version.rb"
|
||||
- name: Tag Release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
tag: ${{ steps.gv.outputs.version }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
generateReleaseNotes: true
|
||||
- name: Install Ruby 2.7
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '2.7'
|
||||
- name: Build gem
|
||||
run: gem build *.gemspec
|
||||
- name: Publish gem
|
||||
run: |
|
||||
mkdir -p $HOME/.gem
|
||||
touch $HOME/.gem/credentials
|
||||
chmod 0600 $HOME/.gem/credentials
|
||||
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
||||
gem push *.gem
|
||||
env:
|
||||
GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}'
|
||||
39
.github/workflows/security.yml
vendored
Normal file
39
.github/workflows/security.yml
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
name: Security
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
scan:
|
||||
name: Mend Scanning
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout repo content
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: setup ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.7
|
||||
# setup a package lock if one doesn't exist, otherwise do nothing
|
||||
- name: check lock
|
||||
run: '[ -f "Gemfile.lock" ] && echo "package lock file exists, skipping" || bundle lock'
|
||||
# install java
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||
java-version: '17'
|
||||
# download mend
|
||||
- name: download_mend
|
||||
run: curl -o wss-unified-agent.jar https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
|
||||
- name: run mend
|
||||
run: java -jar wss-unified-agent.jar
|
||||
env:
|
||||
WS_APIKEY: ${{ secrets.MEND_API_KEY }}
|
||||
WS_WSS_URL: https://saas-eu.whitesourcesoftware.com/agent
|
||||
WS_USERKEY: ${{ secrets.MEND_TOKEN }}
|
||||
WS_PRODUCTNAME: RE
|
||||
WS_PROJECTNAME: ${{ github.event.repository.name }}
|
||||
26
.github/workflows/test.yml
vendored
26
.github/workflows/test.yml
vendored
|
|
@ -1,26 +0,0 @@
|
|||
name: Test
|
||||
|
||||
on:
|
||||
- pull_request
|
||||
- push
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ruby:
|
||||
- "2.5"
|
||||
- "2.6"
|
||||
- "2.7"
|
||||
name: Ruby ${{ matrix.ruby }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Ruby ${{ matrix.ruby }}
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
bundler-cache: true
|
||||
- name: Run tests
|
||||
run: bundle exec rake test:spec
|
||||
26
.github/workflows/testing.yml
vendored
Normal file
26
.github/workflows/testing.yml
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
name: Testing
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
spec_tests:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ruby-version:
|
||||
- '2.7'
|
||||
- '3.0'
|
||||
- '3.1'
|
||||
- '3.2'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby-version }}
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
- name: Run spec tests
|
||||
run: bundle exec rake test
|
||||
|
|
@ -1 +1,2 @@
|
|||
* @puppetlabs/beaker
|
||||
* @puppetlabs/release-engineering
|
||||
|
||||
|
|
|
|||
8
Gemfile
8
Gemfile
|
|
@ -2,8 +2,6 @@ source ENV['GEM_SOURCE'] || "https://rubygems.org"
|
|||
|
||||
gemspec :development_group => :acceptance_testing
|
||||
|
||||
|
||||
|
||||
def location_for(place, fake_version = nil)
|
||||
if place =~ /^(git:[^#]*)#(.*)/
|
||||
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
|
||||
|
|
@ -14,15 +12,13 @@ def location_for(place, fake_version = nil)
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
# We don't put beaker in as a test dependency because we
|
||||
# don't want to create a transitive dependency
|
||||
group :acceptance_testing do
|
||||
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 4.0')
|
||||
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '>= 5.0', '< 7')
|
||||
gem "beaker-abs"
|
||||
end
|
||||
|
||||
|
||||
if File.exists? "#{__FILE__}.local"
|
||||
if File.exist? "#{__FILE__}.local"
|
||||
eval(File.read("#{__FILE__}.local"), binding)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -20,12 +20,7 @@ Gem::Specification.new do |s|
|
|||
# Testing dependencies
|
||||
s.add_development_dependency 'rspec', '~> 3.0'
|
||||
s.add_development_dependency 'rspec-its'
|
||||
# pin fakefs for Ruby < 2.3
|
||||
if RUBY_VERSION < "2.3"
|
||||
s.add_development_dependency 'fakefs', '~> 0.6', '< 0.14'
|
||||
else
|
||||
s.add_development_dependency 'fakefs', '~> 0.6'
|
||||
end
|
||||
s.add_development_dependency 'fakefs', '~> 2.4'
|
||||
s.add_development_dependency 'rake', '~> 13.0'
|
||||
s.add_development_dependency 'simplecov'
|
||||
s.add_development_dependency 'pry', '~> 0.10'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue