cigale 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ec7c8a08f6cd7d2a13037e892f1ac70c835d32a
4
- data.tar.gz: e5bd16ee454e7b597124082ee7cc69e613edfaf9
3
+ metadata.gz: 2eb61ed014851e56049896db0a290096bdefb6a4
4
+ data.tar.gz: 7a754966a5b5341078cc55ca3114e09a53755ac5
5
5
  SHA512:
6
- metadata.gz: 9c56a8193bbbf6e2cb8257e9c7b5cf04e2b61c7e7766758262c47e2381763b5d0b076d9bb93a72ae5a2c5343ecc4152490d86fc149f9a07e7d683c82ede3e231
7
- data.tar.gz: 16fee6265a4007e31beabfc10a2488fb895815d0ef14641e3936592896507cd8d79bdfa3cf8916e6896e2460d1358ae913c72744fcc2609a352d51f9a4bf6368
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
- Just like jenkins-job-builder:
7
+ cigale generates XML configuration that Jenkins can grok, from a bunch of
8
+ human-readable, diff-friendly, YAML files.
6
9
 
7
- * cigale generates XML configuration that Jenkins can grok, from a bunch of
8
- human-readable, diff-friendly, YAML files.
9
- * It's not production-ready
10
+ Key points:
10
11
 
11
- Contrary to jenkins-job-builder:
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
- Execute:
18
+ Run:
21
19
 
22
20
  ```bash
23
- bundle install
24
- rake install
21
+ gem install cigale
25
22
  ```
26
23
 
27
24
  ## Usage
28
25
 
29
- Try running:
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 spec/fixtures/parity/git-scm.yml -o output/directory
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.
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Cigale
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cigale
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amos Wenger