attr_default 0.8.0 → 0.9.0.test.1

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: e77618f0b6e71ca370e556a1a0c35ca4a47d8e8aab16efd57ea198cdcadcc3a8
4
- data.tar.gz: 866e12c4140a965252ffeea297dd991ccd90941f81bf04cfe9d257a54498e7cf
3
+ metadata.gz: 9998aca32126f482c179ca7f8e553ce854920cca64ccf8c0e6fce03b223e4fa2
4
+ data.tar.gz: 5a7f334003e3478d8fba71a9136af0d64cb418385e708ca12270a0732da09d36
5
5
  SHA512:
6
- metadata.gz: 347cd7cf5d9fb9275b54811019f325d21748ec6f68d4e0a7b96d39fb4270e6c5515249367e8878adf3a2d27daeb983c5023ed3abf229daa3a4d5e9aa6d5b2480
7
- data.tar.gz: 8a98ca17b00e14c8f5eb71be11b249e71de38c4171aae5d503db27e9340f49c6a917b2bf22f41814d95c039f2d6c4432772b55a2aca3100bbf2d9e4ce3ad3748
6
+ metadata.gz: 909cdd4189730d98cc5ead0ee246957e3db6bd241bfc4e5ed099c226422ce609eadb9bdfd7260658a47eeb32369e3d58602c60e5845790aa8bb1d1738a8d1c68
7
+ data.tar.gz: '01391f5dfff551dc0b54997ea4a2af82b459c083635316868a6b66f4c8807df113789b17ec8ee53392e498a2cbe29afd9802c4d6c06a78e178e086a8389609ec'
@@ -0,0 +1,10 @@
1
+ ---
2
+ version: 1
3
+ update_configs:
4
+ - package_manager: "ruby:bundler"
5
+ directory: "/"
6
+ update_schedule: "live"
7
+ version_requirement_updates: "off"
8
+ commit_message:
9
+ prefix: "No-Jira"
10
+ include_scope: true
data/.gitignore CHANGED
@@ -11,10 +11,10 @@ doc/
11
11
  lib/bundler/man
12
12
  pkg
13
13
  rdoc
14
- test/reports/*
14
+ test/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
- test/test.sqlite3
19
18
  nbproject
20
19
  .idea
20
+ gemfiles/*.lock
@@ -0,0 +1,74 @@
1
+ #!/usr/bin/groovy
2
+ @Library('jenkins-pipeline@v0.4.4')
3
+ import com.invoca.utils.*;
4
+
5
+ pipeline {
6
+ agent {
7
+ kubernetes {
8
+ defaultContainer 'ruby'
9
+ yamlFile '.jenkins/ruby_build_pod.yml'
10
+ }
11
+ }
12
+
13
+ environment { GITHUB_TOKEN = credentials('github_token') }
14
+
15
+ stages {
16
+ stage('Setup') {
17
+ steps {
18
+ updateGitHubStatus('clean-build', 'pending', 'Unit tests.')
19
+ sh 'bundle install'
20
+ sh 'bundle exec appraisal install'
21
+ }
22
+ }
23
+
24
+ stage('Appraisals') {
25
+ parallel {
26
+ stage('Current') {
27
+ steps {
28
+ sh 'SQLITE3_FILE_PATH=test/test.current.sqlite3 JUNIT_OUTPUT_DIR=test/reports/current bundle exec rake'
29
+ }
30
+ post { always { junit 'test/reports/current/*.xml' } }
31
+ }
32
+
33
+ stage('Rails 4') {
34
+ steps {
35
+ sh 'SQLITE3_FILE_PATH=test/test.rails4.sqlite3 JUNIT_OUTPUT_DIR=test/reports/rails4 bundle exec appraisal rails-4 rake'
36
+ }
37
+ post { always { junit 'test/reports/rails4/*.xml' } }
38
+ }
39
+
40
+ stage('Rails 5') {
41
+ steps {
42
+ sh 'SQLITE3_FILE_PATH=test/test.rails5.sqlite3 JUNIT_OUTPUT_DIR=test/reports/rails5 bundle exec appraisal rails-5 rake'
43
+ }
44
+ post { always { junit 'test/reports/rails5/*.xml' } }
45
+ }
46
+
47
+ stage('Rails 6') {
48
+ steps {
49
+ sh 'SQLITE3_FILE_PATH=test/test.rails6.sqlite3 JUNIT_OUTPUT_DIR=test/reports/rails6 bundle exec appraisal rails-6 rake'
50
+ }
51
+ post { always { junit 'test/reports/rails6/*.xml' } }
52
+ }
53
+ }
54
+ }
55
+ }
56
+
57
+ post {
58
+ success { updateGitHubStatus('clean-build', 'success', 'Unit tests.') }
59
+ failure { updateGitHubStatus('clean-build', 'failure', 'Unit tests.') }
60
+ always { notifySlack(currentBuild.result) }
61
+ }
62
+ }
63
+
64
+ void updateGitHubStatus(String context, String status, String description) {
65
+ gitHubStatus([
66
+ repoSlug: 'Invoca/attr_default',
67
+ sha: env.GIT_COMMIT,
68
+ description: description,
69
+ context: context,
70
+ targetURL: env.RUN_DISPLAY_URL,
71
+ token: env.GITHUB_TOKEN,
72
+ status: status
73
+ ])
74
+ }
@@ -0,0 +1,18 @@
1
+ ---
2
+ apiVersion: v1
3
+ kind: Pod
4
+ metadata:
5
+ labels:
6
+ jenkins/attr_default: 'true'
7
+ namespace: jenkins
8
+ name: attr_default
9
+ spec:
10
+ containers:
11
+ - name: ruby
12
+ image: ruby:2.6.1
13
+ tty: true
14
+ resources:
15
+ requests:
16
+ memory: "100Mi"
17
+ command:
18
+ - cat
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ appraise 'rails-4' do
4
+ gem 'rails', '~> 4.2'
5
+ gem 'sqlite3', '~> 1.3.0'
6
+ end
7
+
8
+ appraise 'rails-5' do
9
+ gem 'rails', '~> 5.2'
10
+ gem 'sqlite3', '~> 1.4'
11
+ end
12
+
13
+ appraise 'rails-6' do
14
+ gem 'rails', '~> 6.0'
15
+ gem 'sqlite3', '~> 1.4'
16
+ end
@@ -0,0 +1,12 @@
1
+ # CHANGELOG for `attr_default`
2
+
3
+ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4
+
5
+ Note: this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [0.9.0] - 2020-05-15
8
+ ### Added
9
+ - Added support for rails 5 and 6.
10
+ - Added appraisal tests for all supported rails version: 4/5/6
11
+
12
+ [0.9.0]: https://github.com/Invoca/attr_default/compare/v0.8.0...v0.9.0
data/Gemfile CHANGED
@@ -4,12 +4,10 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
- group :development do
8
- gem 'activesupport', '~>4'
9
- gem 'pry'
10
- gem 'rake'
11
- gem 'sqlite3'
12
-
13
- gem 'minitest'
14
- gem 'minitest-reporters'
15
- end
7
+ gem 'appraisal'
8
+ gem 'pry'
9
+ gem 'rake'
10
+ gem 'sqlite3'
11
+
12
+ gem 'minitest'
13
+ gem 'minitest-reporters'
@@ -1,63 +1,90 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- attr_default (0.8.0)
5
- rails (~> 4.2)
4
+ attr_default (0.9.0.test.1)
5
+ rails (>= 4.2, < 7)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actionmailer (4.2.11.1)
11
- actionpack (= 4.2.11.1)
12
- actionview (= 4.2.11.1)
13
- activejob (= 4.2.11.1)
10
+ actioncable (6.0.3.4)
11
+ actionpack (= 6.0.3.4)
12
+ nio4r (~> 2.0)
13
+ websocket-driver (>= 0.6.1)
14
+ actionmailbox (6.0.3.4)
15
+ actionpack (= 6.0.3.4)
16
+ activejob (= 6.0.3.4)
17
+ activerecord (= 6.0.3.4)
18
+ activestorage (= 6.0.3.4)
19
+ activesupport (= 6.0.3.4)
20
+ mail (>= 2.7.1)
21
+ actionmailer (6.0.3.4)
22
+ actionpack (= 6.0.3.4)
23
+ actionview (= 6.0.3.4)
24
+ activejob (= 6.0.3.4)
14
25
  mail (~> 2.5, >= 2.5.4)
15
- rails-dom-testing (~> 1.0, >= 1.0.5)
16
- actionpack (4.2.11.1)
17
- actionview (= 4.2.11.1)
18
- activesupport (= 4.2.11.1)
19
- rack (~> 1.6)
20
- rack-test (~> 0.6.2)
21
- rails-dom-testing (~> 1.0, >= 1.0.5)
22
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
- actionview (4.2.11.1)
24
- activesupport (= 4.2.11.1)
26
+ rails-dom-testing (~> 2.0)
27
+ actionpack (6.0.3.4)
28
+ actionview (= 6.0.3.4)
29
+ activesupport (= 6.0.3.4)
30
+ rack (~> 2.0, >= 2.0.8)
31
+ rack-test (>= 0.6.3)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
34
+ actiontext (6.0.3.4)
35
+ actionpack (= 6.0.3.4)
36
+ activerecord (= 6.0.3.4)
37
+ activestorage (= 6.0.3.4)
38
+ activesupport (= 6.0.3.4)
39
+ nokogiri (>= 1.8.5)
40
+ actionview (6.0.3.4)
41
+ activesupport (= 6.0.3.4)
25
42
  builder (~> 3.1)
26
- erubis (~> 2.7.0)
27
- rails-dom-testing (~> 1.0, >= 1.0.5)
28
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
29
- activejob (4.2.11.1)
30
- activesupport (= 4.2.11.1)
31
- globalid (>= 0.3.0)
32
- activemodel (4.2.11.1)
33
- activesupport (= 4.2.11.1)
34
- builder (~> 3.1)
35
- activerecord (4.2.11.1)
36
- activemodel (= 4.2.11.1)
37
- activesupport (= 4.2.11.1)
38
- arel (~> 6.0)
39
- activesupport (4.2.11.1)
40
- i18n (~> 0.7)
43
+ erubi (~> 1.4)
44
+ rails-dom-testing (~> 2.0)
45
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
46
+ activejob (6.0.3.4)
47
+ activesupport (= 6.0.3.4)
48
+ globalid (>= 0.3.6)
49
+ activemodel (6.0.3.4)
50
+ activesupport (= 6.0.3.4)
51
+ activerecord (6.0.3.4)
52
+ activemodel (= 6.0.3.4)
53
+ activesupport (= 6.0.3.4)
54
+ activestorage (6.0.3.4)
55
+ actionpack (= 6.0.3.4)
56
+ activejob (= 6.0.3.4)
57
+ activerecord (= 6.0.3.4)
58
+ marcel (~> 0.3.1)
59
+ activesupport (6.0.3.4)
60
+ concurrent-ruby (~> 1.0, >= 1.0.2)
61
+ i18n (>= 0.7, < 2)
41
62
  minitest (~> 5.1)
42
- thread_safe (~> 0.3, >= 0.3.4)
43
63
  tzinfo (~> 1.1)
64
+ zeitwerk (~> 2.2, >= 2.2.2)
44
65
  ansi (1.5.0)
45
- arel (6.0.4)
66
+ appraisal (2.2.0)
67
+ bundler
68
+ rake
69
+ thor (>= 0.14.0)
46
70
  builder (3.2.3)
47
71
  coderay (1.1.1)
48
- concurrent-ruby (1.1.6)
72
+ concurrent-ruby (1.1.7)
49
73
  crass (1.0.6)
50
- erubis (2.7.0)
74
+ erubi (1.9.0)
51
75
  globalid (0.4.2)
52
76
  activesupport (>= 4.2.0)
53
- i18n (0.9.5)
77
+ i18n (1.8.5)
54
78
  concurrent-ruby (~> 1.0)
55
- loofah (2.4.0)
79
+ loofah (2.7.0)
56
80
  crass (~> 1.0.2)
57
81
  nokogiri (>= 1.5.9)
58
82
  mail (2.7.1)
59
83
  mini_mime (>= 0.1.1)
84
+ marcel (0.3.3)
85
+ mimemagic (~> 0.3.2)
60
86
  method_source (0.8.2)
87
+ mimemagic (0.3.5)
61
88
  mini_mime (1.0.2)
62
89
  mini_portile2 (2.4.0)
63
90
  minitest (5.11.3)
@@ -66,60 +93,67 @@ GEM
66
93
  builder
67
94
  minitest (>= 5.0)
68
95
  ruby-progressbar
69
- nokogiri (1.10.9)
96
+ nio4r (2.5.4)
97
+ nokogiri (1.10.10)
70
98
  mini_portile2 (~> 2.4.0)
71
99
  pry (0.10.4)
72
100
  coderay (~> 1.1.0)
73
101
  method_source (~> 0.8.1)
74
102
  slop (~> 3.4)
75
- rack (1.6.13)
76
- rack-test (0.6.3)
77
- rack (>= 1.0)
78
- rails (4.2.11.1)
79
- actionmailer (= 4.2.11.1)
80
- actionpack (= 4.2.11.1)
81
- actionview (= 4.2.11.1)
82
- activejob (= 4.2.11.1)
83
- activemodel (= 4.2.11.1)
84
- activerecord (= 4.2.11.1)
85
- activesupport (= 4.2.11.1)
86
- bundler (>= 1.3.0, < 2.0)
87
- railties (= 4.2.11.1)
88
- sprockets-rails
89
- rails-deprecated_sanitizer (1.0.3)
90
- activesupport (>= 4.2.0.alpha)
91
- rails-dom-testing (1.0.9)
92
- activesupport (>= 4.2.0, < 5.0)
93
- nokogiri (~> 1.6)
94
- rails-deprecated_sanitizer (>= 1.0.1)
103
+ rack (2.2.3)
104
+ rack-test (1.1.0)
105
+ rack (>= 1.0, < 3)
106
+ rails (6.0.3.4)
107
+ actioncable (= 6.0.3.4)
108
+ actionmailbox (= 6.0.3.4)
109
+ actionmailer (= 6.0.3.4)
110
+ actionpack (= 6.0.3.4)
111
+ actiontext (= 6.0.3.4)
112
+ actionview (= 6.0.3.4)
113
+ activejob (= 6.0.3.4)
114
+ activemodel (= 6.0.3.4)
115
+ activerecord (= 6.0.3.4)
116
+ activestorage (= 6.0.3.4)
117
+ activesupport (= 6.0.3.4)
118
+ bundler (>= 1.3.0)
119
+ railties (= 6.0.3.4)
120
+ sprockets-rails (>= 2.0.0)
121
+ rails-dom-testing (2.0.3)
122
+ activesupport (>= 4.2.0)
123
+ nokogiri (>= 1.6)
95
124
  rails-html-sanitizer (1.3.0)
96
125
  loofah (~> 2.3)
97
- railties (4.2.11.1)
98
- actionpack (= 4.2.11.1)
99
- activesupport (= 4.2.11.1)
126
+ railties (6.0.3.4)
127
+ actionpack (= 6.0.3.4)
128
+ activesupport (= 6.0.3.4)
129
+ method_source
100
130
  rake (>= 0.8.7)
101
- thor (>= 0.18.1, < 2.0)
102
- rake (0.9.6)
131
+ thor (>= 0.20.3, < 2.0)
132
+ rake (13.0.1)
103
133
  ruby-progressbar (1.10.1)
104
134
  slop (3.6.0)
105
- sprockets (4.0.0)
135
+ sprockets (4.0.2)
106
136
  concurrent-ruby (~> 1.0)
107
137
  rack (> 1, < 3)
108
- sprockets-rails (3.2.1)
138
+ sprockets-rails (3.2.2)
109
139
  actionpack (>= 4.0)
110
140
  activesupport (>= 4.0)
111
141
  sprockets (>= 3.0.0)
112
- sqlite3 (1.3.13)
142
+ sqlite3 (1.4.2)
113
143
  thor (1.0.1)
114
144
  thread_safe (0.3.6)
115
- tzinfo (1.2.6)
145
+ tzinfo (1.2.7)
116
146
  thread_safe (~> 0.1)
147
+ websocket-driver (0.7.3)
148
+ websocket-extensions (>= 0.1.0)
149
+ websocket-extensions (0.1.5)
150
+ zeitwerk (2.4.1)
117
151
 
118
152
  PLATFORMS
119
153
  ruby
120
154
 
121
155
  DEPENDENCIES
122
- activesupport (~> 4)
156
+ appraisal
123
157
  attr_default!
124
158
  minitest
125
159
  minitest-reporters
@@ -128,4 +162,4 @@ DEPENDENCIES
128
162
  sqlite3
129
163
 
130
164
  BUNDLED WITH
131
- 1.17.2
165
+ 1.17.3
@@ -14,6 +14,10 @@ Example:
14
14
  ...
15
15
  end
16
16
 
17
+ == Dependencies
18
+ * Ruby >= 2.6.1
19
+ * Rails >= 4.2, < 7
20
+
17
21
  == Installation
18
22
 
19
23
  Add this line to your application's Gemfile:
@@ -20,5 +20,5 @@ Gem::Specification.new do |gem|
20
20
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
21
21
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/.*\.rb})
22
22
 
23
- gem.add_dependency 'rails', '~> 4.2'
23
+ gem.add_dependency 'rails', '>= 4.2', '< 7'
24
24
  end
@@ -0,0 +1,13 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "pry"
7
+ gem "rake"
8
+ gem "sqlite3", "~> 1.3.0"
9
+ gem "minitest"
10
+ gem "minitest-reporters"
11
+ gem "rails", "~> 4.2"
12
+
13
+ gemspec path: "../"
@@ -0,0 +1,13 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "pry"
7
+ gem "rake"
8
+ gem "sqlite3", "~> 1.4"
9
+ gem "minitest"
10
+ gem "minitest-reporters"
11
+ gem "rails", "~> 5.2"
12
+
13
+ gemspec path: "../"
@@ -0,0 +1,13 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "pry"
7
+ gem "rake"
8
+ gem "sqlite3", "~> 1.4"
9
+ gem "minitest"
10
+ gem "minitest-reporters"
11
+ gem "rails", "~> 6.0"
12
+
13
+ gemspec path: "../"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AttrDefault
4
- VERSION = '0.8.0'
4
+ VERSION = '0.9.0.test.1'
5
5
  end
@@ -22,13 +22,14 @@ DUP_METHODS =
22
22
  [:clone]
23
23
  end
24
24
 
25
+ database_file = ENV['SQLITE3_FILE_PATH'].presence || 'test/test.sqlite3'
25
26
 
26
- File.unlink('test.sqlite3') rescue nil
27
+ File.unlink(database_file) rescue nil
27
28
  ActiveRecord::Base.logger = Logger.new(STDERR)
28
29
  ActiveRecord::Base.logger.level = Logger::WARN
29
30
  ActiveRecord::Base.establish_connection(
30
31
  :adapter => database_adapter,
31
- :database => 'test.sqlite3'
32
+ :database => database_file
32
33
  )
33
34
 
34
35
  ActiveRecord::Base.connection.create_table(:test_users, :force => true) do |t|
@@ -20,10 +20,13 @@ require 'minitest/autorun'
20
20
  require 'hobofields' if ENV['INCLUDE_HOBO']
21
21
  require 'pry'
22
22
  require "minitest/reporters"
23
- Minitest::Reporters.use! [
23
+
24
+ junit_ouptut_dir = ENV["JUNIT_OUTPUT_DIR"].presence || "test/reports"
25
+
26
+ Minitest::Reporters.use!([
24
27
  Minitest::Reporters::ProgressReporter.new,
25
- Minitest::Reporters::JUnitReporter.new('test/reports', false)
26
- ]
28
+ Minitest::Reporters::JUnitReporter.new(junit_ouptut_dir)
29
+ ])
27
30
 
28
31
  require 'attr_default'
29
32
 
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attr_default
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0.test.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Invoca Development
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-14 00:00:00.000000000 Z
11
+ date: 2020-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.2'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '7'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '4.2'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '7'
27
33
  description: Dynamic Ruby defaults for ActiveRecord attributes
28
34
  email:
29
35
  - development@invoca.com
@@ -31,22 +37,28 @@ executables: []
31
37
  extensions: []
32
38
  extra_rdoc_files: []
33
39
  files:
40
+ - ".dependabot/config.yml"
34
41
  - ".gitignore"
42
+ - ".jenkins/Jenkinsfile"
43
+ - ".jenkins/ruby_build_pod.yml"
35
44
  - ".ruby-version"
45
+ - Appraisals
46
+ - CHANGELOG.md
36
47
  - Gemfile
37
48
  - Gemfile.lock
38
- - Jenkinsfile
39
49
  - LICENSE
40
50
  - README.rdoc
41
51
  - Rakefile
42
52
  - attr_default.gemspec
53
+ - gemfiles/rails_4.gemfile
54
+ - gemfiles/rails_5.gemfile
55
+ - gemfiles/rails_6.gemfile
43
56
  - lib/attr_default.rb
44
57
  - lib/attr_default/railtie.rb
45
58
  - lib/attr_default/version.rb
46
59
  - semaphore_ci/setup.sh
47
60
  - test/attr_default_test.rb
48
61
  - test/database_schema.rb
49
- - test/reports/.gitkeep
50
62
  - test/test_helper.rb
51
63
  - test/test_models.rb
52
64
  homepage: https://github.com/Invoca/attr_default
@@ -64,9 +76,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
64
76
  version: '0'
65
77
  required_rubygems_version: !ruby/object:Gem::Requirement
66
78
  requirements:
67
- - - ">="
79
+ - - ">"
68
80
  - !ruby/object:Gem::Version
69
- version: '0'
81
+ version: 1.3.1
70
82
  requirements: []
71
83
  rubygems_version: 3.0.1
72
84
  signing_key:
@@ -1,56 +0,0 @@
1
- #!/usr/bin/groovy
2
- @Library('jenkins-pipeline@v0.4.4')
3
- import com.invoca.docker.*;
4
-
5
- pipeline {
6
- agent {
7
- kubernetes {
8
- defaultContainer 'ruby'
9
- yaml '''
10
- apiVersion: v1
11
- kind: Pod
12
- metadata:
13
- labels:
14
- jenkins/attr-default: true
15
- namespace: jenkins
16
- name: attr-default
17
- spec:
18
- containers:
19
- - name: ruby
20
- image: ruby:2.6.1
21
- tty: true
22
- command:
23
- - cat
24
- '''
25
- }
26
- }
27
- stages {
28
- stage('Unit Tests') {
29
- environment {
30
- GITHUB_KEY = credentials('github_key')
31
- }
32
-
33
- steps {
34
- script {
35
- sh '''
36
- # get SSH setup inside the container
37
- eval `ssh-agent -s`
38
- echo "$GITHUB_KEY" | ssh-add -
39
- mkdir -p /root/.ssh
40
- ssh-keyscan -t rsa github.com > /root/.ssh/known_hosts
41
-
42
- # run tests
43
- bundle install --path vendor/bundle
44
- bundle exec rake
45
- '''
46
- }
47
- }
48
-
49
- post {
50
- always { junit 'test/reports/*.xml' }
51
- }
52
- }
53
- }
54
-
55
- post { always { notifySlack(currentBuild.result) } }
56
- }