gitlabci-bundle-update-mr 0.2.0 → 0.2.1

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
  SHA256:
3
- metadata.gz: d607680fe4d0fa78918da62e4777d8be1db5421949306682d83602bc538b3516
4
- data.tar.gz: 692a716488d0553385164b0b8ad8a3ba78094764e72aad2608d6153aa073c242
3
+ metadata.gz: e79a247314e92818cfc085b4d48deb88d5db6b6a3da9a978ec8af66bcc0dad35
4
+ data.tar.gz: bab306bb6c3c3d0969ec465e341668016c12b189e156c8906a4b52be1866521a
5
5
  SHA512:
6
- metadata.gz: 7fea1ef7556ef71806db573a3205c84689723641c0c9feb9279f0915601d2e0ab76ac8d38367e97335e6de27915bbdcbfbaecf77dd5dfe1a8bb88731d40d95b7
7
- data.tar.gz: 735ea90e2f2cb29bf35a17490bbc8a074d13bee45f0de44f5df825a3371070b220569f029b2c140e89ba5902775ae56ffcc599cc7e4397f014d9ceb52263b2e2
6
+ metadata.gz: 44b5d05f9c1a990299c59f5dbfc0ad631cf17487ef1f15d35321413bbd9b4780288c3d2eb6222786b69114a26d27f4d29b136de175e8b9be346e16bcbd39c4f2
7
+ data.tar.gz: 0b5c0129e80a32e4c704260ff6c260d50efbc9ee35c8547274e18b686feb55c295f217eec1cfc5f761b7badc8f5a7976f30cc7e854045555d4db5b38971ec6e8
data/.gitlab-ci.yml CHANGED
@@ -2,6 +2,25 @@ stages:
2
2
  - build
3
3
  - deploy
4
4
 
5
+ include:
6
+ - local: "/gitlabci-templates/continuous_bundle_update.yml"
7
+
8
+ continuous_bundle_update:
9
+ stage: build
10
+
11
+ variables:
12
+ CACHE_VERSION: "v2"
13
+ GIT_EMAIL: "gitlabci@example.com"
14
+ GIT_USER: "GitLab CI"
15
+
16
+ before_script:
17
+ # Set timezone to Asia/Tokyo
18
+ - cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
19
+
20
+ only:
21
+ - schedules
22
+ - web # Test for topic branch
23
+
5
24
  .default: &default
6
25
  cache:
7
26
  key: "$CI_BUILD_NAME"
@@ -52,31 +71,6 @@ test:trunk:
52
71
  image: rubylang/ruby:trunk-nightly-bionic
53
72
  allow_failure: true
54
73
 
55
- continuous_bundle_update:
56
- stage: build
57
-
58
- image: ruby
59
-
60
- cache:
61
- key: "$CI_BUILD_NAME"
62
- paths:
63
- - vendor/bundle/
64
-
65
- before_script:
66
- - bundle install --path vendor/bundle
67
- - bundle clean
68
-
69
- # Set timezone to Asia/Tokyo
70
- - cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
71
-
72
- script:
73
- - gem install --no-doc gitlabci-bundle-update-mr
74
- - gitlabci-bundle-update-mr --user="GitLab CI" --email="gitlabci@example.com" --labels="bundle update"
75
-
76
- only:
77
- - schedules
78
- - web # Test for topic branch
79
-
80
74
  pages:
81
75
  <<: *default
82
76
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## Unreleased
2
- [full changelog](https://gitlab.com/sue445/gitlabci-bundle-update-mr/compare/v0.2.0...HEAD)
2
+ [full changelog](https://gitlab.com/sue445/gitlabci-bundle-update-mr/compare/v0.2.1...HEAD)
3
+
4
+ ## v0.2.1
5
+ [full changelog](https://gitlab.com/sue445/gitlabci-bundle-update-mr/compare/v0.2.0...v0.2.1)
6
+
7
+ ### Others
8
+ * Add gitlabci-templates/continuous_bundle_update.yml [!27](https://gitlab.com/sue445/gitlabci-bundle-update-mr/merge_requests/27) *@sue445*
9
+ * bundle update at 2019-03-07 00:56:00 JST [!26](https://gitlab.com/sue445/gitlabci-bundle-update-mr/merge_requests/26) *@sue445*
3
10
 
4
11
  ## v0.2.0
5
12
  [full changelog](https://gitlab.com/sue445/gitlabci-bundle-update-mr/compare/v0.1.1...v0.2.0)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlabci-bundle-update-mr (0.2.0)
4
+ gitlabci-bundle-update-mr (0.2.1)
5
5
  bundler
6
6
  compare_linker (>= 1.4.3)
7
7
  gitlab (>= 4.0.0)
@@ -84,7 +84,7 @@ GEM
84
84
  terminal-table (1.8.0)
85
85
  unicode-display_width (~> 1.1, >= 1.1.1)
86
86
  thor (0.20.3)
87
- unicode-display_width (1.4.1)
87
+ unicode-display_width (1.5.0)
88
88
  webmock (3.5.1)
89
89
  addressable (>= 2.3.6)
90
90
  crack (>= 0.3.2)
data/README.md CHANGED
@@ -44,6 +44,7 @@ The application on which you want to run continuous bundle update must be config
44
44
  ![gitlab_environment_variables](img/gitlab_environment_variables.png)
45
45
 
46
46
  ## Usage
47
+ ### Step 1-A. Plain
47
48
  Configure your `.gitlab-ci.yml` to run `gitlabci-bundle-update-mr`, for example:
48
49
 
49
50
  ```yml
@@ -61,13 +62,12 @@ continuous_bundle_update:
61
62
  - vendor/bundle/
62
63
 
63
64
  before_script:
64
- - bundle install --path vendor/bundle
65
- - bundle clean
66
-
67
65
  # Set timezone to Asia/Tokyo
68
66
  - cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
69
67
 
70
68
  script:
69
+ - bundle install --path vendor/bundle
70
+ - bundle clean
71
71
  - gem install --no-doc gitlabci-bundle-update-mr
72
72
  - gitlabci-bundle-update-mr --user="GitLab CI" --email="gitlabci@example.com" --labels="bundle update"
73
73
 
@@ -75,6 +75,38 @@ continuous_bundle_update:
75
75
  - schedules
76
76
  ```
77
77
 
78
+ ### Step 1-B. Using `include`
79
+ `include` is available in one of the following versions.
80
+
81
+ * GitLab Core 11.4+
82
+ * GitLab Premium 10.5+
83
+ * Starter, Premium and Ultimate 10.6+)
84
+
85
+ c.f. https://docs.gitlab.com/ce/ci/yaml/README.html#include
86
+
87
+ example
88
+
89
+ ```yml
90
+ include:
91
+ - remote: "https://gitlab.com/sue445/gitlabci-bundle-update-mr/blob/master/gitlabci-templates/continuous_bundle_update.yml"
92
+
93
+ continuous_bundle_update:
94
+ stage: build
95
+
96
+ variables:
97
+ # override variables (followings are defailts)
98
+ CACHE_VERSION: "v1"
99
+ GIT_EMAIL: "gitlabci@example.com"
100
+ GIT_USER: "GitLab CI"
101
+ LABELS: "bundle update"
102
+ OPTIONS: ""
103
+
104
+ before_script:
105
+ # Set timezone to Asia/Tokyo
106
+ - cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
107
+ ```
108
+
109
+ ### Step 2. Register scheduler
78
110
  And register scheduler to `https://YOUR-GITLAB/YOUR-NAME/REPO-NAME/pipeline_schedules`
79
111
 
80
112
  ![gitlab_scheduler](img/gitlab_scheduler.png)
@@ -28,9 +28,8 @@ Gem::Specification.new do |spec|
28
28
  # Specify which files should be added to the gem when it is released.
29
29
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
30
30
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
31
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
31
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|img)/}) }
32
32
  end
33
- spec.files.reject! { |file| file =~ %r{img/} }
34
33
 
35
34
  spec.bindir = "exe"
36
35
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
@@ -0,0 +1,22 @@
1
+ continuous_bundle_update:
2
+ image: ruby
3
+
4
+ variables:
5
+ CACHE_VERSION: "v1"
6
+ GIT_EMAIL: "gitlabci@example.com"
7
+ GIT_USER: "GitLab CI"
8
+ LABELS: "bundle update"
9
+ OPTIONS: ""
10
+
11
+ cache:
12
+ key: "$CACHE_VERSION-$CI_BUILD_NAME"
13
+ paths:
14
+ - vendor/bundle/
15
+
16
+ script:
17
+ - bundle install --path vendor/bundle --clean
18
+ - gem install --no-doc gitlabci-bundle-update-mr
19
+ - gitlabci-bundle-update-mr --user="$GIT_USER" --email="$GIT_EMAIL" --labels="$LABELS" $OPTIONS
20
+
21
+ only:
22
+ - schedules
@@ -2,7 +2,7 @@ module Gitlabci
2
2
  module Bundle
3
3
  module Update
4
4
  module Mr
5
- VERSION = "0.2.0"
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlabci-bundle-update-mr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-06 00:00:00.000000000 Z
11
+ date: 2019-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -216,6 +216,7 @@ files:
216
216
  - bin/setup
217
217
  - exe/gitlabci-bundle-update-mr
218
218
  - gitlabci-bundle-update-mr.gemspec
219
+ - gitlabci-templates/continuous_bundle_update.yml
219
220
  - lib/gitlabci/bundle/update/mr.rb
220
221
  - lib/gitlabci/bundle/update/mr/client.rb
221
222
  - lib/gitlabci/bundle/update/mr/version.rb