...
 
Commits (2)
......@@ -20,11 +20,15 @@ before_script:
- bundle exec rake db:schema:load
- bundle exec rake db:migrate
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
stages:
- smoke-tests
- all-tests
- code-quality
- push-docker-hub
smoke:
script: bundle exec rails ci:smoke
stage: all-tests
......@@ -74,6 +78,7 @@ cucumber-1:
<<: *cache
script: SLICE=1/2 bundle exec cucumber --profile default
stage: all-tests
cucumber-2:
<<: *retriable
<<: *cache
......@@ -85,25 +90,30 @@ selenium-1:
<<: *cache
script: SLICE=1/6 bundle exec rails selenium
stage: all-tests
selenium-2:
<<: *retriable
script: SLICE=2/6 bundle exec rails selenium
stage: all-tests
selenium-3:
<<: *retriable
<<: *cache
script: SLICE=3/6 bundle exec rails selenium
stage: all-tests
selenium-4:
<<: *retriable
<<: *cache
script: SLICE=4/6 bundle exec rails selenium
stage: all-tests
selenium-5:
<<: *retriable
<<: *cache
script: SLICE=5/6 bundle exec rails selenium
stage: all-tests
selenium-6:
<<: *retriable
<<: *cache
......@@ -117,21 +127,25 @@ plugins-1:
<<: *cache
script: SLICE=1/5 bundle exec rails test:noosfero_plugins NOOSFERO_BUNDLE_OPTS=install
stage: all-tests
plugins-2:
<<: *retriable
<<: *cache
script: SLICE=2/5 bundle exec rails test:noosfero_plugins NOOSFERO_BUNDLE_OPTS=install
stage: all-tests
plugins-3:
<<: *retriable
<<: *cache
script: SLICE=3/5 bundle exec rails test:noosfero_plugins NOOSFERO_BUNDLE_OPTS=install
stage: all-tests
plugins-4:
<<: *retriable
<<: *cache
script: SLICE=4/5 bundle exec rails test:noosfero_plugins NOOSFERO_BUNDLE_OPTS=install
stage: all-tests
plugins-5:
<<: *retriable
<<: *cache
......@@ -163,10 +177,10 @@ code_quality:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
script:
- docker run
--env SOURCE_CODE="$PWD"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
--env SOURCE_CODE="$PWD"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
artifacts:
paths:
- gl-code-quality-report.json
......@@ -175,3 +189,17 @@ code_quality:
stage: code-quality
only:
- tags
docker_push:
<<: *retriable
image: docker:latest
stage: push-docker-hub
services:
- docker:dind
before_script:
- echo "${CI_REGISTRY_PASSWORD}" | docker login --username "${CI_REGISTRY_USER}" --password-stdin "${CI_REGISTRY}"
script:
- docker build -f config/docker/prod/Dockerfile -t $IMAGE_TAG .
- docker push $IMAGE_TAG
only:
- tags
\ No newline at end of file