mcrain 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +8 -1
- data/Jenkinsfile +58 -0
- data/exe/mcrain +1 -1
- data/lib/mcrain/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '04783d681050f6504a841bf70d8632bb2d05436b6b299cc8cf238766b109d04a'
|
4
|
+
data.tar.gz: 8221085a9015fafc8310165ca968d4c387d991c4c99b7802c6d87bf42107e1d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8993fb3864e5122ea81f8d74457b643187b0c7ca4f11b37ca477b7c0e4b145d5fc3e9148e6c33cdba41eac03649d607067eeafb93e745a15ad6e68a3642ea05c
|
7
|
+
data.tar.gz: 130dd59bdda40ada03089e50dd85054318c440d4651ea2d50a913a53153b33326ad73ffdd23d58c057623cbb4003640e51fa668b7beb584f414a343aa6d7f2f6
|
data/.circleci/config.yml
CHANGED
@@ -4,7 +4,8 @@ jobs:
|
|
4
4
|
working_directory: ~/mcrain
|
5
5
|
|
6
6
|
## see https://circleci.com/docs/2.0/executor-types/#machine-executor-overview
|
7
|
-
machine:
|
7
|
+
machine:
|
8
|
+
image: circleci/classic:201711-01
|
8
9
|
|
9
10
|
steps:
|
10
11
|
- checkout
|
@@ -27,6 +28,12 @@ jobs:
|
|
27
28
|
gem env
|
28
29
|
bundle --version
|
29
30
|
|
31
|
+
- run:
|
32
|
+
name: Install dependencies
|
33
|
+
command: |
|
34
|
+
sudo apt-get update
|
35
|
+
sudo apt-get install -y --no-install-recommends libmysqlclient-dev
|
36
|
+
|
30
37
|
- run:
|
31
38
|
name: Open docker TCP port
|
32
39
|
command: |
|
data/Jenkinsfile
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
pipeline {
|
2
|
+
agent any
|
3
|
+
stages {
|
4
|
+
stage("test") {
|
5
|
+
agent { label "unittest" }
|
6
|
+
environment {
|
7
|
+
PARALLEL_TEST_PROCESSORS = "1"
|
8
|
+
BUNDLE_DISABLE_EXEC_LOAD = "1"
|
9
|
+
DOCKER_HOST = "tcp://127.0.0.1:2375"
|
10
|
+
}
|
11
|
+
steps {
|
12
|
+
sh '''#!/bin/bash -l
|
13
|
+
set -xe
|
14
|
+
export -p
|
15
|
+
gem env
|
16
|
+
bundle check || bundle install --jobs=4 --path=vendor/bundle
|
17
|
+
bundle exec mcrain pull all
|
18
|
+
bundle exec rake parallel:spec
|
19
|
+
'''
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
post {
|
24
|
+
changed {
|
25
|
+
slackNotify(currentBuild.currentResult)
|
26
|
+
}
|
27
|
+
aborted {
|
28
|
+
slackNotify("ABORTED")
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
|
34
|
+
def slackNotify(result){
|
35
|
+
// https://github.com/jenkinsci/slack-plugin/issues/327
|
36
|
+
def durationString = currentBuild.durationString.replace(' and counting', '')
|
37
|
+
def notificationMessage = {resultString ->
|
38
|
+
"${env.JOB_NAME} - ${currentBuild.displayName} ${resultString} after ${durationString} (<${env.RUN_DISPLAY_URL}|Open>)"
|
39
|
+
}
|
40
|
+
switch(result){
|
41
|
+
case "SUCCESS":
|
42
|
+
slackSend color: 'good', message: notificationMessage("Back to normal")
|
43
|
+
break
|
44
|
+
case "FAILURE":
|
45
|
+
slackSend color: 'danger', message: notificationMessage("Failure")
|
46
|
+
break
|
47
|
+
case "UNSTABLE":
|
48
|
+
slackSend color: 'danger', message: notificationMessage("Unstable")
|
49
|
+
break
|
50
|
+
case "ABORTED":
|
51
|
+
slackSend color: 'warning', message: notificationMessage("Aborted")
|
52
|
+
break
|
53
|
+
default:
|
54
|
+
slackSend color: 'warning', message: notificationMessage("Unknown")
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
/* vim:set ft=groovy: */
|
data/exe/mcrain
CHANGED
data/lib/mcrain/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mcrain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- akm
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logger_pipe
|
@@ -109,6 +109,7 @@ files:
|
|
109
109
|
- ".travis.yml"
|
110
110
|
- CODE_OF_CONDUCT.md
|
111
111
|
- Gemfile
|
112
|
+
- Jenkinsfile
|
112
113
|
- README.md
|
113
114
|
- Rakefile
|
114
115
|
- bin/console
|
@@ -147,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
148
|
version: '0'
|
148
149
|
requirements: []
|
149
150
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.
|
151
|
+
rubygems_version: 2.7.6
|
151
152
|
signing_key:
|
152
153
|
specification_version: 4
|
153
154
|
summary: mcrain supports to run docker container for test.
|