Skip to content
Snippets Groups Projects
Commit da120f12 authored by Tim Fechner's avatar Tim Fechner
Browse files

Introduce continuous integration (ci)

Provide "gulp build" command
parent f6fd5769
No related branches found
No related tags found
No related merge requests found
Pipeline #
image: debian:stable
# run this before every stage
before_script:
# install environment
- apt-get update -q && apt-get install -qq curl python3-pip > /dev/null
- pip3 install -r requirements.txt
# set up project
- cp salt_observer/private_settings.example.py salt_observer/private_settings.py
# build stage is the first stage
build_staticfiles:
stage: build
script:
# Install nodejs
- curl -sL https://deb.nodesource.com/setup_4.x | sh > /dev/null 2>&1
- apt-get update -q && apt-get install -qq nodejs
# install & run gulp
- npm i gulp-cli --global > /dev/null
- npm i > /dev/null
- gulp build
# collect staticfiles
- python3 manage.py collectstatic --noinput
artifacts:
paths:
- static/
name: "staticfiles"
# execute test stage jobs if build stage is completed successful
check_runserver:
stage: test
script:
- python3 manage.py runserver localhost:8000 &
- sleep 5
- curl -isSf http://localhost:8000/
try_migrations:
stage: test
script:
- python3 manage.py migrate
...@@ -20,6 +20,7 @@ gulp.task('default', [ ...@@ -20,6 +20,7 @@ gulp.task('default', [
'collect:fonts', 'collect:fonts',
'compile:less' 'compile:less'
]); ]);
gulp.task('build', ['default'])
gulp.task('watch', ['default'], function() { gulp.task('watch', ['default'], function() {
var less_watcher = gulp.watch(src + 'less/**/*.less', ['compile:less']); var less_watcher = gulp.watch(src + 'less/**/*.less', ['compile:less']);
......
...@@ -7,7 +7,7 @@ SECRET_KEY = 'l=fg3h+kynh^y77ac7k%4ubsk4wz=z&1ud8uy*m%p(iw8*+xp-' ...@@ -7,7 +7,7 @@ SECRET_KEY = 'l=fg3h+kynh^y77ac7k%4ubsk4wz=z&1ud8uy*m%p(iw8*+xp-'
# SECURITY WARNING: # SECURITY WARNING:
# don't run with debug turned on in production! # don't run with debug turned on in production!
DEBUG = False DEBUG = True
# change this! # change this!
ALLOWED_HOSTS = ['localhost'] ALLOWED_HOSTS = ['localhost']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment