From 1810832956b1f989e07b922358b2a9b414e860ac Mon Sep 17 00:00:00 2001 From: Marcus Young Date: Mon, 11 Jan 2021 13:06:15 -0600 Subject: [PATCH] Attempt to fix gem push --- .github/FUNDING.yml | 3 ++ .github/workflows/release.yml | 20 +++++++++ .gitignore | 3 +- .kitchen.yml | 83 ----------------------------------- Gemfile | 3 ++ Gemfile.lock | 15 +++++-- Rakefile | 19 +------- lib/vagrant-ovirt4/version.rb | 2 +- 8 files changed, 41 insertions(+), 107 deletions(-) create mode 100644 .github/FUNDING.yml create mode 100644 .github/workflows/release.yml delete mode 100644 .kitchen.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..5bd7e2a --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: myoung34 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ff87b6e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,20 @@ +name: Release + +on: + push: + paths: + - lib/vagrant-ovirt4/version.rb + branches: + - master +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: fregante/setup-git-user@v1 + - name: Release Gem + uses: cadwallion/publish-rubygems-action@master + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}} + RELEASE_COMMAND: rake release diff --git a/.gitignore b/.gitignore index fd64243..0b21eef 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,4 @@ /.idea *.gem /manifests -hiera.yaml -.kitchen +vendor diff --git a/.kitchen.yml b/.kitchen.yml deleted file mode 100644 index b400576..0000000 --- a/.kitchen.yml +++ /dev/null @@ -1,83 +0,0 @@ -driver: - name: vagrant - vagrantfile_erb: templates/Vagrantfile.erb - provider: ovirt4 - -verifier: - name: inspec - format: doc - -platforms: - - name: centos7 - driver_plugin: vagrant - driver_config: - customize: - memory_size: 1024 MB - url: <%= ENV['OVIRT_URL'] %> - insecure: true - username: <%= ENV['OVIRT_USERNAME'] %> - password: <%= ENV['OVIRT_PASSWORD'] %> - cluster: Default - debug: true - box: ovirt4 - box_url: https://github.com/myoung34/vagrant-ovirt4/blob/master/example_box/dummy.box?raw=true - -suites: - - name: singleton-static_network - driver_config: - vm_hostname: static - customize: - template: vagrant-centos7 - network: - - ["private_network", {ovirt__ip: <%= "192.168.2.254" %>, ovirt__network_name: 'ovirtmgmt', ovirt__gateway: 192.168.2.1, ovirt__netmask: 255.255.255.0, ovirt__dns_servers: 192.168.2.1}] - - name: dynamic_network - driver_config: - vm_hostname: dynamic - network: - - ["private_network", {ovirt__network_name: 'ovirtmgmt'}] - customize: - template: vagrant-centos7 - cloud_init: | - runcmd: - - ifdown eth0 - - service network restart - - name: bios_serial - driver_config: - vm_hostname: bios-serial - network: - - ["private_network", {ovirt__network_name: 'ovirtmgmt'}] - customize: - template: vagrant-centos7 - bios_serial: 'banana-hammock' - cloud_init: | - runcmd: - - ifdown eth0 - - service network restart - - name: optimized_for_default - verifier: - name: shell - command: curl --silent -k -L --user "${OVIRT_USERNAME}:${OVIRT_PASSWORD}" --header 'Content-Type: application/xml' --header 'Accept: application/xml' ${OVIRT_URL}/vms/d3f659e1-21ff-42a0-b5fa-7c2f74a36c2b | xmllint --xpath '/vm/type/text()' - | grep desktop - driver_config: - vm_hostname: optimized-for - network: - - ["private_network", {ovirt__network_name: 'ovirtmgmt'}] - customize: - template: vagrant-centos7 - cloud_init: | - runcmd: - - ifdown eth0 - - service network restart - - name: optimized_for_set - verifier: - name: shell - command: test/integration/optimized_for.sh - driver_config: - vm_hostname: optimized-for - network: - - ["private_network", {ovirt__network_name: 'ovirtmgmt'}] - customize: - template: vagrant-centos7 - cloud_init: | - runcmd: - - ifdown eth0 - - service network restart diff --git a/Gemfile b/Gemfile index cf56f32..c087e08 100755 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,12 @@ source 'http://rubygems.org' group :development do + gem 'rake' + gem 'rspec-core' gem 'pry' gem 'byebug' gem 'pry-byebug' + gem 'rake-release' end group :plugins do diff --git a/Gemfile.lock b/Gemfile.lock index 3a42871..2b75579 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - vagrant-ovirt4 (1.2.3) + vagrant-ovirt4 (2.0.0) filesize (~> 0) nokogiri (>= 1.10.8) ovirt-engine-sdk (~> 4.0.1) @@ -12,10 +12,10 @@ GEM byebug (11.1.3) coderay (1.1.2) filesize (0.2.0) - json (2.3.0) + json (2.5.1) method_source (1.0.0) mini_portile2 (2.5.0) - nokogiri (1.11.0) + nokogiri (1.11.1) mini_portile2 (~> 2.5.0) racc (~> 1.4) ovirt-engine-sdk (4.0.12) @@ -27,6 +27,12 @@ GEM byebug (~> 11.0) pry (~> 0.13.0) racc (1.5.2) + rake (13.0.3) + rake-release (1.2.1) + bundler (>= 1.11, < 3) + rspec-core (3.10.1) + rspec-support (~> 3.10.0) + rspec-support (3.10.1) PLATFORMS ruby @@ -35,6 +41,9 @@ DEPENDENCIES byebug pry pry-byebug + rake + rake-release + rspec-core vagrant-ovirt4! BUNDLED WITH diff --git a/Rakefile b/Rakefile index c3895f6..7f7c8e8 100755 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,7 @@ require 'rubygems' require 'bundler/setup' +require 'rake/release' require 'rspec/core/rake_task' -require 'kitchen/rake_tasks' # Immediately sync all stdout so that tools like buildbot can # immediately load in the output. @@ -14,20 +14,3 @@ Dir.chdir(File.expand_path("../", __FILE__)) # This installs the tasks that help with gem creation and # publishing. Bundler::GemHelper.install_tasks - -# Install the `spec` task so that we can run tests. -RSpec::Core::RakeTask.new(:spec) do |t| - t.rspec_opts = "--order defined" -end - -# Default task is to run all tests -namespace :test do - task :all do - RSpec::Core::RakeTask.new(:spec) - Rake::Task["spec"].execute - Kitchen::RakeTasks.new - Rake::Task['kitchen:all'].invoke - end -end - -task :default => 'test:all' diff --git a/lib/vagrant-ovirt4/version.rb b/lib/vagrant-ovirt4/version.rb index c614e26..aecc959 100755 --- a/lib/vagrant-ovirt4/version.rb +++ b/lib/vagrant-ovirt4/version.rb @@ -1,6 +1,6 @@ module VagrantPlugins module OVirtProvider - VERSION = '1.2.3' + VERSION = '2.0.0' end end