This commit is contained in:
Martin Donnelly 2021-02-11 10:24:10 +00:00
commit a334684605
28 changed files with 3877 additions and 0 deletions

162
.gitignore vendored Normal file
View File

@ -0,0 +1,162 @@
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Typescript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
### macOS template
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
.idea/
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
# Gradle:
.idea/**/gradle.xml
.idea/**/libraries
# CMake
cmake-build-debug/
# Mongo Explorer plugin:
.idea/**/mongoSettings.xml
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
artefacts/screenshots/*.png
artefacts/*.txt
artefacts/*.json
artefacts/*.html
artefacts/*
/tests/*.zip
/output/
/dist/
!/tests/data/
/tests/sink/
/debug/
/update.sh
/setup/web/
/backup/
/archive.tar.gz
/user/
/zip

29
README.md Normal file
View File

@ -0,0 +1,29 @@
# nci quick setting up
This repo contains sample configuration for setup
[nci](https://github.com/node-ci/nci) with docker node quickly.
Clone quick setup repo, go into it and install dependencies:
```sh
git clone https://github.com/node-ci/nci-docker-node-quick-setup && cd nci-docker-node-quick-setup && npm install
```
run nci:
```sh
node_modules/.bin/nci
```
that's all, now you can experiment with it by adding/changing projects,
use web interface (on http://127.0.0.1:3000 by default) for run project builds,
etc.
Currently web interface doesn't support adding new projects or editing of
existing projects. You have to do that by adding/editing project config
file (data/projects dir). Server config file is data/config.yaml.

60
data/config.yaml Normal file
View File

@ -0,0 +1,60 @@
plugins:
- nci-docker-node
- nci-projects-reloader
- nci-static-server
- nci-rest-api-server
- nci-mail-notification
- nci-scheduler
#ui better be last plugin
- nci-classic-ui
nodes:
- type: docker
#utilize that node as much as possible
usageStrategy: maximum
#allow maximum 5 parallel builds
maxExecutorsCount: 5
#declare that that node satisfies any project environment
envs:
- !!js/regexp .*
options:
#target docker daemon host
host: unix:///var/run/docker.sock
#default environment (used if not passed from project)
defaultEnv: node:12-buster
http:
host: 127.0.0.1
port: 3000
url: http://127.0.0.1:3000
static:
#this settings will be consumed by static server plugin
locations:
#serve static for ui plugin
- url: /favicon.ico
root: node_modules/nci-classic-ui/static/
- url: !!js/regexp ^/(js|css|fonts|images)/
root: node_modules/nci-classic-ui/static/
#serve project workspaces via http, remove lines
#below if don`t need/want that
- url: !!js/regexp ^/projects/(\w|-)+/workspace/
root: data/
storage:
#use leveldown as db backend
backend: leveldown
# uncomment to configure mail notifications transport
notify:
# #configure account for sending notifications
# #this settings will be consumed by mail notification plugin
mail:
host: mail.caliban.io
port: 587
auth:
user: buildbot@caliban.io
pass: rAoln.tJEye

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
MANIFEST-000079

0
data/db/buildLogs/LOCK Normal file
View File

5
data/db/buildLogs/LOG Normal file
View File

@ -0,0 +1,5 @@
2021/02/11-09:30:33.731373 7fd9e8e59640 Recovering log #78
2021/02/11-09:30:33.731580 7fd9e8e59640 Level-0 table #80: started
2021/02/11-09:30:33.733250 7fd9e8e59640 Level-0 table #80: 2954 bytes OK
2021/02/11-09:30:33.737211 7fd9e8e59640 Delete type=0 #78
2021/02/11-09:30:33.737246 7fd9e8e59640 Delete type=3 #76

View File

@ -0,0 +1,5 @@
2021/02/11-09:13:44.630901 7fa72affd640 Recovering log #74
2021/02/11-09:13:44.633436 7fa72affd640 Level-0 table #77: started
2021/02/11-09:13:44.638143 7fa72affd640 Level-0 table #77: 65385 bytes OK
2021/02/11-09:13:44.640540 7fa72affd640 Delete type=3 #72
2021/02/11-09:13:44.640575 7fa72affd640 Delete type=0 #74

Binary file not shown.

BIN
data/db/main/000078.ldb Normal file

Binary file not shown.

BIN
data/db/main/000080.ldb Normal file

Binary file not shown.

BIN
data/db/main/000083.ldb Normal file

Binary file not shown.

1
data/db/main/CURRENT Normal file
View File

@ -0,0 +1 @@
MANIFEST-000082

0
data/db/main/LOCK Normal file
View File

5
data/db/main/LOG Normal file
View File

@ -0,0 +1,5 @@
2021/02/11-09:30:33.731390 7fd9e965a640 Recovering log #81
2021/02/11-09:30:33.731710 7fd9e965a640 Level-0 table #83: started
2021/02/11-09:30:33.733904 7fd9e965a640 Level-0 table #83: 17188 bytes OK
2021/02/11-09:30:33.737820 7fd9e965a640 Delete type=3 #79
2021/02/11-09:30:33.737858 7fd9e965a640 Delete type=0 #81

5
data/db/main/LOG.old Normal file
View File

@ -0,0 +1,5 @@
2021/02/11-09:13:44.630903 7fa72b7fe640 Recovering log #77
2021/02/11-09:13:44.631778 7fa72b7fe640 Level-0 table #80: started
2021/02/11-09:13:44.634849 7fa72b7fe640 Level-0 table #80: 17307 bytes OK
2021/02/11-09:13:44.637764 7fa72b7fe640 Delete type=0 #77
2021/02/11-09:13:44.638204 7fa72b7fe640 Delete type=3 #75

Binary file not shown.

4
data/preload.json Normal file
View File

@ -0,0 +1,4 @@
{
"plugins": ["nci-yaml-reader"]
}

BIN
data/projects.zip Normal file

Binary file not shown.

View File

@ -0,0 +1,43 @@
scm:
type: git
repository: https://martind-mime:Ruby.Miner.709@bitbucket.org/martind-mime/aiber-test.git
rev: master
buildEvery:
#build project every 5 minutes
time: "*/5 * * * *"
#but only if there is scm changes
withScmChangesOnly: true
#Specify environments in which project should be run.
#That enironments will be satisfied be nodes (see nodes in data/config.yaml).
#Different options can be passed to different environments.
envs:
#- name: node:12-buster
- name: node15-puppeteer
options:
publishAll: true
#uncomment to enable notifications
#notify when build fails or build status changes (according to previous status)
notify:
on:
- done
- error
- change
to:
mail:
- martind2000@gmail.com
steps:
- name: sync deps
cmd: >
npm --loglevel warn install &&
npm --loglevel warn prune
- name: Install Puppeteer
cmd: npm i --save puppeteer
- name: test
cmd: npm test

View File

@ -0,0 +1,51 @@
scm:
type: git
repository: https://martind-mime:Ruby.Miner.709@bitbucket.org/martind-mime/aiber-test.git
rev: master
buildEvery:
#build project every 5 minutes
time: "*/5 * * * *"
#but only if there is scm changes
withScmChangesOnly: true
#Specify environments in which project should be run.
#That enironments will be satisfied be nodes (see nodes in data/config.yaml).
#Different options can be passed to different environments.
envs:
- name: node:12-buster
options:
publishAll: true
#uncomment to enable notifications
#notify when build fails or build status changes (according to previous status)
notify:
on:
- done
- error
- change
to:
mail:
- martind2000@gmail.com
steps:
- name: Install more Puppeteer dependences
cmd: >
echo udev hold | dpkg --set-selections &&
echo initscripts hold | dpkg --set-selections &&
apt-get -yq update &&
DEBIAN_FRONTEND=noninteractive apt-get install -yq -f --no-install-recommends build-essential dnsutils git xorg blackbox libasound2 libnss3-dev libxss1 libatk-bridge2.0-0 libgtk2.0-common libgtk-3-0 &&
apt-get autoremove -yq &&
apt-get clean -yq
- name: sync deps
cmd: >
npm --loglevel warn install &&
npm --loglevel warn prune
- name: Install Puppeteer
cmd: npm i --save puppeteer
- name: test
cmd: npm test

View File

@ -0,0 +1,34 @@
scm:
type: git
repository: https://martind2000:1V3D4m526i@gitlab.silvrtree.co.uk/martind2000/jobscraper.git
rev: development
#Specify environments in which project should be run.
#That enironments will be satisfied be nodes (see nodes in data/config.yaml).
#Different options can be passed to different environments.
envs:
- name: node:12
options:
publishAll: true
#uncomment to enable notifications
#notify when build fails or build status changes (according to previous status)
# notify:
# on:
# - error
# - change
# to:
# mail:
# - your_mail@example.com
steps:
- name: sync deps
cmd: >
npm --loglevel warn install &&
npm --loglevel warn prune
- name: test
cmd: npm test

View File

@ -0,0 +1,45 @@
scm:
type: git
repository: https://github.com/node-ci/nci
rev: master
buildEvery:
#build project every 5 minutes
time: "0 */5 * * * *"
#but only if there is scm changes
withScmChangesOnly: true
#Specify environments in which project should be run.
#That enironments will be satisfied be nodes (see nodes in data/config.yaml).
#Different options can be passed to different environments.
envs:
- name: node:12
options:
publish:
- 9090:9999
- name: node:10
options:
publishAll: true
#uncomment to enable notifications
#notify when build fails or build status changes (according to previous status)
# notify:
# on:
# - error
# - change
# to:
# mail:
# - your_mail@example.com
steps:
- name: sync deps
cmd: >
npm --loglevel warn install &&
npm --loglevel warn prune
- name: test
cmd: npm test

View File

@ -0,0 +1,44 @@
scm:
type: git
repository: https://github.com/martind2000/utils.git
rev: main
buildEvery:
#build project every 5 minutes
time: "0 */5 * * * *"
#but only if there is scm changes
withScmChangesOnly: true
#Specify environments in which project should be run.
#That enironments will be satisfied be nodes (see nodes in data/config.yaml).
#Different options can be passed to different environments.
envs:
- name: node:12
options:
publishAll: true
#uncomment to enable notifications
#notify when build fails or build status changes (according to previous status)
# notify:
# on:
# - error
# - change
# to:
# mail:
# - your_mail@example.com
steps:
- name: sync deps
cmd: >
npm --loglevel warn install &&
npm --loglevel warn prune
- name: clean
cmd: npm run clean
- name: prepare
cmd: npm run prepare
- name: test
cmd: npm test

3355
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

28
package.json Normal file
View File

@ -0,0 +1,28 @@
{
"name": "nci-docker-node-quick-setup",
"version": "1.0.0",
"description": "Sample configuration for nci with docker node deployment",
"repository": {
"type": "git",
"url": "https://github.com/node-ci/nci-docker-node-quick-setup.git"
},
"author": "Oleg Korobenko <oleg.korobenko@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/node-ci/nci-docker-node-quick-setup/issues"
},
"homepage": "https://github.com/node-ci/nci-docker-node-quick-setup",
"dependencies": {
"forever": "0.15.1",
"leveldown": "^5.4.1",
"nci": "latest",
"nci-classic-ui": "latest",
"nci-docker-node": "latest",
"nci-mail-notification": "latest",
"nci-projects-reloader": "latest",
"nci-rest-api-server": "latest",
"nci-scheduler": "^1.2.0",
"nci-static-server": "latest",
"nci-yaml-reader": "latest"
}
}