2019-06-03 23:09:16 +07:00
|
|
|
include:
|
|
|
|
- template: Dependency-Scanning.gitlab-ci.yml
|
|
|
|
- template: SAST.gitlab-ci.yml
|
|
|
|
|
2019-02-28 19:52:24 +07:00
|
|
|
stages:
|
2019-06-03 23:09:16 +07:00
|
|
|
- test
|
2019-02-28 19:52:24 +07:00
|
|
|
- install
|
|
|
|
- package
|
|
|
|
- installer
|
2019-06-03 23:09:16 +07:00
|
|
|
|
2019-07-05 16:35:30 +07:00
|
|
|
code_quality:
|
|
|
|
stage: test
|
|
|
|
image: docker:stable
|
|
|
|
allow_failure: true
|
|
|
|
services:
|
|
|
|
- docker:stable-dind
|
|
|
|
variables:
|
|
|
|
DOCKER_DRIVER: overlay2
|
|
|
|
script:
|
|
|
|
- |
|
|
|
|
if ! docker info &>/dev/null; then
|
|
|
|
if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then
|
|
|
|
export DOCKER_HOST='tcp://localhost:2375'
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
- docker run
|
|
|
|
--env CODECLIMATE_CODE="$PWD"
|
|
|
|
--volume "$PWD":/code
|
|
|
|
--volume /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
--volume /tmp/cc:/tmp/cc
|
|
|
|
--entrypoint "/bin/sh" codeclimate/codeclimate -c "/usr/src/app/bin/codeclimate engines:install && /usr/src/app/bin/codeclimate analyze"
|
|
|
|
only:
|
|
|
|
- branches@le.storm1er/ryzen-controller
|
|
|
|
- tags@le.storm1er/ryzen-controller
|
|
|
|
except:
|
|
|
|
variables:
|
|
|
|
- $CODE_QUALITY_DISABLED
|
|
|
|
|
2019-06-03 23:09:16 +07:00
|
|
|
dependency_scanning:
|
|
|
|
stage: test
|
|
|
|
only:
|
|
|
|
- branches@le.storm1er/ryzen-controller
|
|
|
|
except: []
|
|
|
|
|
|
|
|
sast:
|
|
|
|
stage: test
|
|
|
|
only:
|
|
|
|
- branches@le.storm1er/ryzen-controller
|
|
|
|
except: []
|
2019-02-28 19:52:24 +07:00
|
|
|
|
2019-06-03 17:17:13 +07:00
|
|
|
js_syntax:
|
2019-06-03 23:09:16 +07:00
|
|
|
stage: test
|
|
|
|
only:
|
|
|
|
- branches@le.storm1er/ryzen-controller
|
2019-06-03 17:17:13 +07:00
|
|
|
image: node:carbon
|
|
|
|
tags: [ docker ]
|
2019-06-03 23:09:16 +07:00
|
|
|
cache: {}
|
|
|
|
dependencies: []
|
2019-06-03 17:17:13 +07:00
|
|
|
before_script:
|
|
|
|
- npm install -g acorn
|
2019-06-03 19:15:22 +07:00
|
|
|
- rm -rf node_modules
|
2019-06-03 17:17:13 +07:00
|
|
|
script:
|
|
|
|
- find . -iname "*.js" -print0 | xargs -0 -I % sh -c 'echo "%"; acorn --ecma6 --silent "%"'
|
|
|
|
|
2019-02-28 19:52:24 +07:00
|
|
|
node:
|
|
|
|
only:
|
|
|
|
- tags@le.storm1er/ryzen-controller
|
2019-06-03 23:09:16 +07:00
|
|
|
- branches@le.storm1er/ryzen-controller
|
|
|
|
except:
|
|
|
|
- master
|
2019-02-28 19:52:24 +07:00
|
|
|
stage: install
|
|
|
|
tags: [ docker ]
|
|
|
|
image: electronuserland/builder:wine-mono
|
|
|
|
script:
|
|
|
|
- npm install
|
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- node_modules/
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- node_modules/
|
|
|
|
|
|
|
|
win32:
|
|
|
|
only:
|
|
|
|
- tags@le.storm1er/ryzen-controller
|
2019-06-03 23:09:16 +07:00
|
|
|
- branches@le.storm1er/ryzen-controller
|
|
|
|
except:
|
|
|
|
- master
|
2019-02-28 19:52:24 +07:00
|
|
|
stage: package
|
|
|
|
tags: [ docker ]
|
|
|
|
image: electronuserland/builder:wine-mono
|
|
|
|
script:
|
2019-03-11 20:40:26 +07:00
|
|
|
- npm run-script package-win32
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- release-builds/
|
|
|
|
dependencies:
|
|
|
|
- node
|
|
|
|
|
|
|
|
linux:
|
|
|
|
only:
|
|
|
|
- tags@le.storm1er/ryzen-controller
|
2019-06-03 23:09:16 +07:00
|
|
|
- branches@le.storm1er/ryzen-controller
|
|
|
|
except:
|
|
|
|
- master
|
2019-03-11 20:40:26 +07:00
|
|
|
stage: package
|
|
|
|
tags: [ docker ]
|
|
|
|
image: electronuserland/builder:wine-mono
|
|
|
|
script:
|
2019-06-03 18:07:16 +07:00
|
|
|
- rm -rf bin/*
|
2019-03-11 20:40:26 +07:00
|
|
|
- npm run-script package-linux
|
2019-02-28 19:52:24 +07:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- release-builds/
|
|
|
|
dependencies:
|
|
|
|
- node
|
|
|
|
|
|
|
|
win32-installer:
|
|
|
|
only:
|
|
|
|
- tags@le.storm1er/ryzen-controller
|
2019-06-03 23:09:16 +07:00
|
|
|
- branches@le.storm1er/ryzen-controller
|
|
|
|
except:
|
|
|
|
- master
|
2019-02-28 19:52:24 +07:00
|
|
|
stage: installer
|
|
|
|
tags: [ docker ]
|
|
|
|
image: electronuserland/builder:wine-mono
|
|
|
|
script:
|
2019-03-11 20:40:26 +07:00
|
|
|
- npm run-script build-win32
|
2019-02-28 19:52:24 +07:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- installer-builds/
|
|
|
|
dependencies:
|
|
|
|
- node
|
|
|
|
- win32
|
2019-03-11 20:40:26 +07:00
|
|
|
|
|
|
|
deb-installer:
|
|
|
|
only:
|
|
|
|
- tags@le.storm1er/ryzen-controller
|
2019-06-03 23:09:16 +07:00
|
|
|
- branches@le.storm1er/ryzen-controller
|
|
|
|
except:
|
|
|
|
- master
|
2019-03-11 20:40:26 +07:00
|
|
|
stage: installer
|
|
|
|
tags: [ docker ]
|
|
|
|
image: debian:stretch
|
|
|
|
before_script:
|
|
|
|
- apt update -y
|
|
|
|
- apt install fakeroot curl -y
|
|
|
|
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
|
|
|
|
- export NVM_DIR="$HOME/.nvm"
|
|
|
|
- '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"'
|
|
|
|
- nvm install 10.15.1
|
|
|
|
- nvm use 10.15.1
|
|
|
|
script:
|
|
|
|
- npm run-script build-deb
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- installer-builds/
|
|
|
|
dependencies:
|
|
|
|
- node
|
|
|
|
- linux
|
|
|
|
|
|
|
|
rpm-installer:
|
|
|
|
only:
|
|
|
|
- tags@le.storm1er/ryzen-controller
|
2019-06-03 23:09:16 +07:00
|
|
|
- branches@le.storm1er/ryzen-controller
|
|
|
|
except:
|
|
|
|
- master
|
2019-03-11 20:40:26 +07:00
|
|
|
stage: installer
|
|
|
|
tags: [ docker ]
|
|
|
|
image: electronuserland/builder:wine-mono
|
|
|
|
script:
|
|
|
|
- npm run-script build-rpm
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- installer-builds/
|
|
|
|
dependencies:
|
|
|
|
- node
|
|
|
|
- linux
|