intello-shipit-cli 0.6.0.rc3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +17 -0
- data/Gemfile +0 -0
- data/Guardfile +0 -0
- data/LICENSE +2 -2
- data/README.md +46 -8
- data/Rakefile +0 -0
- data/doc/mr.png +0 -0
- data/lib/shipit/cli/version.rb +1 -1
- data/lib/shipit/cli/work.rb +6 -3
- data/shipit-cli.gemspec +1 -1
- data/shipit-windows.bat +60 -0
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8357db54113d84cd737edb6bf57228fa235df527fba88af7de8eecaa4d0f5d4
|
4
|
+
data.tar.gz: 3716cc73141f21833285e40a3b1b3f28199de3eae8d0133008e5b36e35015d92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63e909865718db3d151bfdaed972b7f127cd9d905ee42f5a6584849d4d5b706156ba98c795a12acfff063b4375e0762b6c2bd66de31e1e4d9a0564d095f7f8e5
|
7
|
+
data.tar.gz: 27dee93a4f8a9a667eda387f8946509708738f63c7e1cd1c29d4e48bef437a28117829d893c63c6e6a8925289deeaa3e8686df5e15266814a3b24041c768a752
|
data/Changelog.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
NOTE: the project follows [Semantic Versioning](http://semver.org/).
|
6
|
+
|
7
|
+
## Firmware
|
8
|
+
|
9
|
+
### v1.1.0 - February 7th, 2022
|
10
|
+
|
11
|
+
- [enhancement] #5 - Run shipit from a Docker environement for nonLinux environement
|
12
|
+
- [task] #1 - Support gitlab.com new Draft status
|
13
|
+
|
14
|
+
### v1.0.0 - November 25th, 2021
|
15
|
+
|
16
|
+
- Inivial version
|
17
|
+
|
data/Gemfile
CHANGED
File without changes
|
data/Guardfile
CHANGED
File without changes
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright Intello Technologies Inc, 2016-
|
3
|
+
Copyright Intello Technologies Inc, 2016-2020.
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -12,30 +12,64 @@ Designed to simplify collaboration with Git and Gitlab, its main purpose is to k
|
|
12
12
|
|
13
13
|
## Requirements
|
14
14
|
|
15
|
-
-
|
16
|
-
- RubyGems 1.9+
|
15
|
+
- Git
|
17
16
|
- A `gitlab` personal access token (`https://{{ YOUR_GITLAB_HOST }}/profile/personal_access_tokens`)
|
18
17
|
- Issues must have a label and a milestone
|
19
18
|
|
20
19
|
`intello-shipit-cli` works as well on gitlab.com as on a privately hosted instance of Gitlab
|
21
20
|
|
21
|
+
### Linux / macOS
|
22
|
+
|
23
|
+
- Ruby 2.5+
|
24
|
+
|
25
|
+
### Windows
|
26
|
+
|
27
|
+
- Docker
|
28
|
+
|
29
|
+
A .shipit.yml file must exist in `C:\Users\[my_user]\.shipit.yml` or to a path specified by `-c [path_to_file]`
|
30
|
+
SSH keys should be present in `C:\Users\[my_user]\.ssh`
|
31
|
+
|
32
|
+
Here is an example of the format of the file :
|
33
|
+
|
34
|
+
```yaml
|
35
|
+
---
|
36
|
+
endpoint: endpoint
|
37
|
+
private_token: private_token
|
38
|
+
```
|
39
|
+
|
40
|
+
As an example, the [endpoint for gitlab.com](https://docs.gitlab.com/ee/api/#current-status) is `https://gitlab.intello.com/api/v4`.
|
41
|
+
|
22
42
|
## Install/Update
|
23
43
|
|
44
|
+
### Linux / macOS
|
45
|
+
|
24
46
|
```bash
|
25
47
|
gem install intello-shipit-cli
|
26
48
|
```
|
27
49
|
|
28
50
|
> NOTE: If you use a ruby manager, the gem has to be installed each time you want to use it in a new ruby context.
|
29
51
|
|
30
|
-
|
52
|
+
#### PROTIP
|
31
53
|
|
32
54
|
If you use rbenv as your ruby manager, and want to easily install/update `intello-shipit-cli` across all your rubies:
|
33
55
|
|
34
56
|
1. Install [rbenv-each](https://github.com/rbenv/rbenv-each)
|
35
57
|
1. Run `rbenv each gem install intello-shipit-cli`
|
36
58
|
|
59
|
+
### Windows
|
60
|
+
|
61
|
+
Move `shipit-windows.bat` to a folder present in your environment %PATH%.
|
62
|
+
shipit-windows.bat needs to be run from a gitlab project.
|
63
|
+
|
64
|
+
#### Known issues
|
65
|
+
|
66
|
+
- Virtualization may not be enabled on certain AMD processors.
|
67
|
+
- From our experience, You may need to update to Windows build 2004 and re-install Docker or Docker Desktop to fix the above mentionned issue.
|
68
|
+
|
37
69
|
## Setup
|
38
70
|
|
71
|
+
### Linux
|
72
|
+
|
39
73
|
You must first setup `intello-shipit-cli` by running:
|
40
74
|
|
41
75
|
```bash
|
@@ -49,6 +83,12 @@ This will interactivly ask you for:
|
|
49
83
|
|
50
84
|
The setup will create a file in your user root folder called `.shipit.yml` with this information.
|
51
85
|
|
86
|
+
### Windows
|
87
|
+
|
88
|
+
You must manually set up your `.shipit.yml` file in your home directory : `C:\Users\[your_user]\.shipit.yml`
|
89
|
+
Setup will be performed when you first run `shipit-windows.bat`.
|
90
|
+
First time use may take a few minutes to configure its Docker environment.
|
91
|
+
|
52
92
|
### PROTIP
|
53
93
|
|
54
94
|
If you have multiple Gitlab servers or account you can manually create configuration YAML files and use the `-c` option of `intello-shipit-cli` to select the proper configuration.
|
@@ -117,7 +157,6 @@ All you have to do is start coding.
|
|
117
157
|
|
118
158
|
* rbenv or rvm
|
119
159
|
* Ruby 2.5+
|
120
|
-
* RubyGems 1.9+ (`gem update --system `)
|
121
160
|
* Bundler 1.10+
|
122
161
|
* [ctags](http://ctags.sourceforge.net/)
|
123
162
|
|
@@ -140,15 +179,14 @@ You can write tests using `rspec v3+` syntax in the `spec` folder. To run the te
|
|
140
179
|
|
141
180
|
## License
|
142
181
|
|
143
|
-
Copyright Intello Technologies Inc, 2016-
|
182
|
+
Copyright Intello Technologies Inc, 2016-2020. Licensed under the [MIT license](/LICENSE?raw=true).
|
144
183
|
|
145
184
|
## About Intello Technologies Inc.
|
146
185
|
|
147
|
-
Intello is
|
186
|
+
Intello is sponsoring this project as we believe in open-source and the open-source community.
|
148
187
|
|
149
188
|
Intello Technologies was founded by experts from hotel & IT industry backgrounds in 2003. Based in Montreal, Canada, we're more than just a services company or a simple VAR: we develop our own in-house software which we integrate with existing industry-leading hardware and then support for years to come.
|
150
189
|
|
151
190
|
Our team has in-depth knowledge of software development combined with years of sales and field management experience in the hospitality and lodging industries. Our solutions have been deployed throughout the United States, Canada, Mexico, the Caribbean and even in Africa, and our helpdesk ensures our customers are supported around the clock. Recognized as industry leaders in our fields of expertise, our company goal is to provide great solutions and support.
|
152
191
|
|
153
|
-
Find out more
|
154
|
-
|
192
|
+
Find out more on our web site at <https://www.intello.com>
|
data/Rakefile
CHANGED
File without changes
|
data/doc/mr.png
CHANGED
Binary file
|
data/lib/shipit/cli/version.rb
CHANGED
data/lib/shipit/cli/work.rb
CHANGED
@@ -63,7 +63,10 @@ module Shipit
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def create_merge_request(issue)
|
66
|
-
|
66
|
+
if dry_run?
|
67
|
+
puts " - Merge request name: #{issue["merge_request_title"]}"
|
68
|
+
return
|
69
|
+
end
|
67
70
|
opts = issue.slice("source_branch", "target_branch", "assignee_id", "labels", "milestone_id", "remove_source_branch")
|
68
71
|
client.create_merge_request(project_path,
|
69
72
|
issue["merge_request_title"],
|
@@ -92,10 +95,10 @@ module Shipit
|
|
92
95
|
assignee_id = assignee["id"]
|
93
96
|
issue_title = sane_title.parameterize[0..20]
|
94
97
|
first_commit_message = "[#{labels}] Fixes ##{issue_id} - #{sane_title}"
|
95
|
-
mr_title = "
|
98
|
+
mr_title = "Draft: [#{labels}] ##{issue_id} - #{sane_title}"
|
96
99
|
|
97
100
|
# 2. Add to issue properties
|
98
|
-
issue["source_branch"] = [issue["labels"].first, assignee_initials, issue_id, issue_title].compact.join("-")
|
101
|
+
issue["source_branch"] = [issue["labels"].first.gsub(/\s+/, ""), assignee_initials, issue_id, issue_title].compact.join("-")
|
99
102
|
issue["first_commit_message"] = first_commit_message
|
100
103
|
issue["target_branch"] = target_branch
|
101
104
|
issue["merge_request_title"] = mr_title
|
data/shipit-cli.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_dependency "gli", "~> 2.13"
|
24
24
|
spec.add_dependency "gitlab", "~> 4.3.0"
|
25
25
|
|
26
|
-
spec.add_development_dependency "bundler", "~> 2.0
|
26
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
27
27
|
spec.add_development_dependency "guard"
|
28
28
|
spec.add_development_dependency "guard-ctags-bundler"
|
29
29
|
spec.add_development_dependency "guard-rspec"
|
data/shipit-windows.bat
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
@echo off
|
2
|
+
|
3
|
+
docker info > NUL 2>&1
|
4
|
+
|
5
|
+
REM Checks if docker is running or not
|
6
|
+
if errorlevel 1 (
|
7
|
+
echo Please install or start Docker
|
8
|
+
exit /b 1
|
9
|
+
)
|
10
|
+
|
11
|
+
REM If a -c flag is passed as the first argument
|
12
|
+
IF [%1] == [-c] (
|
13
|
+
|
14
|
+
REM If the file doesn't exist, stop here
|
15
|
+
IF [%2] NEQ [] (
|
16
|
+
IF NOT EXIST "%2" (
|
17
|
+
echo %2 - File does not exist
|
18
|
+
exit /b 1
|
19
|
+
)
|
20
|
+
)
|
21
|
+
|
22
|
+
REM Otherwise copy the config file to WORKDIR of container
|
23
|
+
xcopy /y %2 . > NUL 2>&1
|
24
|
+
)
|
25
|
+
|
26
|
+
REM Create temp dockerfile
|
27
|
+
(
|
28
|
+
echo FROM ruby:2.5
|
29
|
+
echo RUN gem install intello-shipit-cli
|
30
|
+
echo WORKDIR /usr/src/project
|
31
|
+
) > %TEMP%\Dockerfile
|
32
|
+
|
33
|
+
REM Check if Ruby container already is installed locally
|
34
|
+
docker inspect --type=image ruby:2.5 > NUL 2>&1
|
35
|
+
|
36
|
+
IF errorlevel 1 (
|
37
|
+
ECHO Please wait while we perform a first-time setup for shipit on your Windows environment. This can take several minutes.
|
38
|
+
)
|
39
|
+
|
40
|
+
REM Build Container
|
41
|
+
docker build -t "shipit-docker" -f %TEMP%\Dockerfile . > NUL 2>&1
|
42
|
+
|
43
|
+
REM Depending on is -c was passed, use the right arg number to run container
|
44
|
+
IF [%1] == [-c] (
|
45
|
+
docker run -v %CD%:/usr/src/project ^
|
46
|
+
-v %HOMEDRIVE%%HOMEPATH%"\authorized_keys":/root/.ssh/authorized_keys ^
|
47
|
+
-v %HOMEDRIVE%%HOMEPATH%"\.gitconfig":/root/.gitconfig ^
|
48
|
+
-v %HOMEDRIVE%%HOMEPATH%"\.ssh":/root/ssh_temp/ ^
|
49
|
+
--rm shipit-docker:latest /bin/bash -c "cp -f /root/ssh_temp/* /root/.ssh/ ; chmod 0600 /root/.ssh/* ; shipit -c .shipit.yml %3 %4"
|
50
|
+
del .shipit.yml
|
51
|
+
) else (
|
52
|
+
docker run -v %CD%:/usr/src/project ^
|
53
|
+
-v %HOMEDRIVE%%HOMEPATH%"\authorized_keys":/root/.ssh/authorized_keys ^
|
54
|
+
-v %HOMEDRIVE%%HOMEPATH%"\.gitconfig":/root/.gitconfig ^
|
55
|
+
-v %HOMEDRIVE%%HOMEPATH%"\.ssh":/root/ssh_temp/ ^
|
56
|
+
-v %HOMEDRIVE%%HOMEPATH%"\.shipit.yml":/root/.shipit.yml ^
|
57
|
+
--rm shipit-docker:latest /bin/bash -c "cp -f /root/ssh_temp/* /root/.ssh/ ; chmod 0600 /root/.ssh/* ; shipit -c /root/.shipit.yml %1 %2"
|
58
|
+
)
|
59
|
+
|
60
|
+
del %TEMP%\Dockerfile
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: intello-shipit-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Thouret
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.0
|
61
|
+
version: '2.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 2.0
|
68
|
+
version: '2.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: guard
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -193,6 +193,7 @@ files:
|
|
193
193
|
- ".rubocop.yml"
|
194
194
|
- ".ruby-style.yml"
|
195
195
|
- ".ruby-version"
|
196
|
+
- Changelog.md
|
196
197
|
- Gemfile
|
197
198
|
- Guardfile
|
198
199
|
- LICENSE
|
@@ -215,6 +216,7 @@ files:
|
|
215
216
|
- script/release
|
216
217
|
- script/test
|
217
218
|
- shipit-cli.gemspec
|
219
|
+
- shipit-windows.bat
|
218
220
|
homepage: https://gitlab.com/intello/shipit-cli
|
219
221
|
licenses:
|
220
222
|
- MIT
|
@@ -230,12 +232,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
230
232
|
version: 2.5.0
|
231
233
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
232
234
|
requirements:
|
233
|
-
- - "
|
235
|
+
- - ">="
|
234
236
|
- !ruby/object:Gem::Version
|
235
|
-
version:
|
237
|
+
version: '0'
|
236
238
|
requirements: []
|
237
|
-
|
238
|
-
rubygems_version: 2.7.8
|
239
|
+
rubygems_version: 3.2.3
|
239
240
|
signing_key:
|
240
241
|
specification_version: 4
|
241
242
|
summary: Designed to simplify working with Gitlab, its main purpose is to kickstart
|