Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
GitLab CI でRenovateを動かす
# Setting for job sequence.
# List up for jpb groups.
stages:
- check_version
- test
# Jobs
testjob:
stage: test
# Setting for Docker image
image: akira345/php7app-dev:latest
# Setting Environments
variables:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --locale=ja_JP.UTF-8"
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_DATABASE: ${POSTGRES_DB}
MAIL_PORT: 1025
MAIL_HOST: mailcacher
TZ: "Asia/Tokyo"
MEMCACHED_HOST: "memcached"
#Services is required for use networking services from dockerhub.
services:
- name: akira345/postgres11-ja_jp-locale:latest
alias: pgsql-srv
- name: memcached:latest
alias: memcached-srv
- name: pocari/mailcatcher
alias: mailcacher
before_script:
- cp gitlab.php.ini /usr/local/etc/php/php.ini
- cp .env.gitlab-ci .env
- pecl install xdebug
- docker-php-ext-enable xdebug
- composer install --no-interaction --prefer-dist --no-suggest --no-progress --ansi
script:
- ls -lah
- printenv
- php artisan key:generate
- php artisan migrate --seed
- vendor/bin/phpunit --configuration ./phpunit.xml --coverage-text --colors=never
only:
refs:
- master
- /^renovate\/.*$/
renovate:
stage: check_version
image:
name: renovate/renovate:latest
entrypoint: [""]
script:
- node /usr/src/app/dist/renovate.js --platform gitlab --token ${API_TOKEN} --endpoint https://gitlab.com/api/v4 $CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME
only:
variables:
- $renovate
refs:
- master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment