cigale 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 +4 -4
- data/README.md +86 -13
- data/lib/cigale/scm/git.rb +1 -1
- data/lib/cigale/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eb61ed014851e56049896db0a290096bdefb6a4
|
4
|
+
data.tar.gz: 7a754966a5b5341078cc55ca3114e09a53755ac5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3f5c930de2cd19c7e3c032ac494418a51259412f58612d2b09c97b6174a7d26e0e0b40894972019190c3114d12733600b6fcb49fbd23fa5da1875dbd0f8b3c5
|
7
|
+
data.tar.gz: 2582f5e78e9768a5eb9dfb245ca6f3d96e23d10d073b296799d061a7986e5532b85e7d2fff9c1cc7b1f1b89e2765e4b96317c6099db919bc9128ef99368a03e0
|
data/README.md
CHANGED
@@ -1,35 +1,102 @@
|
|
1
1
|
# cigale
|
2
2
|
|
3
|
+
![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)
|
3
4
|
[![Build Status](https://travis-ci.org/itchio/cigale.svg)](https://travis-ci.org/itchio/cigale)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/cigale.svg)](https://badge.fury.io/rb/cigale)
|
4
6
|
|
5
|
-
|
7
|
+
cigale generates XML configuration that Jenkins can grok, from a bunch of
|
8
|
+
human-readable, diff-friendly, YAML files.
|
6
9
|
|
7
|
-
|
8
|
-
human-readable, diff-friendly, YAML files.
|
9
|
-
* It's not production-ready
|
10
|
+
Key points:
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
* The source code is actually readable
|
12
|
+
* The source code should be human-readable
|
14
13
|
* Macros are just a YAML subtree that can be instanciated with
|
15
14
|
parameters of any types (scalars, sequences, etc.)
|
16
|
-
* It's not production-ready
|
17
15
|
|
18
16
|
## Installation
|
19
17
|
|
20
|
-
|
18
|
+
Run:
|
21
19
|
|
22
20
|
```bash
|
23
|
-
|
24
|
-
rake install
|
21
|
+
gem install cigale
|
25
22
|
```
|
26
23
|
|
27
24
|
## Usage
|
28
25
|
|
29
|
-
|
26
|
+
The `test` command generates XML files for you to inspect
|
27
|
+
|
28
|
+
```bash
|
29
|
+
cigale test spec/fixtures/parity/builders/fixtures/ant001.yaml -o tmp
|
30
|
+
```
|
31
|
+
|
32
|
+
This would create the `./tmp` directory and generate XML files in there.
|
33
|
+
|
34
|
+
You can also specify a whole directory, in which case, cigale will parse
|
35
|
+
the whole directory recursively and generate all job definition it finds:
|
30
36
|
|
31
37
|
```bash
|
32
|
-
cigale test
|
38
|
+
cigale test ci/jobs -o tmp
|
39
|
+
```
|
40
|
+
|
41
|
+
To upload your job configuration to a running Jenkins instance
|
42
|
+
|
43
|
+
## What can I use?
|
44
|
+
|
45
|
+
You can browse the `spec/fixtures/` directory to see what's possible.
|
46
|
+
|
47
|
+
Another good reference sources is the [Jenkins Job Builder documentation][jjbdoc],
|
48
|
+
which cigale usually supports a superset of (at least in the categories listed
|
49
|
+
in `spec/parity_spec.rb`)
|
50
|
+
|
51
|
+
[jjbdoc]: (http://jenkins-job-builder.readthedocs.org/en/latest/definition.html)
|
52
|
+
|
53
|
+
## Macros
|
54
|
+
|
55
|
+
Define a macro with a top-level element starting with `:`
|
56
|
+
|
57
|
+
```yaml
|
58
|
+
- :git-advanced:
|
59
|
+
git:
|
60
|
+
url: 'git@{host}:{user}/{name}.git'
|
61
|
+
credentials-id: 'some-credentials'
|
62
|
+
branches:
|
63
|
+
- '{branches}'
|
64
|
+
```
|
65
|
+
|
66
|
+
N.B: Always use quotes when using variable substitution, e.g. `'{a}'`, otherwise
|
67
|
+
it'll be interpreted as a YAML object.
|
68
|
+
|
69
|
+
Use a macro by having a subtree be an object whose only key is a dot followed
|
70
|
+
by the macro's name:
|
71
|
+
|
72
|
+
```yaml
|
73
|
+
- job:
|
74
|
+
name: cigale
|
75
|
+
scm:
|
76
|
+
- .git:
|
77
|
+
host: github.com
|
78
|
+
user: itchio
|
79
|
+
name: cigale
|
80
|
+
branches: **
|
81
|
+
```
|
82
|
+
|
83
|
+
The following will expand to:
|
84
|
+
|
85
|
+
```yaml
|
86
|
+
- job:
|
87
|
+
name: cigale
|
88
|
+
scm:
|
89
|
+
- git:
|
90
|
+
url: 'git@github.com:itchio/cigale.git'
|
91
|
+
credentials-id: 'some-credentials'
|
92
|
+
branches:
|
93
|
+
- '**'
|
94
|
+
```
|
95
|
+
|
96
|
+
If you're unsure what something will expand to, you can use the `dump` command:
|
97
|
+
|
98
|
+
```bash
|
99
|
+
cigale dump my-def.yml -o tmp
|
33
100
|
```
|
34
101
|
|
35
102
|
## Contributing
|
@@ -39,3 +106,9 @@ cigale test spec/fixtures/parity/git-scm.yml -o output/directory
|
|
39
106
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
40
107
|
4. Push to the branch (`git push origin my-new-feature`)
|
41
108
|
5. Create a new Pull Request
|
109
|
+
|
110
|
+
## License
|
111
|
+
|
112
|
+
cigale is released under the MIT License.
|
113
|
+
|
114
|
+
Read the `LICENSE.txt` file in this repository for more informations.
|
data/lib/cigale/scm/git.rb
CHANGED
@@ -66,7 +66,7 @@ module Cigale::SCM
|
|
66
66
|
xml.reference
|
67
67
|
xml.gitConfigName
|
68
68
|
xml.gitConfigEmail
|
69
|
-
xml.skipTag false
|
69
|
+
xml.skipTag boolp(sdef["skip-tag"], false)
|
70
70
|
xml.scmName
|
71
71
|
xml.useShallowClone boolp(sdef["shallow-clone"], false)
|
72
72
|
xml.ignoreNotifyCommit boolp(sdef["ignore-notify"], false)
|
data/lib/cigale/version.rb
CHANGED