Skip to content
Snippets Groups Projects
Commit 65f6abff authored by DJ Mountney's avatar DJ Mountney
Browse files

Update the gitignore and gitlab-ci templates for 9.0

parent 1110b2f1
No related branches found
No related tags found
No related merge requests found
The MIT License (MIT)
 
Copyright (c) 2016 GitLab.org
Copyright (c) 2016-2017 GitLab.org
 
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Loading
Loading
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/php
image: php:latest
# Pick zero or more services to be used on all builds.
# Only needed when using a docker container to run your tests in.
# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-service
services:
- mysql:latest
variables:
MYSQL_DATABASE: project_name
MYSQL_ROOT_PASSWORD: secret
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
- vendor/
- node_modules/
# This is a basic example for a gem or script which doesn't use
# services such as redis or postgres
before_script:
# Update packages
- apt-get update -yqq
# Upgrade to Node 7
- curl -sL https://deb.nodesource.com/setup_7.x | bash -
# Install dependencies
- apt-get install git nodejs libcurl4-gnutls-dev libicu-dev libmcrypt-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libpq-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev -yqq
# Install php extensions
- docker-php-ext-install mbstring mcrypt pdo_mysql curl json intl gd xml zip bz2 opcache
# Install Composer and project dependencies.
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install
# Install Node dependencies.
# comment this out if you don't have a node dependency
- npm install
# Copy over testing configuration.
# Don't forget to set the database config in .env.testing correctly
# DB_HOST=mysql
# DB_DATABASE=project_name
# DB_USERNAME=root
# DB_PASSWORD=secret
- cp .env.testing .env
# Run npm build
# comment this out if you don't have a frontend build
# you can change this to to your frontend building script like
# npm run build
- npm run dev
# Generate an application key. Re-cache.
- php artisan key:generate
- php artisan config:cache
# Run database migrations.
- php artisan migrate
# Run database seed
- php artisan db:seed
test:
script:
# run laravel tests
- php vendor/bin/phpunit --coverage-text --colors=never
# run frontend tests
# if you have any task for testing frontend
# set it in your package.json script
# comment this out if you don't have a frontend test
- npm test
Loading
Loading
@@ -17,16 +17,17 @@
variables:
# This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
MAVEN_OPTS: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
# As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used
# when running from the command line.
# `installAtEnd` and `deployAtEnd`are only effective with recent version of the corresponding plugins.
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
 
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_BUILD_REF_NAME"'
cache:
paths:
- /root/.m2/repository/
- .m2/repository
 
# This will only validate and compile stuff and run e.g. maven-enforcer-plugin.
# Because some enforcer rules might check dependency convergence and class duplications
Loading
Loading
# This file is a template, and might need editing before it works on your project.
image: ayufan/openshift-cli
 
stages:
Loading
Loading
@@ -6,6 +5,7 @@ stages:
- review
- staging
- production
- cleanup
 
variables:
OPENSHIFT_SERVER: openshift.default.svc.cluster.local
Loading
Loading
@@ -28,7 +28,7 @@ test2:
.deploy: &deploy
before_script:
- oc login "$OPENSHIFT_SERVER" --token="$OPENSHIFT_TOKEN" --insecure-skip-tls-verify
- oc project "$CI_PROJECT_NAME" 2> /dev/null || oc new-project "$CI_PROJECT_NAME"
- oc project "$CI_PROJECT_NAME-$CI_PROJECT_ID" 2> /dev/null || oc new-project "$CI_PROJECT_NAME-$CI_PROJECT_ID"
script:
- "oc get services $APP 2> /dev/null || oc new-app . --name=$APP --strategy=docker"
- "oc start-build $APP --from-dir=. --follow || sleep 3s || oc start-build $APP --from-dir=. --follow"
Loading
Loading
@@ -51,7 +51,7 @@ review:
 
stop-review:
<<: *deploy
stage: review
stage: cleanup
script:
- oc delete all -l "app=$APP"
when: manual
Loading
Loading
# Select image from https://hub.docker.com/_/php/
image: php:7.1.1
# Select what we should cache between builds
cache:
paths:
- vendor/
before_script:
- apt-get update -yqq
- apt-get install -yqq git libmcrypt-dev libpq-dev libcurl4-gnutls-dev libicu-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev
# Install PHP extensions
- docker-php-ext-install mbstring mcrypt pdo_pgsql curl json intl gd xml zip bz2 opcache
# Install and run Composer
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install
# Bring in any services we need http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
# See http://docs.gitlab.com/ce/ci/services/README.html for examples.
services:
- mysql:5.7
# Set any variables we need
variables:
# Configure mysql environment variables (https://hub.docker.com/r/_/mysql/)
MYSQL_DATABASE: mysql_database
MYSQL_ROOT_PASSWORD: mysql_strong_password
# Run our tests
# If Xdebug was installed you can generate a coverage report and see code coverage metrics.
test:
script:
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never
\ No newline at end of file
Loading
Loading
@@ -9,3 +9,9 @@ pages:
- public
only:
- master
test:
script:
- hugo
except:
- master
# Full project: https://gitlab.com/pages/jekyll
# Template project: https://gitlab.com/pages/jekyll
# Docs: https://docs.gitlab.com/ce/pages/
# Jekyll version: 3.4.0
image: ruby:2.3
 
before_script:
- bundle install
test:
stage: test
script:
- gem install jekyll
- jekyll build -d test
- bundle exec jekyll build -d test
artifacts:
paths:
- test
Loading
Loading
@@ -15,10 +19,10 @@ test:
pages:
stage: deploy
script:
- gem install jekyll
- jekyll build -d public
- bundle exec jekyll build -d public
artifacts:
paths:
- public
only:
- master
\ No newline at end of file
Loading
Loading
@@ -12,6 +12,7 @@ stages:
- review
- staging
- production
- cleanup
 
build:
stage: build
Loading
Loading
@@ -61,7 +62,7 @@ review:
- master
 
stop_review:
stage: review
stage: cleanup
variables:
GIT_STRATEGY: none
script:
Loading
Loading
Loading
Loading
@@ -12,6 +12,7 @@ stages:
- review
- staging
- production
- cleanup
 
build:
stage: build
Loading
Loading
@@ -61,7 +62,7 @@ review:
- master
 
stop_review:
stage: review
stage: cleanup
variables:
GIT_STRATEGY: none
script:
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment