Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot] acb5a764f1
Bump eslint from 3.19.0 to 7.2.0 in /BuildServer 4 years ago
  1. 2
      BuildServer/package.json
  2. 75
      README.md

@ -14,7 +14,7 @@
"body-parser": "^1.15.2",
"cssnano": "^3.9.1",
"errorhandler": "^1.5.0",
"eslint": "^3.12.2",
"eslint": "^7.2.0",
"express": "4.14.0",
"fs-extra": "^1.0.0",
"github": "~9.0.0",

@ -1,56 +1,45 @@
micro-build-server
==================
Motivation
==========
TeamCity forces us to separately configure every branch on TeamCity server,
which introduces an unreasonable friction for our short-lived feature dev branches,
and would also force us to purchase the most expensive subscription
because the cheaper ones come with a very limited number of branch configurations.
Since all our services are built more or less in a similar way,
it is not very difficult to create our own build server,
which is done in this repository.
Development
===========
Разработка
==========
Install Node.js v6.
Установить Node.js v6.
Run `npm install` in `BuildServer` directory.
Запустить `npm install` из папки `BuildServer`.
Create `app.ts` based on `app.ts.example`.
Создать `app.ts` на основе `app.ts.example`.
To check code style or types, use `npm test`.
Для проверки code style / типов использовать `npm test`.
Setting up the server
=====================
Установка на сервере
====================
Install Node.js v6.
Установить Node.js v6.
Copy to the server build artifacts (contents of the `bin\Release` folder) of `DotNetBuilder`.
Скопировать на сервер собранный проект (содержимое папки `bin\Release`) `DotNetBuilder`.
Add `Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` (can be extracted out of 6.0.4 release on NuGet) and `Microsoft.VisualStudio.Setup.Configuration.Interop, PublicKeyToken=b03f5f7f11d50a3a` assemblies to GAC.
Установить в GAC сборки `Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` (можно взять из релиза 6.0.4 с NuGet), `Microsoft.VisualStudio.Setup.Configuration.Interop, PublicKeyToken=b03f5f7f11d50a3a`.
Clone the repo (`git clone`).
Склонировать репозиторий (`git clone`).
Run `npm install` in `BuildServer` directory.
Запустить `npm install` из папки `BuildServer`.
Create `app.ts` based on `app.ts.example` (in order to use it in IIS set the value `port: process.env["PORT"]`).
Values of `gitpath`, `releasepath`, `tmpcodepath` should be as short as possible.
Создать `app.ts` на основе `app.ts.example` (для использования в IIS надо указать `port: process.env["PORT"]`).
Пути `gitpath`, `releasepath`, `tmpcodepath` должны быть максимально короткими.
Check that `app.ts` is correct by running `npm test`.
Проверить, что `app.ts` правильный с помощью `npm test`.
Build by `npm build` or `npm run build`.
Собрать с помощью `npm build` или `npm run build`.
Run by `npm start` or `node app`.
In order to use in IIS, install `iisnode`, and create a new website in IIS, pointing to the `BuildServer` directory (the one with `Web.config`).
Запускать с помощью `npm start` или `node app`.
Для использования в IIS - установить iisnode, создать в iis сайт, указывающий на корневую папку `BuildServer` (в которой лежит `Web.config`).
Depending on the system, you might also have to install Microsoft .NET Targeting Pack and appropriate version of Windows SDK to the server.
Возможно, в зависимости от сценариев использования, также понадобится установить на сервер Microsoft .NET Targeting Pack и Windows SDK нужной версии.
Updating the server
===================
Обновление сервера
==================
```
git pull origin master
@ -58,12 +47,12 @@ npm test
npm run build
```
Usage
=====
Использование
=============
In the settings of a target repository (and all its forks), add a webhook pointing to `https://micro-build-server/github/postreceive`.
В настройках нужного репозитория (и его форков) указать адрес хука: `https://micro-build-server/github/postreceive`.
In target repository, create an `mbs.pos` file with contents of the following form:
Добавить в корневую папку репозитория файл `mbs.pos` с содержимым следующего вида:
```
{
@ -90,18 +79,16 @@ In target repository, create an `mbs.pos` file with contents of the following fo
}
```
All supported task types and their parameters are declared in [`BuildServer\lib\tasks`](BuildServer/lib/tasks).
In order to implement a new task type, create a new `yourtaskname.ts` in that directory.
Со списком возможных типов задач и их параметров можно ознакомиться в папке `BuildServer\lib\tasks`.
This will automatically add build status comments to your PRs, and automatically close PRs when needed.
Для добавления новой задачи достаточно добавить новый файл `yourtaskname.ts` в эту папку.
In order to display a badge with the build status for the relevant branch, add the following line to `README.md` of the target repository:
Для получения информации о статусе сборки достаточно добавить в README.md нужного репозитория строчку
```
![Status](https://micro.build.server/status.svg)
```
Or alternatively, manually go to the page with the build report, by changing the URL in the address bar from `https://github.enterprise/what/ever` to `https://micro.build.server/github.enterprise/what/ever`.
Или вручную перейти на страницу с отчётом о сборке - для этого надо поменять в адресной строке адрес `https://github.enterprise/what/ever` на `https://micro.build.server/github.enterprise/what/ever`.
In both cases, it will display the build status of the relevant branch or commit.
В обоих случаях будет отображена информация о сборке нужной ветки / нужного коммита.

Loading…
Cancel
Save