Skip to content

Commit

Permalink
feat(RenovateController): first implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ywcb00 committed Sep 20, 2019
0 parents commit 9ddb0f8
Show file tree
Hide file tree
Showing 106 changed files with 24,163 additions and 0 deletions.
221 changes: 221 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
/renovate/tmp
/renovate/logs


# Created by https://www.gitignore.io/api/node,angular,webstorm,visualstudiocode
# Edit at https://www.gitignore.io/?templates=node,angular,webstorm,visualstudiocode

### Angular ###
## Angular ##
# compiled output
/dist
/tmp
/app/**/*.js
/app/**/*.js.map

# dependencies
/node_modules
/bower_components

# IDEs and editors
/.idea

# misc
/.sass-cache
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
testem.log
/typings

# e2e
/e2e/*.js
/e2e/*.map

#System Files
.DS_Store

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# 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
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://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/

# TypeScript cache
*.tsbuildinfo

# 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
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

### VisualStudioCode Patch ###
# Ignore all local history of files
.history

### WebStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# 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

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### WebStorm Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
.idea/sonarlint

# End of https://www.gitignore.io/api/node,angular,webstorm,visualstudiocode
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM node:12.10.0-alpine

ENV base /home/renovate
WORKDIR ${base}

# ADD Server runtime
ADD server/dist ./server/dist
ADD server/package.json ./server/package.json
ADD server/yarn.lock ./server/yarn.lock

# ADD Client bundles
ADD client/dist ./client/dist

ADD package.json ./package.json

RUN apk add git &&\
npm install -g python &&\
npm install -g renovate &&\
yarn server install --production --frozen-lockfile &&\
yarn cache clean &&\
rm -rf /root/ &&\
mkdir /root

VOLUME ["${base}/logs"]

ENV CONFIG_PATH /home/renovate/config/config.json
ENV RENOVATE_CONFIG_FILE /home/renovate/config/config.js
ENV NODE_ENV live
ENV PORT 8080

EXPOSE ${PORT}
CMD ["yarn", "start"]
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# RenovateController

![](./client/src/assets/renovate_controller_bot.png "RenovateController")

## Intro
RenovateController is a graphical user interface to configure, execute and observe the [Renovate Bot](https://renovatebot.com).
You can use `docker` to start and run the whole project inside a node container. The execution of the renovate job itself is all based on a configurable cron job.

### Overview

The GUI consists of two pages:
* the homepage ( `/` )
* the configuration page ( `/config` )

The homepage is the place to configure and observe the RenovateController itself. You can start/stop the cron job and configure its execution time, observe the states of the cron job and the [Renovate Bot](https://renovatebot.com), and even watch the console-output of a running renovate execution.

![](./snapshots/snapshot_homepage.png "HomePage")

On the configuration page is a form to do the configuration for the [Renovate Bot](https://renovatebot.com). Of the, so called, "onboardingConfig" there are only essential configuration options inside the form because of its huge range. To fully use all of its options, there is a JSON-editor placed on the end of the page where you can add and edit all available options.
A documentation of all configuration options can be found inside the [Renovate Docs](https://docs.renovatebot.com).

![](./snapshots/snapshot_configpage_01.png "ConfigurationPageForm")
![](./snapshots/snapshot_configpage_02.png "ConfigurationPageJSONEditor")

### Getting started

RenovateController can be run easily using `docker`. Before running `docker-compose` you will need to execute `yarn build` inside the project's root folder first to build the nestjs server and the angular client. Make sure the build did success on both. Then you can create and start the docker container using `docker-compose up`. This will create a node container, install renovate and the needed dependencies and finally start the server, which serves the client. The client should be running on port 80.

```shell
yarn build
docker-compose up
```
13 changes: 13 additions & 0 deletions client/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
46 changes: 46 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
27 changes: 27 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# RenovateController

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.3.2.

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
Loading

0 comments on commit 9ddb0f8

Please sign in to comment.