style: prettier
This commit is contained in:
parent
ece7275743
commit
a7f008253c
@ -1,14 +1,14 @@
|
|||||||
const Docker = require("dockerode");
|
const Docker = require('dockerode');
|
||||||
const getStream = require("get-stream");
|
const getStream = require('get-stream');
|
||||||
const pRetry = require("p-retry");
|
const pRetry = require('p-retry');
|
||||||
const { initBareRepo, gitShallowClone } = require("./git-utils");
|
const {initBareRepo, gitShallowClone} = require('./git-utils');
|
||||||
|
|
||||||
const IMAGE = "pvdlg/docker-gitbox:latest";
|
const IMAGE = 'pvdlg/docker-gitbox:latest';
|
||||||
const SERVER_PORT = 80;
|
const SERVER_PORT = 80;
|
||||||
const HOST_PORT = 2080;
|
const HOST_PORT = 2080;
|
||||||
const SERVER_HOST = "localhost";
|
const SERVER_HOST = 'localhost';
|
||||||
const GIT_USERNAME = "integration";
|
const GIT_USERNAME = 'integration';
|
||||||
const GIT_PASSWORD = "suchsecure";
|
const GIT_PASSWORD = 'suchsecure';
|
||||||
const docker = new Docker();
|
const docker = new Docker();
|
||||||
let container;
|
let container;
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ async function start() {
|
|||||||
await container.start();
|
await container.start();
|
||||||
|
|
||||||
const exec = await container.exec({
|
const exec = await container.exec({
|
||||||
Cmd: ["ng-auth", "-u", GIT_USERNAME, "-p", GIT_PASSWORD],
|
Cmd: ['ng-auth', '-u', GIT_USERNAME, '-p', GIT_PASSWORD],
|
||||||
AttachStdout: true,
|
AttachStdout: true,
|
||||||
AttachStderr: true,
|
AttachStderr: true,
|
||||||
});
|
});
|
||||||
@ -51,9 +51,9 @@ async function stop() {
|
|||||||
* @param {String} [description=`Repository ${name}`] The repository description.
|
* @param {String} [description=`Repository ${name}`] The repository description.
|
||||||
* @return {Object} The `repositoryUrl` (URL without auth) and `authUrl` (URL with auth).
|
* @return {Object} The `repositoryUrl` (URL without auth) and `authUrl` (URL with auth).
|
||||||
*/
|
*/
|
||||||
async function createRepo(name, branch = "master", description = `Repository ${name}`) {
|
async function createRepo(name, branch = 'master', description = `Repository ${name}`) {
|
||||||
const exec = await container.exec({
|
const exec = await container.exec({
|
||||||
Cmd: ["repo-admin", "-n", name, "-d", description],
|
Cmd: ['repo-admin', '-n', name, '-d', description],
|
||||||
AttachStdout: true,
|
AttachStdout: true,
|
||||||
AttachStderr: true,
|
AttachStderr: true,
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user