Skip to content

Commit

Permalink
chore: add prettier and fix linting a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
knownasilya committed May 9, 2020
1 parent 0e77886 commit 448a38b
Show file tree
Hide file tree
Showing 20 changed files with 552 additions and 3,864 deletions.
11 changes: 10 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
"es6": true
},
"extends": "eslint:recommended",
"globals": {
"describe": true,
"beforeEach": true,
"afterEach": true
"it": true
},
"rules": {
"indent": [2, 2],
"brace-style": [2, "1tbs"],
Expand All @@ -21,7 +27,10 @@
"no-use-before-define": [2, "nofunc"],
"no-underscore-dangle": 0,
"no-constant-condition": 0,
"space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
"space-before-function-paren": [
2,
{ "anonymous": "always", "named": "never" }
],
"func-style": [2, "declaration"]
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
!.idea/codeStyleSettings.xml

node_modules/
yarn-error.log
4 changes: 2 additions & 2 deletions .idea/codeStyleSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
singleQuote: true
};
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- "10"
- "node"
- '10'
- 'node'

sudo: false
64 changes: 22 additions & 42 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,109 +3,89 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

<a name="1.1.0"></a>
# 1.1.0 (2018-08-14)

# 1.1.0 (2018-08-14)

### Features

* Set default CI environment variables ([#40](https://github.com/Strider-CD/strider-simple-runner/issues/40)) ([9586d5c](https://github.com/Strider-CD/strider-simple-runner/commit/9586d5c))


- Set default CI environment variables ([#40](https://github.com/Strider-CD/strider-simple-runner/issues/40)) ([9586d5c](https://github.com/Strider-CD/strider-simple-runner/commit/9586d5c))

<a name="1.0.2"></a>
## 1.0.2 (2017-09-26)

## 1.0.2 (2017-09-26)

### Bug Fixes

* debug keeper error ([c459df2](https://github.com/Strider-CD/strider-simple-runner/commit/c459df2))


- debug keeper error ([c459df2](https://github.com/Strider-CD/strider-simple-runner/commit/c459df2))

<a name="1.0.1"></a>
## 1.0.1 (2016-08-03)


## 1.0.1 (2016-08-03)

<a name="1.0.0"></a>
# 1.0.0 (2016-07-29)


# 1.0.0 (2016-07-29)

<a name="0.15.3"></a>
## 0.15.3 (2016-07-20)


## 0.15.3 (2016-07-20)

<a name="0.15.2"></a>
## 0.15.2 (2016-06-17)


## 0.15.2 (2016-06-17)

<a name="0.15.1"></a>
## 0.15.1 (2016-05-05)


## 0.15.1 (2016-05-05)

<a name="0.15.0"></a>
# 0.15.0 (2016-04-24)


# 0.15.0 (2016-04-24)

<a name="0.14.0"></a>
# 0.14.0 (2016-03-23)


# 0.14.0 (2016-03-23)

<a name="0.13.1"></a>
## 0.13.1 (2014-08-19)


## 0.13.1 (2014-08-19)

<a name="0.13.0"></a>
# 0.13.0 (2014-08-09)


# 0.13.0 (2014-08-09)

<a name="0.12.0"></a>
# 0.12.0 (2014-05-29)


# 0.12.0 (2014-05-29)

<a name="0.11.3"></a>
## 0.11.3 (2014-02-04)


## 0.11.3 (2014-02-04)

<a name="0.11.2"></a>
## 0.11.2 (2013-12-05)


## 0.11.2 (2013-12-05)

<a name="0.11.1"></a>
## 0.11.1 (2013-12-05)


## 0.11.1 (2013-12-05)

<a name="0.11.0"></a>
# 0.11.0 (2013-11-16)


# 0.11.0 (2013-11-16)

<a name="0.10.0"></a>
# 0.10.0 (2013-08-28)


# 0.10.0 (2013-08-28)

<a name="0.9.3"></a>
## 0.9.3 (2013-08-20)


## 0.9.3 (2013-08-20)

<a name="0.9.2"></a>
## 0.9.2 (2013-08-05)


## 0.9.2 (2013-08-05)

<a name="0.9.1"></a>

## 0.9.1 (2013-08-02)
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ concurrentJobs(1): maximum number of jobs to execute at once
```

Ex: github provider config

```js
{
id: 'github',
Expand All @@ -73,6 +74,7 @@ Ex: github provider config
```

Ex: git provider config

```js
{
id: 'git',
Expand Down Expand Up @@ -122,17 +124,14 @@ Providers:
- git
- github

Tests
=====
# Tests

Strider-simple-runner comes with tests. To run, simply execute `npm test`.

License
=======
# License

Strider-simple-runner is released under a BSD license.

Credits
=======
# Credits

Picture of worker ant CC-BY myprofe from http://www.flickr.com/photos/myprofe/5883651745/sizes/m/in/photostream/
19 changes: 12 additions & 7 deletions config/config.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
<h3>Simple Runner</h3>
<p>
Jobs are run on the same machine as the main strider instance, in a
child process. This is the simplest option, but offers no security nor isolation.
<strong>Only test trusted projects</strong> using this
runner.
If you need isolation, check out <a href="https://github.com/Strider-CD/strider-docker-runner">Docker
Runner</a>.
Jobs are run on the same machine as the main strider instance, in a child
process. This is the simplest option, but offers no security nor isolation.
<strong>Only test trusted projects</strong> using this runner. If you need
isolation, check out
<a href="https://github.com/Strider-CD/strider-docker-runner">Docker Runner</a
>.
</p>

<p>
Preserve the data directories from
<input class="inline-number" type="number" ng-model="config.recentBuilds" placeholder="1">
<input
class="inline-number"
type="number"
ng-model="config.recentBuilds"
placeholder="1"
/>
previous builds.
</p>

Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
// Strider runner requires:
config: {
pty: Boolean,
useCache: Boolean
useCache: Boolean,
},

// function(emitter, opts, cb) -> creates a 'runner' bound to the emitter
Expand All @@ -32,5 +32,5 @@ module.exports = {
// <-- queue.job_complete

// We expose these for other modules / unit testing
Runner: Runner
Runner: Runner,
};
4 changes: 3 additions & 1 deletion lib/cachier.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ function copy(from, to, done) {
fs.remove(to, function () {
fs.mkdirp(path.dirname(to), function () {
fs.copy(from, to, function (err) {
return done(err && new Error(`Failed to retrieve cached code: ${err}`));
return done(
err && new Error(`Failed to retrieve cached code: ${err}`)
);
});
});
});
Expand Down
12 changes: 6 additions & 6 deletions lib/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@ var skels = {
std: {
out: '',
err: '',
merged: ''
}
merged: '',
},
},
command: {
out: '',
err: '',
merged: '',
started: null,
command: '',
plugin: ''
plugin: '',
},
phase: {
finished: null,
exitCode: -1,
commands: []
}
commands: [],
},
};

module.exports = {
skels: skels,
phases: phases
phases: phases,
};
Loading

0 comments on commit 448a38b

Please sign in to comment.