diff options
Diffstat (limited to 'vendor/gitlab-ci-yml')
-rw-r--r-- | vendor/gitlab-ci-yml/Android.gitlab-ci.yml | 51 | ||||
-rw-r--r-- | vendor/gitlab-ci-yml/Bash.gitlab-ci.yml | 35 | ||||
-rw-r--r-- | vendor/gitlab-ci-yml/Crystal.gitlab-ci.yml | 1 | ||||
-rw-r--r-- | vendor/gitlab-ci-yml/Django.gitlab-ci.yml | 34 | ||||
-rw-r--r-- | vendor/gitlab-ci-yml/Docker.gitlab-ci.yml | 4 | ||||
-rw-r--r-- | vendor/gitlab-ci-yml/Gradle.gitlab-ci.yml | 7 | ||||
-rw-r--r-- | vendor/gitlab-ci-yml/LICENSE | 2 | ||||
-rw-r--r-- | vendor/gitlab-ci-yml/Laravel.gitlab-ci.yml | 78 | ||||
-rw-r--r-- | vendor/gitlab-ci-yml/Maven.gitlab-ci.yml | 11 | ||||
-rw-r--r-- | vendor/gitlab-ci-yml/OpenShift.gitlab-ci.yml (renamed from vendor/gitlab-ci-yml/Openshift.gitlab-ci.yml) | 18 | ||||
-rw-r--r-- | vendor/gitlab-ci-yml/PHP.gitlab-ci.yml | 33 | ||||
-rw-r--r-- | vendor/gitlab-ci-yml/Pages/Hugo.gitlab-ci.yml | 6 | ||||
-rw-r--r-- | vendor/gitlab-ci-yml/Pages/Jekyll.gitlab-ci.yml | 14 | ||||
-rw-r--r-- | vendor/gitlab-ci-yml/autodeploy/Kubernetes.gitlab-ci.yml | 21 | ||||
-rw-r--r-- | vendor/gitlab-ci-yml/autodeploy/OpenShift.gitlab-ci.yml | 21 |
15 files changed, 293 insertions, 43 deletions
diff --git a/vendor/gitlab-ci-yml/Android.gitlab-ci.yml b/vendor/gitlab-ci-yml/Android.gitlab-ci.yml new file mode 100644 index 00000000000..5f9d54ff574 --- /dev/null +++ b/vendor/gitlab-ci-yml/Android.gitlab-ci.yml @@ -0,0 +1,51 @@ +# Read more about this script on this blog post https://about.gitlab.com/2016/11/30/setting-up-gitlab-ci-for-android-projects/, by Greyson Parrelli +image: openjdk:8-jdk + +variables: + ANDROID_COMPILE_SDK: "25" + ANDROID_BUILD_TOOLS: "24.0.0" + ANDROID_SDK_TOOLS: "24.4.1" + +before_script: + - apt-get --quiet update --yes + - apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 + - wget --quiet --output-document=android-sdk.tgz https://dl.google.com/android/android-sdk_r${ANDROID_SDK_TOOLS}-linux.tgz + - tar --extract --gzip --file=android-sdk.tgz + - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter android-${ANDROID_COMPILE_SDK} + - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter platform-tools + - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter build-tools-${ANDROID_BUILD_TOOLS} + - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-android-m2repository + - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-google-google_play_services + - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-google-m2repository + - export ANDROID_HOME=$PWD/android-sdk-linux + - export PATH=$PATH:$PWD/android-sdk-linux/platform-tools/ + - chmod +x ./gradlew + +stages: + - build + - test + +build: + stage: build + script: + - ./gradlew assembleDebug + artifacts: + paths: + - app/build/outputs/ + +unitTests: + stage: test + script: + - ./gradlew test + +functionalTests: + stage: test + script: + - wget --quiet --output-document=android-wait-for-emulator https://raw.githubusercontent.com/travis-ci/travis-cookbooks/0f497eb71291b52a703143c5cd63a217c8766dc9/community-cookbooks/android-sdk/files/default/android-wait-for-emulator + - chmod +x android-wait-for-emulator + - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter sys-img-x86-google_apis-${ANDROID_COMPILE_SDK} + - echo no | android-sdk-linux/tools/android create avd -n test -t android-${ANDROID_COMPILE_SDK} --abi google_apis/x86 + - android-sdk-linux/tools/emulator64-x86 -avd test -no-window -no-audio & + - ./android-wait-for-emulator + - adb shell input keyevent 82 + - ./gradlew cAT diff --git a/vendor/gitlab-ci-yml/Bash.gitlab-ci.yml b/vendor/gitlab-ci-yml/Bash.gitlab-ci.yml new file mode 100644 index 00000000000..27537689b80 --- /dev/null +++ b/vendor/gitlab-ci-yml/Bash.gitlab-ci.yml @@ -0,0 +1,35 @@ +# see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options + +# you can delete this line if you're not using Docker +image: busybox:latest + +before_script: + - echo "Before script section" + - echo "For example you might run an update here or install a build dependency" + - echo "Or perhaps you might print out some debugging details" + +after_script: + - echo "After script section" + - echo "For example you might do some cleanup here" + +build1: + stage: build + script: + - echo "Do your build here" + +test1: + stage: test + script: + - echo "Do a test here" + - echo "For example run a test suite" + +test2: + stage: test + script: + - echo "Do another parallel test here" + - echo "For example run a lint test" + +deploy1: + stage: deploy + script: + - echo "Do your deploy here"
\ No newline at end of file diff --git a/vendor/gitlab-ci-yml/Crystal.gitlab-ci.yml b/vendor/gitlab-ci-yml/Crystal.gitlab-ci.yml index e8da49a935e..37e44735f7c 100644 --- a/vendor/gitlab-ci-yml/Crystal.gitlab-ci.yml +++ b/vendor/gitlab-ci-yml/Crystal.gitlab-ci.yml @@ -1,4 +1,3 @@ -# This file is a template, and might need editing before it works on your project. # Official language image. Look for the different tagged releases at: # https://hub.docker.com/r/crystallang/crystal/ image: "crystallang/crystal:latest" diff --git a/vendor/gitlab-ci-yml/Django.gitlab-ci.yml b/vendor/gitlab-ci-yml/Django.gitlab-ci.yml new file mode 100644 index 00000000000..b3106863cca --- /dev/null +++ b/vendor/gitlab-ci-yml/Django.gitlab-ci.yml @@ -0,0 +1,34 @@ +# Official framework image. Look for the different tagged releases at: +# https://hub.docker.com/r/library/python +image: python: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 + - postgres:latest + +variables: + POSTGRES_DB: database_name + +# This folder is cached between builds +# http://docs.gitlab.com/ce/ci/yaml/README.html#cache +cache: + paths: + - ~/.cache/pip/ + +# This is a basic example for a gem or script which doesn't use +# services such as redis or postgres +before_script: + - python -V # Print out python version for debugging + # Uncomment next line if your Django app needs a JS runtime: + # - apt-get update -q && apt-get install nodejs -yqq + - pip install -r requirements.txt + +test: + variables: + DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB" + script: + - python manage.py migrate + - python manage.py test diff --git a/vendor/gitlab-ci-yml/Docker.gitlab-ci.yml b/vendor/gitlab-ci-yml/Docker.gitlab-ci.yml index 8c590579934..40648bcd3de 100644 --- a/vendor/gitlab-ci-yml/Docker.gitlab-ci.yml +++ b/vendor/gitlab-ci-yml/Docker.gitlab-ci.yml @@ -7,7 +7,7 @@ services: build: stage: build script: - - export IMAGE_TAG=$(echo -en $CI_BUILD_REF_NAME | tr -c '[:alnum:]_.-' '-') - - docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" $CI_REGISTRY + - export IMAGE_TAG=$(echo -en $CI_COMMIT_REF_NAME | tr -c '[:alnum:]_.-' '-') + - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY - docker build --pull -t "$CI_REGISTRY_IMAGE:$IMAGE_TAG" . - docker push "$CI_REGISTRY_IMAGE:$IMAGE_TAG" diff --git a/vendor/gitlab-ci-yml/Gradle.gitlab-ci.yml b/vendor/gitlab-ci-yml/Gradle.gitlab-ci.yml index 98d3039ad06..a65e48a3389 100644 --- a/vendor/gitlab-ci-yml/Gradle.gitlab-ci.yml +++ b/vendor/gitlab-ci-yml/Gradle.gitlab-ci.yml @@ -6,6 +6,13 @@ # https://github.com/gradle/gradle image: java:8 +# Disable the Gradle daemon for Continuous Integration servers as correctness +# is usually a priority over speed in CI environments. Using a fresh +# runtime for each build is more reliable since the runtime is completely +# isolated from any previous builds. +variables: + GRADLE_OPTS: "-Dorg.gradle.daemon=false" + # Make the gradle wrapper executable. This essentially downloads a copy of # Gradle to build the project with. # https://docs.gradle.org/current/userguide/gradle_wrapper.html diff --git a/vendor/gitlab-ci-yml/LICENSE b/vendor/gitlab-ci-yml/LICENSE index 80f7b87b6c0..d6c93c6fcf7 100644 --- a/vendor/gitlab-ci-yml/LICENSE +++ b/vendor/gitlab-ci-yml/LICENSE @@ -1,6 +1,6 @@ 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 diff --git a/vendor/gitlab-ci-yml/Laravel.gitlab-ci.yml b/vendor/gitlab-ci-yml/Laravel.gitlab-ci.yml new file mode 100644 index 00000000000..0d6a6eddc97 --- /dev/null +++ b/vendor/gitlab-ci-yml/Laravel.gitlab-ci.yml @@ -0,0 +1,78 @@ +# 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 diff --git a/vendor/gitlab-ci-yml/Maven.gitlab-ci.yml b/vendor/gitlab-ci-yml/Maven.gitlab-ci.yml index 1678a47f9ac..91b096654d1 100644 --- a/vendor/gitlab-ci-yml/Maven.gitlab-ci.yml +++ b/vendor/gitlab-ci-yml/Maven.gitlab-ci.yml @@ -3,9 +3,9 @@ # For docker image tags see https://hub.docker.com/_/maven/ # # For general lifecycle information see https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html -# +# # This template will build and test your projects as well as create the documentation. -# +# # * Caches downloaded dependencies and plugins between invocation. # * Does only verify merge requests but deploy built artifacts of the # master branch. @@ -17,18 +17,19 @@ 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_JOB_REF_NAME"' cache: paths: - - /root/.m2/repository/ + - .m2/repository -# This will only validate and compile stuff and run e.g. maven-enforcer-plugin. +# 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 # we use `test-compile` here instead of `validate`, so the correct classpath is picked up. .validate: &validate diff --git a/vendor/gitlab-ci-yml/Openshift.gitlab-ci.yml b/vendor/gitlab-ci-yml/OpenShift.gitlab-ci.yml index 2ba5cad9682..d3bb388a1e7 100644 --- a/vendor/gitlab-ci-yml/Openshift.gitlab-ci.yml +++ b/vendor/gitlab-ci-yml/OpenShift.gitlab-ci.yml @@ -1,4 +1,3 @@ -# This file is a template, and might need editing before it works on your project. image: ayufan/openshift-cli stages: @@ -6,6 +5,7 @@ stages: - review - staging - production + - cleanup variables: OPENSHIFT_SERVER: openshift.default.svc.cluster.local @@ -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" @@ -38,11 +38,11 @@ review: <<: *deploy stage: review variables: - APP: $CI_BUILD_REF_NAME - APP_HOST: $CI_PROJECT_NAME-$CI_BUILD_REF_NAME.$OPENSHIFT_DOMAIN + APP: $CI_COMMIT_REF_NAME + APP_HOST: $CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$OPENSHIFT_DOMAIN environment: - name: review/$CI_BUILD_REF_NAME - url: http://$CI_PROJECT_NAME-$CI_BUILD_REF_NAME.$OPENSHIFT_DOMAIN + name: review/$CI_COMMIT_REF_SLUG + url: http://$CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$OPENSHIFT_DOMAIN on_stop: stop-review only: - branches @@ -51,15 +51,15 @@ review: stop-review: <<: *deploy - stage: review + stage: cleanup script: - oc delete all -l "app=$APP" when: manual variables: - APP: $CI_BUILD_REF_NAME + APP: $CI_COMMIT_REF_NAME GIT_STRATEGY: none environment: - name: review/$CI_BUILD_REF_NAME + name: review/$CI_COMMIT_REF_SLUG action: stop only: - branches diff --git a/vendor/gitlab-ci-yml/PHP.gitlab-ci.yml b/vendor/gitlab-ci-yml/PHP.gitlab-ci.yml new file mode 100644 index 00000000000..bb8caa49d6b --- /dev/null +++ b/vendor/gitlab-ci-yml/PHP.gitlab-ci.yml @@ -0,0 +1,33 @@ +# 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 diff --git a/vendor/gitlab-ci-yml/Pages/Hugo.gitlab-ci.yml b/vendor/gitlab-ci-yml/Pages/Hugo.gitlab-ci.yml index 45df6975259..a72b8281401 100644 --- a/vendor/gitlab-ci-yml/Pages/Hugo.gitlab-ci.yml +++ b/vendor/gitlab-ci-yml/Pages/Hugo.gitlab-ci.yml @@ -9,3 +9,9 @@ pages: - public only: - master + +test: + script: + - hugo + except: + - master diff --git a/vendor/gitlab-ci-yml/Pages/Jekyll.gitlab-ci.yml b/vendor/gitlab-ci-yml/Pages/Jekyll.gitlab-ci.yml index 36918fc005a..d98cf94d635 100644 --- a/vendor/gitlab-ci-yml/Pages/Jekyll.gitlab-ci.yml +++ b/vendor/gitlab-ci-yml/Pages/Jekyll.gitlab-ci.yml @@ -1,11 +1,15 @@ -# 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 @@ -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 diff --git a/vendor/gitlab-ci-yml/autodeploy/Kubernetes.gitlab-ci.yml b/vendor/gitlab-ci-yml/autodeploy/Kubernetes.gitlab-ci.yml index 36dfc539b3b..c644560647f 100644 --- a/vendor/gitlab-ci-yml/autodeploy/Kubernetes.gitlab-ci.yml +++ b/vendor/gitlab-ci-yml/autodeploy/Kubernetes.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Explaination on the scripts: +# Explanation on the scripts: # https://gitlab.com/gitlab-examples/kubernetes-deploy/blob/master/README.md image: registry.gitlab.com/gitlab-examples/kubernetes-deploy @@ -12,6 +12,7 @@ stages: - review - staging - production + - cleanup build: stage: build @@ -23,12 +24,12 @@ build: production: stage: production variables: - CI_ENVIRONMENT_URL: http://production.$KUBE_DOMAIN + CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME.$KUBE_DOMAIN script: - command deploy environment: name: production - url: http://production.$KUBE_DOMAIN + url: http://$CI_PROJECT_NAME.$KUBE_DOMAIN when: manual only: - master @@ -36,24 +37,24 @@ production: staging: stage: staging variables: - CI_ENVIRONMENT_URL: http://staging.$KUBE_DOMAIN + CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME-staging.$KUBE_DOMAIN script: - command deploy environment: name: staging - url: http://staging.$KUBE_DOMAIN + url: http://$CI_PROJECT_NAME-staging.$KUBE_DOMAIN only: - master review: stage: review variables: - CI_ENVIRONMENT_URL: http://$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN + CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN script: - command deploy environment: - name: review/$CI_BUILD_REF_NAME - url: http://$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN + name: review/$CI_COMMIT_REF_NAME + url: http://$CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN on_stop: stop_review only: - branches @@ -61,13 +62,13 @@ review: - master stop_review: - stage: review + stage: cleanup variables: GIT_STRATEGY: none script: - command destroy environment: - name: review/$CI_BUILD_REF_NAME + name: review/$CI_COMMIT_REF_NAME action: stop when: manual only: diff --git a/vendor/gitlab-ci-yml/autodeploy/OpenShift.gitlab-ci.yml b/vendor/gitlab-ci-yml/autodeploy/OpenShift.gitlab-ci.yml index 249adbc9f4a..27c9107e0d7 100644 --- a/vendor/gitlab-ci-yml/autodeploy/OpenShift.gitlab-ci.yml +++ b/vendor/gitlab-ci-yml/autodeploy/OpenShift.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Explaination on the scripts: +# Explanation on the scripts: # https://gitlab.com/gitlab-examples/openshift-deploy/blob/master/README.md image: registry.gitlab.com/gitlab-examples/openshift-deploy @@ -12,6 +12,7 @@ stages: - review - staging - production + - cleanup build: stage: build @@ -23,12 +24,12 @@ build: production: stage: production variables: - CI_ENVIRONMENT_URL: http://production.$KUBE_DOMAIN + CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME.$KUBE_DOMAIN script: - command deploy environment: name: production - url: http://production.$KUBE_DOMAIN + url: http://$CI_PROJECT_NAME.$KUBE_DOMAIN when: manual only: - master @@ -36,24 +37,24 @@ production: staging: stage: staging variables: - CI_ENVIRONMENT_URL: http://staging.$KUBE_DOMAIN + CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME-staging.$KUBE_DOMAIN script: - command deploy environment: name: staging - url: http://staging.$KUBE_DOMAIN + url: http://$CI_PROJECT_NAME-staging.$KUBE_DOMAIN only: - master review: stage: review variables: - CI_ENVIRONMENT_URL: http://$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN + CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN script: - command deploy environment: - name: review/$CI_BUILD_REF_NAME - url: http://$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN + name: review/$CI_COMMIT_REF_NAME + url: http://$CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN on_stop: stop_review only: - branches @@ -61,13 +62,13 @@ review: - master stop_review: - stage: review + stage: cleanup variables: GIT_STRATEGY: none script: - command destroy environment: - name: review/$CI_BUILD_REF_NAME + name: review/$CI_COMMIT_REF_NAME action: stop when: manual only: |