cloudstack-cli 1.6.11 → 1.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +126 -0
- data/.github/workflows/update-bundle.yml +43 -0
- data/.ruby-version +1 -0
- data/Gemfile.lock +6 -6
- data/README.md +23 -0
- data/cloudstack-cli.gemspec +1 -1
- data/lib/cloudstack-cli/version.rb +1 -1
- metadata +11 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dccf7d08777c4d38df4aec0aae14d3b6bcee70b32947e0f7baaa4729c5bd7985
|
|
4
|
+
data.tar.gz: 146dc68f6b95c54e2aee22d2f6a348306e0aa9b4fc1e9aff0b3e2cf3aa70c00c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e0c728215c2be6cb27f7760c7f13ab27d5eb473ea898110105a28b6d3d02d8d2fa4ac262dbc45ba903d5910a17735342304d18522ae863e774ee3e63d0370729
|
|
7
|
+
data.tar.gz: f3efcb52b83a860cb1058ce0e08a7d4404d453afd5f311febc6849df8002170c0136ec36e4cc6b5a911ced28bdc507ab6381a19095d3871462362ef4c7ea6e49
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
name: Release gem
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- 'v*'
|
|
9
|
+
paths:
|
|
10
|
+
- 'lib/cloudstack-cli/version.rb'
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
inputs:
|
|
13
|
+
tag:
|
|
14
|
+
description: 'Release tag to publish, for example v1.6.12'
|
|
15
|
+
required: true
|
|
16
|
+
type: string
|
|
17
|
+
|
|
18
|
+
permissions:
|
|
19
|
+
contents: write
|
|
20
|
+
|
|
21
|
+
concurrency:
|
|
22
|
+
group: release-${{ github.event.inputs.tag || github.ref_name || github.sha }}
|
|
23
|
+
cancel-in-progress: false
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
release:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
|
|
29
|
+
steps:
|
|
30
|
+
- name: Check out repository
|
|
31
|
+
uses: actions/checkout@v4
|
|
32
|
+
with:
|
|
33
|
+
fetch-depth: 0
|
|
34
|
+
|
|
35
|
+
- name: Resolve release metadata
|
|
36
|
+
id: release
|
|
37
|
+
run: |
|
|
38
|
+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
|
39
|
+
RELEASE_TAG='${{ github.event.inputs.tag }}'
|
|
40
|
+
git fetch --force --tags origin
|
|
41
|
+
|
|
42
|
+
if git rev-parse "refs/tags/$RELEASE_TAG" >/dev/null 2>&1; then
|
|
43
|
+
git checkout "$RELEASE_TAG"
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
VERSION="$(ruby -e 'require "./lib/cloudstack-cli/version"; print CloudstackCli::VERSION')"
|
|
47
|
+
elif [ "$GITHUB_REF_TYPE" = "tag" ]; then
|
|
48
|
+
RELEASE_TAG="$GITHUB_REF_NAME"
|
|
49
|
+
VERSION="$(ruby -e 'require "./lib/cloudstack-cli/version"; print CloudstackCli::VERSION')"
|
|
50
|
+
else
|
|
51
|
+
VERSION="$(ruby -e 'require "./lib/cloudstack-cli/version"; print CloudstackCli::VERSION')"
|
|
52
|
+
RELEASE_TAG="v$VERSION"
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
echo "release_tag=$RELEASE_TAG" >> "$GITHUB_OUTPUT"
|
|
56
|
+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
57
|
+
|
|
58
|
+
- name: Set up Ruby
|
|
59
|
+
uses: ruby/setup-ruby@v1
|
|
60
|
+
with:
|
|
61
|
+
ruby-version: .ruby-version
|
|
62
|
+
bundler-cache: true
|
|
63
|
+
|
|
64
|
+
- name: Verify tag matches gem version
|
|
65
|
+
run: |
|
|
66
|
+
VERSION='${{ steps.release.outputs.version }}'
|
|
67
|
+
TAG_VERSION='${{ steps.release.outputs.release_tag }}'
|
|
68
|
+
TAG_VERSION="${TAG_VERSION#v}"
|
|
69
|
+
|
|
70
|
+
if [ "$TAG_VERSION" != "$VERSION" ]; then
|
|
71
|
+
echo "Tag version ($TAG_VERSION) does not match gem version ($VERSION)."
|
|
72
|
+
exit 1
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
- name: Create release tag from branch
|
|
76
|
+
if: github.ref_type == 'branch' || github.event_name == 'workflow_dispatch'
|
|
77
|
+
run: |
|
|
78
|
+
RELEASE_TAG='${{ steps.release.outputs.release_tag }}'
|
|
79
|
+
|
|
80
|
+
git fetch --force --tags origin
|
|
81
|
+
|
|
82
|
+
if git rev-parse "refs/tags/$RELEASE_TAG" >/dev/null 2>&1; then
|
|
83
|
+
TAG_SHA="$(git rev-list -n 1 "refs/tags/$RELEASE_TAG")"
|
|
84
|
+
|
|
85
|
+
if [ "$TAG_SHA" != "$GITHUB_SHA" ]; then
|
|
86
|
+
echo "Tag $RELEASE_TAG already exists on $TAG_SHA, expected $GITHUB_SHA."
|
|
87
|
+
exit 1
|
|
88
|
+
fi
|
|
89
|
+
else
|
|
90
|
+
git config user.name 'github-actions[bot]'
|
|
91
|
+
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
|
92
|
+
git tag -a "$RELEASE_TAG" -m "Release $RELEASE_TAG"
|
|
93
|
+
git push origin "$RELEASE_TAG"
|
|
94
|
+
fi
|
|
95
|
+
|
|
96
|
+
git checkout "$RELEASE_TAG"
|
|
97
|
+
|
|
98
|
+
- name: Run test suite
|
|
99
|
+
run: bundle exec rake test
|
|
100
|
+
|
|
101
|
+
- name: Build gem
|
|
102
|
+
run: gem build cloudstack-cli.gemspec
|
|
103
|
+
|
|
104
|
+
- name: Check whether version already exists on RubyGems
|
|
105
|
+
id: rubygems
|
|
106
|
+
env:
|
|
107
|
+
RELEASE_VERSION: ${{ steps.release.outputs.version }}
|
|
108
|
+
run: |
|
|
109
|
+
if ruby -rjson -ropen-uri -e 'versions = JSON.parse(URI.open("https://rubygems.org/api/v1/versions/cloudstack-cli.json", &:read)); exit(versions.any? { |item| item["number"] == ENV.fetch("RELEASE_VERSION") } ? 0 : 1)'; then
|
|
110
|
+
echo "Version $RELEASE_VERSION already exists on RubyGems."
|
|
111
|
+
echo 'exists=true' >> "$GITHUB_OUTPUT"
|
|
112
|
+
else
|
|
113
|
+
echo 'exists=false' >> "$GITHUB_OUTPUT"
|
|
114
|
+
fi
|
|
115
|
+
|
|
116
|
+
- name: Publish to RubyGems
|
|
117
|
+
if: steps.rubygems.outputs.exists != 'true'
|
|
118
|
+
env:
|
|
119
|
+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
|
120
|
+
run: |
|
|
121
|
+
if [ -z "$GEM_HOST_API_KEY" ]; then
|
|
122
|
+
echo 'Missing RUBYGEMS_API_KEY secret.'
|
|
123
|
+
exit 1
|
|
124
|
+
fi
|
|
125
|
+
|
|
126
|
+
gem push "cloudstack-cli-${{ steps.release.outputs.version }}.gem"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Update bundle
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: '0 6 1 * *'
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
update:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Check out repository
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Ruby
|
|
21
|
+
uses: ruby/setup-ruby@v1
|
|
22
|
+
with:
|
|
23
|
+
ruby-version: .ruby-version
|
|
24
|
+
bundler-cache: true
|
|
25
|
+
|
|
26
|
+
- name: Update bundle lockfile
|
|
27
|
+
run: bundle update
|
|
28
|
+
|
|
29
|
+
- name: Run test suite
|
|
30
|
+
run: bundle exec rake test
|
|
31
|
+
|
|
32
|
+
- name: Create pull request
|
|
33
|
+
uses: peter-evans/create-pull-request@v7
|
|
34
|
+
with:
|
|
35
|
+
branch: github-actions/update-bundle
|
|
36
|
+
commit-message: 'chore: update bundle lockfile'
|
|
37
|
+
title: 'chore: update bundle lockfile'
|
|
38
|
+
body: |
|
|
39
|
+
Automated dependency refresh for the bundle lockfile.
|
|
40
|
+
|
|
41
|
+
- Runs `bundle update`
|
|
42
|
+
- Verifies the test suite with `bundle exec rake test`
|
|
43
|
+
delete-branch: true
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.3
|
data/Gemfile.lock
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
cloudstack-cli (1.6.
|
|
5
|
-
cloudstack_client (~> 1.
|
|
4
|
+
cloudstack-cli (1.6.12)
|
|
5
|
+
cloudstack_client (~> 1.6.0)
|
|
6
6
|
thor (~> 1.1.0)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
cloudstack_client (1.
|
|
12
|
-
minitest (5.
|
|
13
|
-
rake (13.
|
|
11
|
+
cloudstack_client (1.6.0)
|
|
12
|
+
minitest (5.27.0)
|
|
13
|
+
rake (13.4.2)
|
|
14
14
|
thor (1.1.0)
|
|
15
15
|
|
|
16
16
|
PLATFORMS
|
|
@@ -22,4 +22,4 @@ DEPENDENCIES
|
|
|
22
22
|
rake (~> 13.0)
|
|
23
23
|
|
|
24
24
|
BUNDLED WITH
|
|
25
|
-
2.
|
|
25
|
+
2.6.9
|
data/README.md
CHANGED
|
@@ -197,6 +197,29 @@ $ cloudstack-cli router list --project Demo --status running --redundant-state B
|
|
|
197
197
|
3. Currently you need to create a isolated network named "test-network" manually on the simulator
|
|
198
198
|
4. Run `bundle exec rake test`
|
|
199
199
|
|
|
200
|
+
## Automation
|
|
201
|
+
|
|
202
|
+
GitHub Actions are configured for dependency maintenance and RubyGems releases.
|
|
203
|
+
|
|
204
|
+
### Bundle updates
|
|
205
|
+
|
|
206
|
+
The `Update bundle` workflow runs monthly and can also be started manually from the Actions tab. It runs `bundle update`, verifies the test suite, and opens a pull request with the updated lockfile.
|
|
207
|
+
|
|
208
|
+
### Releases
|
|
209
|
+
|
|
210
|
+
The `Release gem` workflow publishes to RubyGems when a tag like `v1.6.12` is pushed. It also runs when `lib/cloudstack-cli/version.rb` changes on `main`, creates the matching tag automatically, and publishes that version. You can also trigger it manually from the Actions tab with a release tag like `v1.6.12`; if the tag does not exist yet, the workflow creates it from the selected branch before publishing.
|
|
211
|
+
|
|
212
|
+
Add the `RUBYGEMS_API_KEY` repository secret before using the release workflow.
|
|
213
|
+
|
|
214
|
+
Typical release flow:
|
|
215
|
+
|
|
216
|
+
1. Update `lib/cloudstack-cli/version.rb`.
|
|
217
|
+
2. Commit and push the version change.
|
|
218
|
+
3. Push to `main`.
|
|
219
|
+
4. GitHub Actions creates the matching tag, verifies the tag matches the gem version, and pushes the release to RubyGems.
|
|
220
|
+
|
|
221
|
+
If you prefer, you can still create and push the matching tag yourself, for example `git tag v1.6.12 && git push origin v1.6.12`.
|
|
222
|
+
|
|
200
223
|
## Contributing
|
|
201
224
|
|
|
202
225
|
1. Fork it
|
data/cloudstack-cli.gemspec
CHANGED
|
@@ -24,6 +24,6 @@ Gem::Specification.new do |gem|
|
|
|
24
24
|
gem.add_development_dependency('rake', '~> 13.0')
|
|
25
25
|
gem.add_development_dependency('minitest', '~> 5.11')
|
|
26
26
|
|
|
27
|
-
gem.add_dependency('cloudstack_client', '~> 1.
|
|
27
|
+
gem.add_dependency('cloudstack_client', '~> 1.6.0')
|
|
28
28
|
gem.add_dependency('thor', '~> 1.1.0')
|
|
29
29
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cloudstack-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nik Wolfgramm
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: bin
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2026-04-16 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: rake
|
|
@@ -43,14 +44,14 @@ dependencies:
|
|
|
43
44
|
requirements:
|
|
44
45
|
- - "~>"
|
|
45
46
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: 1.
|
|
47
|
+
version: 1.6.0
|
|
47
48
|
type: :runtime
|
|
48
49
|
prerelease: false
|
|
49
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
50
51
|
requirements:
|
|
51
52
|
- - "~>"
|
|
52
53
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: 1.
|
|
54
|
+
version: 1.6.0
|
|
54
55
|
- !ruby/object:Gem::Dependency
|
|
55
56
|
name: thor
|
|
56
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -73,7 +74,10 @@ executables:
|
|
|
73
74
|
extensions: []
|
|
74
75
|
extra_rdoc_files: []
|
|
75
76
|
files:
|
|
77
|
+
- ".github/workflows/release.yml"
|
|
78
|
+
- ".github/workflows/update-bundle.yml"
|
|
76
79
|
- ".gitignore"
|
|
80
|
+
- ".ruby-version"
|
|
77
81
|
- Gemfile
|
|
78
82
|
- Gemfile.lock
|
|
79
83
|
- LICENSE.txt
|
|
@@ -135,6 +139,7 @@ homepage: http://github.com/niwo/cloudstack-cli
|
|
|
135
139
|
licenses:
|
|
136
140
|
- MIT
|
|
137
141
|
metadata: {}
|
|
142
|
+
post_install_message:
|
|
138
143
|
rdoc_options:
|
|
139
144
|
- "--line-numbers"
|
|
140
145
|
- "--inline-source"
|
|
@@ -151,7 +156,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
151
156
|
- !ruby/object:Gem::Version
|
|
152
157
|
version: '0'
|
|
153
158
|
requirements: []
|
|
154
|
-
rubygems_version: 3.
|
|
159
|
+
rubygems_version: 3.5.22
|
|
160
|
+
signing_key:
|
|
155
161
|
specification_version: 4
|
|
156
162
|
summary: cloudstack-cli CloudStack API client
|
|
157
163
|
test_files:
|