parent
3b7acb1b25
commit
edc52ebffd
@ -0,0 +1,56 @@ |
|||||||
|
"use strict"; |
||||||
|
|
||||||
|
import * as GitHubApi from "github"; |
||||||
|
import { join } from "path"; |
||||||
|
import run from "./lib"; |
||||||
|
import { Settings } from "./lib/types"; |
||||||
|
|
||||||
|
const createGithub = () => new GitHubApi({ |
||||||
|
debug: false, |
||||||
|
headers: { "user-agent": "micro-build-server" }, |
||||||
|
host: "github.enterprise.host", |
||||||
|
pathPrefix: "/api/v3", |
||||||
|
protocol: "https", |
||||||
|
timeout: 5000, |
||||||
|
}); |
||||||
|
|
||||||
|
const settings: Settings = { |
||||||
|
builderExecutable: "../DotNetBuilder/bin/Debug/MicroBuildServer.DotNetBuilder.exe", |
||||||
|
createGithub: (repoOwner) => { |
||||||
|
const github = createGithub(); |
||||||
|
|
||||||
|
github.authenticate({ |
||||||
|
password: "password", |
||||||
|
type: "basic", |
||||||
|
username: "username", |
||||||
|
}); |
||||||
|
|
||||||
|
return github; |
||||||
|
}, |
||||||
|
eslintBrowserConfig: join(__dirname, "settings-eslint-browser.json"), |
||||||
|
faviconpath: join(__dirname, "public/images/favicon.png"), |
||||||
|
gitpath: "M:/g", |
||||||
|
ignoreCodeAnalysisByDefault: true, |
||||||
|
isCodeAnalysisUnsupported: false, |
||||||
|
nugetApiKey: "NUGET-API-KEY", |
||||||
|
nugetHost: "https://nuget.host/", |
||||||
|
port: 3000, |
||||||
|
// port: process.env["PORT"], |
||||||
|
releasepath: "M:/r", |
||||||
|
siteRoot: "https://mbs.host/", |
||||||
|
skipCodeSigning: true, |
||||||
|
smtp: { |
||||||
|
auth: { |
||||||
|
pass: "password", |
||||||
|
user: "username", |
||||||
|
}, |
||||||
|
host: "smtp.host", |
||||||
|
receiver: "receiver@your.domain", |
||||||
|
sender: "sender@your.domain", |
||||||
|
}, |
||||||
|
staticcontentpath: join(__dirname, "public"), |
||||||
|
tmpcodepath: "M:/c", |
||||||
|
viewspath: join(__dirname, "views"), |
||||||
|
}; |
||||||
|
|
||||||
|
run(settings); |
@ -1,57 +0,0 @@ |
|||||||
"use strict"; |
|
||||||
|
|
||||||
import GitHubApi = require("github"); |
|
||||||
|
|
||||||
const createGithub = () => new GitHubApi({ |
|
||||||
"debug": false, |
|
||||||
"headers": { "user-agent": "micro-build-server (mbs.pos)" }, |
|
||||||
"host": "pos-github.payonline.ru", |
|
||||||
"pathPrefix": "/api/v3", |
|
||||||
"protocol": "https", |
|
||||||
"timeout": 5000 |
|
||||||
}); |
|
||||||
|
|
||||||
export default { |
|
||||||
"builderExecutable": "../DotNetBuilder/bin/Debug/MicroBuildServer.DotNetBuilder.exe", |
|
||||||
"codeSigningKeyFile": null, |
|
||||||
"codeSigningPublicKey": null, |
|
||||||
"createGithub": (repoOwner) => { |
|
||||||
const github = createGithub(); |
|
||||||
|
|
||||||
github.authenticate({ |
|
||||||
"password": "*** OWNER APPLICATION PASSWORD ***", |
|
||||||
"type": "basic", |
|
||||||
"username": repoOwner |
|
||||||
}); |
|
||||||
|
|
||||||
/* Or, alternatively: |
|
||||||
github.authenticate({ |
|
||||||
"password": "*** MBS APPLICATION PASSWORD ***", |
|
||||||
"type": "basic", |
|
||||||
"username": "*** MBS USER ***" |
|
||||||
}); |
|
||||||
*/ |
|
||||||
|
|
||||||
return github; |
|
||||||
}, |
|
||||||
"eslintBrowserConfig": "settings-eslint-browser.json", |
|
||||||
"gitpath": "M:/g", |
|
||||||
"ignoreCodeAnalysisByDefault": true, |
|
||||||
"isCodeAnalysisUnsupported": false, |
|
||||||
"nugetApiKey": "*** NUGET API KEY ***", |
|
||||||
"nugetHost": "https://*** NUGET HOST ***/", |
|
||||||
"port": 3000, |
|
||||||
"releasepath": "M:/r", |
|
||||||
"siteRoot": "https://mbs.your.domain/", |
|
||||||
"skipCodeSigning": true, |
|
||||||
"smtp": { |
|
||||||
"auth": { |
|
||||||
"pass": "*** SMTP PASSWORD ***", |
|
||||||
"user": "*** SMTP USERNAME ***" |
|
||||||
}, |
|
||||||
"host": "smtp.host", |
|
||||||
"receiver": "receiver@your.domain", |
|
||||||
"sender": "sender@your.domain" |
|
||||||
}, |
|
||||||
"tmpcodepath": "M:/c" |
|
||||||
}; |
|
Loading…
Reference in new issue