itamae-plugin-recipe-gitlab_runner 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2558c243644df1df3b2e4a256d8b2c455a7b6a6eff8427cc48e1ed1790cb0e5d
|
4
|
+
data.tar.gz: 716db6ae49512c34a3b277e19c735d54fed7a3691f51b8eb8bbd17d7cb3ca412
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8301b9dc87e61d8a9ca6c575c3ac887e073e4515151b51c51cf4757f0895281c6de302b16c8526e76f66f66d7fc0a4de5bab4019050c972b73089fac8b11a83
|
7
|
+
data.tar.gz: 32653284d531fd5b511e8219469489e0aea5887962a80404cad9c9eecf920f314ebd2231c85ccbf742179c902982b076ac1b5d718f61d407abd881c7a42bf34e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
## master
|
2
|
-
[full changelog](https://github.com/sue445/itamae-plugin-recipe-gitlab_runner/compare/v0.
|
2
|
+
[full changelog](https://github.com/sue445/itamae-plugin-recipe-gitlab_runner/compare/v0.2.0...master)
|
3
|
+
|
4
|
+
## 0.2.0
|
5
|
+
[full changelog](https://github.com/sue445/itamae-plugin-recipe-gitlab_runner/compare/v0.1.0...v0.2.0)
|
6
|
+
|
7
|
+
* Impl `register_gitlab_runner`
|
8
|
+
* https://github.com/sue445/itamae-plugin-recipe-gitlab_runner/pull/5
|
3
9
|
|
4
10
|
## 0.1.0
|
5
11
|
* first release
|
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
Itamae plugin to install [GitLab Runner](https://docs.gitlab.com/runner/)
|
4
4
|
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/itamae-plugin-recipe-gitlab_runner.svg)](https://badge.fury.io/rb/itamae-plugin-recipe-gitlab_runner)
|
5
6
|
[![Build Status](https://travis-ci.org/sue445/itamae-plugin-recipe-gitlab_runner.svg?branch=master)](https://travis-ci.org/sue445/itamae-plugin-recipe-gitlab_runner)
|
6
7
|
|
7
8
|
## Installation
|
@@ -31,12 +32,9 @@ Or `include_recipe` just what you need manually:
|
|
31
32
|
|
32
33
|
```ruby
|
33
34
|
include_recipe "gitlab_runner::install"
|
35
|
+
include_recipe "gitlab_runner::register_gitlab_runner"
|
34
36
|
```
|
35
37
|
|
36
|
-
After, you need to register a runner
|
37
|
-
|
38
|
-
https://docs.gitlab.com/runner/register/index.html
|
39
|
-
|
40
38
|
### Node
|
41
39
|
|
42
40
|
```yml
|
@@ -45,6 +43,31 @@ gitlab-runner:
|
|
45
43
|
version: "10.0.0" # optional. Install latest version if omitted
|
46
44
|
```
|
47
45
|
|
46
|
+
### `register_gitlab_runner`
|
47
|
+
Register a gitlab_runner
|
48
|
+
|
49
|
+
* `name` (`String`)
|
50
|
+
* runner name
|
51
|
+
* `options` (`Array`, `String`)
|
52
|
+
* args for `gitlab-runner register`
|
53
|
+
* `--non-interactive`, `--name` and `--description` are needless
|
54
|
+
* c.f. https://docs.gitlab.com/runner/register/#one-line-registration-command
|
55
|
+
|
56
|
+
e.g)
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
register_gitlab_runner "docker-runner" do
|
60
|
+
options [
|
61
|
+
"--url", "https://gitlab.com/",
|
62
|
+
"--registration-token", "PROJECT_REGISTRATION_TOKEN",
|
63
|
+
"--executor", "docker",
|
64
|
+
"--tag-list", "docker,aws",
|
65
|
+
"--run-untagged",
|
66
|
+
"--locked", "false",
|
67
|
+
]
|
68
|
+
end
|
69
|
+
```
|
70
|
+
|
48
71
|
## Development
|
49
72
|
|
50
73
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -0,0 +1,12 @@
|
|
1
|
+
define :register_gitlab_runner, options: [] do
|
2
|
+
runner_name = params[:name]
|
3
|
+
|
4
|
+
raise "name is required. (e.g. register_gitlab_runner 'your_runner_name')" unless runner_name
|
5
|
+
|
6
|
+
register_args = ["--non-interactive", "--name", runner_name] + Array(params[:options])
|
7
|
+
register_args.compact!
|
8
|
+
|
9
|
+
execute "gitlab-runner register #{register_args.join(" ")}" do
|
10
|
+
not_if "gitlab-runner list | grep '#{runner_name}'"
|
11
|
+
end
|
12
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itamae-plugin-recipe-gitlab_runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: itamae
|
@@ -101,6 +101,7 @@ files:
|
|
101
101
|
- lib/itamae/plugin/recipe/gitlab_runner.rb
|
102
102
|
- lib/itamae/plugin/recipe/gitlab_runner/default.rb
|
103
103
|
- lib/itamae/plugin/recipe/gitlab_runner/install.rb
|
104
|
+
- lib/itamae/plugin/recipe/gitlab_runner/register_gitlab_runner.rb
|
104
105
|
- lib/itamae/plugin/recipe/gitlab_runner/version.rb
|
105
106
|
homepage: https://github.com/sue445/itamae-plugin-recipe-gitlab_runner
|
106
107
|
licenses:
|