Commit Graph

50 Commits

Author SHA1 Message Date
dependabot[bot]
28c68d2f99 Bump actions/github-script from 6.3.0 to 6.3.1 (#1626) 2022-10-03 10:10:51 +00:00
Darragh Bailey
6d5ad2b87c Update development steps (#1623)
Ensure the development steps can be successfully executed with system
ruby on Fedora 36 to try and help new contributors have an easier
on-ramp.

Support running acceptance tests locally, though note that it may
require rvm if vagrant doesn't support the ruby version used by the
distro.
2022-10-01 15:53:00 +01:00
dependabot[bot]
c0ce667a31 Bump actions/github-script from 6.2.0 to 6.3.0 (#1617) 2022-09-29 11:34:05 +00:00
dependabot[bot]
e94b73b015 Bump actions/upload-artifact from 2 to 3 (#1616) 2022-09-29 11:06:50 +00:00
dependabot[bot]
f4038b803b Bump actions/download-artifact from 2 to 3 (#1615) 2022-09-28 23:01:57 +00:00
Darragh Bailey
0c1d97ec7c Use correct release branch for changelog (#1612)
Ensure changelog generation job uses resolved branch instead of default.
2022-09-28 18:34:49 +01:00
Darragh Bailey
14a8889e33 Rework release workflow (#1609)
Change the release workflow and jobs to ensure more of it is always
exercised for any change and only the actual publishing of the release
is the only part that is limited to be run when tagged.

Additionally try to enable caching and save the generated notes as an
artifact in case the final step fails.
2022-09-28 14:06:53 +01:00
Dan Čermák
309f78c8fd [Dockerfile] Fix creation of plugins.json with buildah (#1602)
Multi-line RUN instructions are unsupported by default docker (works 
with buildkit) and buildah, instead one has to use other tricks like 
ANSI-C quoting for the shell via \n\ and multiple echo commands.

Includes a buildah github workflow to help ensure future
compatibility.
2022-09-22 16:42:58 +01:00
dependabot[bot]
fdff19b311 Bump actions/github-script from 3.0.0 to 6.2.0 (#1594) 2022-09-13 08:12:59 +00:00
dependabot[bot]
deb2b0a923 Bump docker/setup-buildx-action from 1 to 2 (#1596) 2022-09-12 14:25:32 +00:00
dependabot[bot]
6775bf81b6 Bump actions/cache from 2 to 3 (#1595) 2022-09-12 14:15:41 +00:00
dependabot[bot]
cf2ffa3d26 Bump docker/build-push-action from 2 to 3 (#1593) 2022-09-12 14:03:38 +00:00
dependabot[bot]
281422fda0 Bump JamesIves/github-pages-deploy-action from 4.3.3 to 4.4.0 (#1591) 2022-09-08 18:59:27 +00:00
dependabot[bot]
6226d4d6cd Bump CharMixer/auto-changelog-action from 1.1 to 1.4 (#1590) 2022-09-08 18:52:00 +00:00
dependabot[bot]
f46cd70144 Bump actions/checkout from 2 to 3 (#1589) 2022-09-08 18:41:24 +00:00
dependabot[bot]
5412b0638c Bump docker/setup-qemu-action from 1 to 2 (#1588) 2022-09-08 18:29:39 +00:00
dependabot[bot]
48f164e67d Bump docker/login-action from 1 to 2 (#1587) 2022-09-08 17:34:28 +00:00
Darragh Bailey
84e2fed626 Fix release workflow default branch detection (#1585)
Ensure that the github script to retrieve the default branch uses string
encoding instead of json. This will strip the unnecessary quotes
preventing matching.
2022-09-08 18:14:27 +01:00
Darragh Bailey
ba2c7be494 Handle REXML requires for Ubuntu focal (#1584)
The distribution provided vagrant package on Ubuntu 20.04 is version
2.2.6 running on ruby 2.7.2. It appears that the rexml layout is
slightly different and imports different paths than the current code
expects. Add this combination to the unit tests and switch the requires
to load the specific library requirements instead of relying on rexml
loading everything underneath.

Additionally it appears the hook behaviour change appeared earlier that
the understood vagrant release of 2.2.11, and 2.2.6 also requires the
newer hook behaviour.
2022-09-08 12:44:05 +01:00
Darragh Bailey
602b4e9ad8 Replace remaining stray references with main (#1582)
Ensure default branch has been fully updated everywhere to main, which
should fix the running of the unit and integration tests on the main
branch.
2022-09-07 10:50:28 +00:00
Darragh Bailey
c4efd1de49 Correct type for workflow event (#1570) 2022-09-01 17:39:13 +00:00
Darragh Bailey
06fd99fcef Fix github context reference in workflow (#1548)
Ensure references to the github context are correct.
2022-08-17 12:23:19 +01:00
Darragh Bailey
4fc3c8481d Adjust to ensure previews load isolated code (#1547)
Ensure previews use the plugin script from the tree instead
of the common one for latest and version releases
2022-08-15 22:42:26 +01:00
Darragh Bailey
8717eb6935 Explicity set action for preview action input (#1542)
GitHub actions have changed behaviour subtly in that
now setting the env is no longer sufficient for the
following action to pick up automatically.

Instead switch to being explicit.
2022-08-12 21:27:02 +00:00
a1346054
af77b859e3 Trim trailing whitespace 2022-08-08 22:46:07 +00:00
Darragh Bailey
82202945ce Migrate documentation to github pages (#1523)
Switch from having all documentation contained within the README to
publishing a jekyll static site of documentation under github pages.

This allows for configuration and installation guides to be handled
separately to make for the relevant pieces to be in smaller chunks and
therefore easier to follow for users. Additionally a table of contents
can now be included in a left navigation section that ensures it should
be possible to quickly jump from the start to any section and back
again.

Include support for publishing previews and releases under separate
directories to allow for them to exist at the same time as the other
latest version of the documents.

The navigation section also includes support for accessing any of the
other versions published so that it easier to see what configuration
options exist for a given release. These will be published automatically
when releases are added.
2022-07-19 13:48:02 +00:00
Darragh Bailey
a02208ff88 Correct reference to daysUntilClose (#1516) 2022-06-19 12:19:53 +00:00
Darragh Bailey
cbd81fee81 Switch no-response action as probot deprecated (#1514) 2022-06-19 13:45:14 +02:00
Darragh Bailey
41bd20269e Migrate acceptance tests to rspec (#1513)
Move existing tests executed with the help of bats to use rspec directly
combined with tags to filter them out from being executed by default.

This allows for more complex assertions as well as easier debug as the
code supports use of setting 'VAGRANT_SPEC_SKIP_CLEANUP' to prevent the
tests from removing the temporary directory created for home and work
directories.

Extend a number of classes from vagrant-spec to override default
behaviour to allow passing of additional environment variables for
packaging tests, as well as supporting the skip cleanup. Given the use
of after to perform the cleanup, need to vendor the vagrant-spec
acceptance context in order to modify it easily.
2022-06-13 23:43:06 +01:00
Darragh Bailey
39084ec86b Fix older bundle cloning of dependencies via git (#1470)
Bundler for older ruby versions uses anonymous git to clone ruby
dependencies directly from repos. Ensure these all use https by
configuring git to replace the URL automatically.
2022-03-21 13:01:21 +00:00
Darragh Bailey
380b3c2096 Make simplecov a source development dependency only (#1418)
Remove the need for downstream packaging to either require or patch
out simplecov from existing files by making it an optional development
dependency.
2021-12-03 12:50:02 +00:00
Darragh Bailey
192eefcfbf Default to build and publish extendible image (#1246)
Switch to publishing the image containing all of the libraries and build
dependencies needed to support the plugin being reinstalled as that is
the default behaviour when vagrant installs a new plugin.

This should allow the default image to be extended with additional
plugins and if needed, the authors of the new image may follow and use
the slim version as a base to provide a reduced size docker image.

Fixes: #1198
2021-06-25 19:28:17 +01:00
Darragh Bailey
31cc8aa91e Add basic vagrant package integration test (#1302)
Simple integration test for vagrant package to ensure the execution
completes successfully to allow for some refactoring to be performed.

Ensure libguestfs-tools installed to provide virt-sysprep for tests and
update docs to reflect.
2021-06-01 17:45:02 +01:00
Darragh Bailey
dbbfad2503 Generate test matrix dynamically from bats (#1303)
Extract the tests to be run and generate the matrix dynamically to avoid
needing to update the list within the workflow for each test added.
2021-06-01 17:21:15 +01:00
Darragh Bailey
9d70d261b4 Corrections to two test testing tool (#1276)
Ensure the two disk test tool is used to ensure any tweaks to the format
made to the script are exercised.
2021-05-14 19:11:33 +01:00
Darragh Bailey
4edb9a6831 Ensure git describe works during tests (#1280)
Resolve the error `fatal: No names found, cannot describe anything`
response coming out of calling git-describe due to fetch depth of 1.
2021-05-14 17:22:51 +00:00
Richard Turc
225237b125 Allow to use many disks in vagrant box for libvirt provider
Adds support for a new multi disk box format and handling to upload the
multiple disks to the storage pool.

New format is:
{
  'disks': [
    {
      'name': 'disk1.img',
      'virtual_size': 10,
      'format': 'qcow2'
    },
    {
      'name': 'disk2.img',
      'virtual_size': 15,
      'format': 'qcow2'
    },
    {
      'name': 'disk3.img',
    }
  ],
  'provider': 'libvirt',
  'format': 'qcow2'
}

It is expected to remove format from being set at the top level when
using the new format, with the assuming that qcow2 should be the default
format, and other formats should be permitted to be specified as needed.

Includes tests for handling the box images and creation of domain
volumes. Additionally includes an integration test to ensure a box with
2 disks will work as expected.

Partially fixes: #602
2021-05-08 17:04:10 +01:00
Darragh Bailey
6f608c54bf Fix coveralls reporting (#1272)
Remove nested paths for checking out alternative versions of 
dependencies as this appears to break the github action upload of 
coverage.
2021-05-08 15:51:18 +00:00
Darragh Bailey
fbf026aeaa Support testing against ruby 3.0 (#1243)
Retrieve vagrant and ruby-libvirt dependencies and modify as needed to
allow testing against ruby 3.0 until released versions support.

Use conditionals to skip steps when not needed.

Note that in order to use the locally built gem added to the cache
manually, need to disable checksums. However as all other ruby
versions will continue to use it, shouldn't be an issue as long as the
cache for ruby 3.0.0 is wiped clean before being used for anything such
as publishing.

Fixes: #1244
2021-04-07 19:41:28 +01:00
Emilio Cobos Álvarez
28d475ca29 Fix forward_ports with ruby 3.0 (#1242)
Fedora 24 has moved to ruby 3.0, which triggers an exception in 
vagrant-libvirt when installing it with vagrant provided by the distro.

This is caused by a chance in ruby 3.0 that can be applied to earlier
versions without any down sides:
https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
2021-04-06 15:20:04 +01:00
Michael Ablassmeier
97ea81d2be Use Github actions for integration tests against Vagrant-libvirt (#1091)
Allows to spin up vagrant boxes via vagrant-libvirt in CI replacing the 
need for vagrant-libvirt-qa to be executed separately before/after 
releases.

* Adds a github integration tests workflow
* Installs the needed toolset in separate groups for easier tracking
* Add Vagrantfile definitions for the first simple test cases in tests/ 
  using tinycore linux, using the installed master version these boxes 
  are spun up and destroyed via a test matrix.

Should help reduce effort for new maintainers to help with #1069
2021-03-21 12:06:52 +00:00
Darragh Bailey
28beb0c5f9 Remove flag-name due to behaviour mismatch (#1220)
It appears that the suggestion that flag-name should be set when doing
parallel builds, appears to lead to incorrect reporting by coveralls of
the overall coverage of all runs combined back onto the PR.
2021-03-13 14:56:24 +00:00
Darragh Bailey
bb2b022d3f Ensure github actions run on merge to main branch (#1207)
Remove missed debug line from unit test workflow.
2021-02-20 15:33:15 +00:00
Darragh Bailey
66d394d42e Switch from travis to github actions for unit tests (#1206)
Migrate to github actions as travis has switched to a process that will
require requesting minutes regularly for open source projects, and
current development is slow enough that this additional overhead is too
much.

Correct the generation of the line coverage following the example at
coverallsapp/github-action#29. Remove dependency on coveralls
gem as no longer needed if using the action.

Patch older versions of simplecov to contain a branch_coverage?
method to ensure working with simplecov-lcov.
2021-02-20 15:23:16 +00:00
Darragh Bailey
b657f7c709 Use github cache for docker layers (#1164)
Cache the build layers between github action builds to reduce time
required.
2020-10-27 10:09:49 +00:00
Darragh Bailey
4adc24b8e6 Ensure docker image build has history for version resolving (#1162)
With the switch to using git to resolve the version it's necessary to
ensure the history is available in the clone during the github action.

Add the `context: .` setting to work around a bug in the docker github
action. Based on docker/build-push-action#162
2020-10-27 09:55:08 +00:00
Darragh Bailey
80c81f62f4 Fix release workflow (#1157)
Ensure the release workflow will work consistently by limiting the
number of issues that are checked in addition to making use of a cache.
This should keep the requests below the API limit and overtime may be
increased should the cache be retained.

Add checks to determine the correct default branch and look to establish
if the tag that was created is reachable from this branch, using it as
the value for `commitish` to the create release action so that it
retains the `x commits since release` text and link.

In the case the workflow is re-run for a release after another release
look to pick up the next tag after this release in order to limit the
release notes from updating with additional fixes.
2020-10-23 14:22:35 +01:00
Darragh Bailey
e5c50de3c2 Limit docker image push (#1152)
Tweak workflow to skip attempting to push the docker image without
credentials additionally modify to allow the dockerhub organization to
be managed via a secret so that forked repos may push locally modified
images to their own dockerhub with a minimum of effort.

Additionally given the way github status checks works, this should allow
maintainers of this project to push the same commit to a local branch in
order to build and publish the image to the org dockerhub repository to
allow testing of the image before merging. Based on having first
reviewed and decided it was safe to allow access to any secrets.

Pushing the PR to a local branch will not result in getting a tag with the
pr<num> as the version, however this is a reasonable starting position.
2020-10-04 12:22:23 +01:00
Darragh Bailey
6a9e604e45 Support release notes generation (#1150)
Add github actions to automatically populate release notes on tag push.
This should make it easier to show what new functionality/improvements
have been added by populating the release page based on PRs and issues.
2020-10-03 20:52:31 +01:00
Darragh Bailey
d4d82d9773 Add docker image for vagrant-libvirt (#1149)
Provide a docker image that supports execution of vagrant-libvirt
provided the host system has docker and libvirt installed. This can help
side step many of the library compatibility issues experienced by users
by providing an alternative way to run the latest code should their
distribution not have a natively packaged vagrant.
2020-10-03 17:16:00 +01:00