knife-ionoscloud 5.0.0.beta.1 → 5.0.0
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/build.yml +20 -0
- data/.github/workflows/publish.yml +25 -14
- data/README.md +81 -0
- data/docs/README.md +33 -18
- data/docs/changelog.md +2 -1
- data/docs/subcommands/backupunit_create.md +11 -8
- data/docs/subcommands/backupunit_delete.md +11 -8
- data/docs/subcommands/backupunit_list.md +11 -8
- data/docs/subcommands/backupunit_ssourl.md +13 -10
- data/docs/subcommands/composite_server_create.md +12 -9
- data/docs/subcommands/contract_list.md +11 -8
- data/docs/subcommands/datacenter_create.md +14 -10
- data/docs/subcommands/datacenter_delete.md +11 -8
- data/docs/subcommands/datacenter_list.md +11 -8
- data/docs/subcommands/firewall_create.md +14 -11
- data/docs/subcommands/firewall_delete.md +14 -11
- data/docs/subcommands/firewall_list.md +14 -11
- data/docs/subcommands/group_create.md +11 -8
- data/docs/subcommands/group_delete.md +11 -8
- data/docs/subcommands/group_get.md +12 -9
- data/docs/subcommands/group_list.md +11 -8
- data/docs/subcommands/group_user_add.md +12 -9
- data/docs/subcommands/group_user_remove.md +12 -9
- data/docs/subcommands/image_list.md +11 -8
- data/docs/subcommands/ipblock_create.md +12 -9
- data/docs/subcommands/ipblock_delete.md +11 -8
- data/docs/subcommands/ipblock_list.md +11 -8
- data/docs/subcommands/ipfailover_add.md +15 -12
- data/docs/subcommands/ipfailover_remove.md +14 -11
- data/docs/subcommands/k8s_create.md +11 -8
- data/docs/subcommands/k8s_delete.md +11 -8
- data/docs/subcommands/k8s_list.md +11 -8
- data/docs/subcommands/kubeconfig_get.md +12 -9
- data/docs/subcommands/label_add.md +12 -9
- data/docs/subcommands/label_list.md +11 -8
- data/docs/subcommands/label_remove.md +12 -9
- data/docs/subcommands/lan_create.md +12 -9
- data/docs/subcommands/lan_delete.md +12 -9
- data/docs/subcommands/lan_list.md +12 -9
- data/docs/subcommands/loadbalancer_create.md +12 -9
- data/docs/subcommands/loadbalancer_delete.md +12 -9
- data/docs/subcommands/loadbalancer_get.md +13 -10
- data/docs/subcommands/loadbalancer_list.md +12 -9
- data/docs/subcommands/loadbalancer_nic_add.md +13 -10
- data/docs/subcommands/loadbalancer_nic_remove.md +13 -10
- data/docs/subcommands/location_list.md +11 -8
- data/docs/subcommands/nic_create.md +14 -12
- data/docs/subcommands/nic_delete.md +13 -10
- data/docs/subcommands/nic_list.md +13 -10
- data/docs/subcommands/node_delete.md +13 -10
- data/docs/subcommands/node_list.md +13 -10
- data/docs/subcommands/node_replace.md +14 -11
- data/docs/subcommands/nodepool_create.md +19 -16
- data/docs/subcommands/nodepool_delete.md +12 -9
- data/docs/subcommands/nodepool_list.md +12 -9
- data/docs/subcommands/pcc_create.md +11 -8
- data/docs/subcommands/pcc_delete.md +11 -8
- data/docs/subcommands/pcc_list.md +11 -8
- data/docs/subcommands/request_list.md +12 -9
- data/docs/subcommands/request_status.md +12 -9
- data/docs/subcommands/request_wait.md +12 -9
- data/docs/subcommands/resource_list.md +11 -10
- data/docs/subcommands/s3key_create.md +12 -9
- data/docs/subcommands/s3key_delete.md +12 -9
- data/docs/subcommands/s3key_list.md +12 -9
- data/docs/subcommands/server_create.md +13 -10
- data/docs/subcommands/server_delete.md +13 -10
- data/docs/subcommands/server_list.md +12 -9
- data/docs/subcommands/server_reboot.md +12 -9
- data/docs/subcommands/server_start.md +13 -10
- data/docs/subcommands/server_stop.md +12 -9
- data/docs/subcommands/share_create.md +13 -10
- data/docs/subcommands/share_delete.md +12 -9
- data/docs/subcommands/share_list.md +12 -9
- data/docs/subcommands/snapshot_create.md +13 -10
- data/docs/subcommands/snapshot_delete.md +11 -8
- data/docs/subcommands/snapshot_list.md +11 -8
- data/docs/subcommands/snapshot_restore.md +14 -11
- data/docs/subcommands/user_create.md +12 -10
- data/docs/subcommands/user_delete.md +11 -8
- data/docs/subcommands/user_list.md +12 -9
- data/docs/subcommands/user_ssourl.md +12 -9
- data/docs/subcommands/volume_attach.md +13 -10
- data/docs/subcommands/volume_create.md +12 -9
- data/docs/subcommands/volume_delete.md +12 -9
- data/docs/subcommands/volume_detach.md +13 -10
- data/docs/subcommands/volume_list.md +12 -9
- data/docs/summary.md +1 -0
- data/git-versioning.sh +113 -0
- data/lib/knife-ionoscloud/version.rb +1 -1
- data/sonar-project.properties +12 -0
- metadata +8 -4
data/docs/summary.md
CHANGED
data/git-versioning.sh
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
version="${1}"
|
4
|
+
old_version="${2}"
|
5
|
+
|
6
|
+
committer_name=${COMMITTER_NAME:-"IONOS Cloud CLI Robot"}
|
7
|
+
committer_email=${COMMITTER_EMAIL:-"sdk@cloud.ionos.com"}
|
8
|
+
|
9
|
+
function usage() {
|
10
|
+
echo "usage: ionosctl <version>"
|
11
|
+
}
|
12
|
+
|
13
|
+
function error() {
|
14
|
+
echo "! ERROR: ${1}"
|
15
|
+
}
|
16
|
+
|
17
|
+
function warning() {
|
18
|
+
echo "! WARNING: ${1}"
|
19
|
+
}
|
20
|
+
|
21
|
+
function info() {
|
22
|
+
echo "~ ${1}"
|
23
|
+
}
|
24
|
+
|
25
|
+
function debug() {
|
26
|
+
echo ">> $1"
|
27
|
+
}
|
28
|
+
|
29
|
+
function get_major() {
|
30
|
+
local ret=$(echo "${1}" | cut -d '.' -f 1)
|
31
|
+
local first_char=$(echo "${ret}" | cut -c1-1)
|
32
|
+
if [ "${first_char}" = "v" ]; then
|
33
|
+
# strip the v from the major component
|
34
|
+
ret=$(echo "${ret}" | cut -c2-100)
|
35
|
+
fi
|
36
|
+
echo "${ret}"
|
37
|
+
}
|
38
|
+
|
39
|
+
function get_minor() {
|
40
|
+
echo $(echo "${1}" | cut -d '.' -f 2)
|
41
|
+
}
|
42
|
+
|
43
|
+
if [ "${version}" = "" ]; then
|
44
|
+
error "version not specified"
|
45
|
+
usage
|
46
|
+
exit 1
|
47
|
+
fi
|
48
|
+
|
49
|
+
if [ "${old_version}" = "" ]; then
|
50
|
+
error "old version not specified"
|
51
|
+
usage
|
52
|
+
exit 1
|
53
|
+
fi
|
54
|
+
|
55
|
+
major=$(get_major "${version}")
|
56
|
+
if [ "${major}" = "" ]; then
|
57
|
+
error "cannot compute major version from ${version}"
|
58
|
+
exit 1
|
59
|
+
fi
|
60
|
+
|
61
|
+
minor=$(get_minor "${version}")
|
62
|
+
if [ "${minor}" = "" ]; then
|
63
|
+
error "cannot compute minor version from ${version}"
|
64
|
+
exit 1
|
65
|
+
fi
|
66
|
+
|
67
|
+
info "using git committer name: ${committer_name}"
|
68
|
+
info "using git committer email: ${committer_email}"
|
69
|
+
|
70
|
+
# setting up committer info
|
71
|
+
git config --local user.name "${committer_name}" >/dev/null || exit 1
|
72
|
+
git config --local user.email ${committer_email} >/dev/null || exit 1
|
73
|
+
|
74
|
+
git config --local pull.rebase false
|
75
|
+
|
76
|
+
# we don't need to spam stdout with useless info :)
|
77
|
+
git config --local advice.detachedHead false
|
78
|
+
|
79
|
+
# check if we have a new major or minor
|
80
|
+
info "new version is: ${version}"
|
81
|
+
info "found new version: $(git tag --list "v*" --sort=refname | tail -n 1)"
|
82
|
+
|
83
|
+
info "old version is: ${old_version}"
|
84
|
+
info "found older version: $(git tag --list "v*" --sort=refname | tail -n 2 | head -n 1)"
|
85
|
+
|
86
|
+
info "checking if we have a new major or minor version ..."
|
87
|
+
if [ "${old_version}" != "" ]; then
|
88
|
+
old_major=$(get_major "${old_version}")
|
89
|
+
old_minor=$(get_minor "${old_version}")
|
90
|
+
info "old major: ${old_major} / old minor: is ${old_minor} / current major: ${major} / current minor: ${minor}"
|
91
|
+
if [ "${old_major}" != "" -a "${old_minor}" != "" ]; then
|
92
|
+
if [ "${old_major}" != "${major}" -o "${old_minor}" != "${minor}" ]; then
|
93
|
+
# create release branch for old version from the old version tag
|
94
|
+
branch_name="release/${old_major}.${old_minor}.x"
|
95
|
+
git branch -a | grep ${branch_name}
|
96
|
+
if [ "$?" = "0" ]; then
|
97
|
+
warning "a release branch ${branch_name} already exists"
|
98
|
+
else
|
99
|
+
info "creating a new release branch: ${branch_name}"
|
100
|
+
git checkout ${old_version} >/dev/null || exit 1
|
101
|
+
git checkout -b "${branch_name}" >/dev/null || exit 1
|
102
|
+
git push -u origin ${branch_name} >/dev/null || exit 1
|
103
|
+
git checkout ${version} >/dev/null || exit 1
|
104
|
+
fi
|
105
|
+
else
|
106
|
+
info "no new release branch needed"
|
107
|
+
fi
|
108
|
+
else
|
109
|
+
info "could not compute old major or old minor versions"
|
110
|
+
fi
|
111
|
+
else
|
112
|
+
info "no older versions found"
|
113
|
+
fi
|
@@ -0,0 +1,12 @@
|
|
1
|
+
sonar.projectKey=knife-plugin
|
2
|
+
sonar.organization=ionos-cloud
|
3
|
+
|
4
|
+
# This is the name and version displayed in the SonarCloud UI.
|
5
|
+
#sonar.projectName=knife-plugin
|
6
|
+
#sonar.projectVersion=1.0
|
7
|
+
|
8
|
+
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
|
9
|
+
#sonar.sources=.
|
10
|
+
|
11
|
+
# Encoding of the source code. Default is default system encoding
|
12
|
+
#sonar.sourceEncoding=UTF-8
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-ionoscloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.0
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- IONOS Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|
@@ -83,12 +83,14 @@ files:
|
|
83
83
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
84
84
|
- ".github/ISSUE_TEMPLATE/config.yml"
|
85
85
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
86
|
+
- ".github/workflows/build.yml"
|
86
87
|
- ".github/workflows/ci.yml"
|
87
88
|
- ".github/workflows/publish.yml"
|
88
89
|
- ".gitignore"
|
89
90
|
- ".rubocop.yml"
|
90
91
|
- Gemfile
|
91
92
|
- LICENSE.txt
|
93
|
+
- README.md
|
92
94
|
- Rakefile
|
93
95
|
- docs/README.md
|
94
96
|
- docs/changelog.md
|
@@ -178,6 +180,7 @@ files:
|
|
178
180
|
- docs/summary.md
|
179
181
|
- docs/templates/subcommand_doc.mustache
|
180
182
|
- docs/templates/summary.mustache
|
183
|
+
- git-versioning.sh
|
181
184
|
- knife-ionoscloud.gemspec
|
182
185
|
- lib/chef/knife/ionoscloud_backupunit_create.rb
|
183
186
|
- lib/chef/knife/ionoscloud_backupunit_delete.rb
|
@@ -263,6 +266,7 @@ files:
|
|
263
266
|
- lib/chef/knife/ionoscloud_volume_detach.rb
|
264
267
|
- lib/chef/knife/ionoscloud_volume_list.rb
|
265
268
|
- lib/knife-ionoscloud/version.rb
|
269
|
+
- sonar-project.properties
|
266
270
|
- spec/chef/knife/ionoscloud_backupunit_create_spec.rb
|
267
271
|
- spec/chef/knife/ionoscloud_backupunit_delete_spec.rb
|
268
272
|
- spec/chef/knife/ionoscloud_backupunit_list_spec.rb
|
@@ -364,9 +368,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
364
368
|
version: '0'
|
365
369
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
366
370
|
requirements:
|
367
|
-
- - "
|
371
|
+
- - ">="
|
368
372
|
- !ruby/object:Gem::Version
|
369
|
-
version:
|
373
|
+
version: '0'
|
370
374
|
requirements: []
|
371
375
|
rubygems_version: 3.1.4
|
372
376
|
signing_key:
|