Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(2683): nodejs upgrade #42

Merged
merged 1 commit into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ class DockerExecutor extends Executor {
* Starts a docker build
* @method _start
* @param {Object} config A configuration object
* @param {String} [config.apiUri] screwdriver base api uri
* @param {Integer} config.buildId ID for the build
* @param {String} config.container Container for the build to run in
* @param {String} config.token JWT for the Build
Expand Down Expand Up @@ -218,6 +219,7 @@ class DockerExecutor extends Executor {
* Stop a docker build
* @method _stop
* @param {Object} config A configuration object
* @param {String} [config.apiUri] screwdriver base api uri
* @param {Integer} config.buildId ID for the build
* @return {Promise}
*/
Expand Down
34 changes: 15 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"name": "screwdriver-executor-docker",
"version": "5.0.0",
"version": "6.0.0",
"description": "Docker Swarm Executor for Screwdriver",
"main": "index.js",
"scripts": {
"pretest": "eslint .",
"test": "nyc --report-dir ./artifacts/coverage --reporter=lcov mocha --reporter mocha-multi-reporters --reporter-options configFile=./mocha.config.json --recursive --timeout 4000 --retries 1 --exit --allow-uncaught true --color true",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
"test": "nyc --report-dir ./artifacts/coverage --reporter=lcov mocha --reporter mocha-multi-reporters --reporter-options configFile=./mocha.config.json --recursive --timeout 4000 --retries 1 --exit --allow-uncaught true --color true"
},
"repository": {
"type": "git",
"url": "git@github.com:screwdriver-cd/executor-docker.git"
"url": "git+https://github.com/screwdriver-cd/executor-docker.git"
},
"homepage": "https://github.com/screwdriver-cd/executor-docker",
"bugs": "https://github.com/screwdriver-cd/screwdriver/issues",
Expand All @@ -30,27 +29,24 @@
"Tiffany Kyi <[email protected]>"
],
"release": {
"debug": false,
"verifyConditions": {
"path": "./node_modules/semantic-release/src/lib/plugin-noop.js"
}
"debug": false
},
"devDependencies": {
"chai": "^4.2.0",
"eslint": "^7.7.0",
"eslint-config-screwdriver": "^5.0.4",
"mocha": "^8.2.1",
"chai": "^4.3.7",
"eslint": "^8.28.0",
"eslint-config-screwdriver": "^7.0.0",
"mocha": "^10.1.0",
"mocha-multi-reporters": "^1.5.1",
"mocha-sonarqube-reporter": "^1.0.2",
"mockery": "^2.0.0",
"nyc": "^15.0.0",
"sinon": "^9.0.3"
"nyc": "^15.1.0",
"mockery": "^2.1.0",
"sinon": "^15.0.0"
},
"dependencies": {
"@hapi/hoek": "^9.0.4",
"circuit-fuses": "^4.0.4",
"@hapi/hoek": "^10.0.1",
"circuit-fuses": "^5.0.0",
"docker-parse-image": "^3.0.1",
"dockerode": "^2.5.8",
"screwdriver-executor-base": "^8.0.0"
"dockerode": "^3.3.4",
"screwdriver-executor-base": "^9.0.0"
}
}
2 changes: 1 addition & 1 deletion screwdriver.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
shared:
image: node:12
image: node:18

jobs:
main:
Expand Down
9 changes: 7 additions & 2 deletions test/index.test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict';

const assert = require('chai').assert;
const { assert } = require('chai');
const sinon = require('sinon');
const mockery = require('mockery');

sinon.assert.expose(assert, { prefix: '' });

describe('index', function() {
describe('index', function () {
// Time not important. Only life important.
this.timeout(5000);

Expand Down Expand Up @@ -403,6 +403,7 @@ describe('index', function() {

describe('stop', () => {
const buildId = 1992;
const apiUri = 'https://api.sd.cd';

it('finds and removes the containers', () => {
const findArgs = {
Expand All @@ -419,6 +420,7 @@ describe('index', function() {

return executor
.stop({
apiUri,
buildId
})
.then(() => {
Expand Down Expand Up @@ -453,6 +455,7 @@ describe('index', function() {

return executor
.stop({
apiUri,
buildId
})
.then(() => {
Expand All @@ -467,6 +470,7 @@ describe('index', function() {

return executor
.stop({
apiUri,
buildId
})
.then(() => {
Expand All @@ -482,6 +486,7 @@ describe('index', function() {

return executor
.stop({
apiUri,
buildId
})
.then(() => {
Expand Down