Sha256: 46ebc7ad5faf887d507dfc6cdd8ee92bf5acfb390eaf1cec4495d99dd5089cd9

Contents?: true

Size: 1.69 KB

Versions: 1

Compression:

Stored size: 1.69 KB

Contents

image: ruby:3.3

include:
  - template: Code-Quality.gitlab-ci.yml

docker_build:
  variables:
    # Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
    DOCKER_HOST: tcp://docker:2376
    DOCKER_TLS_CERTDIR: "/certs"
  stage: deploy # Part of a later stage
  services:
    - docker:20.10.11-dind
  image: docker:20.10.11
  script:
    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
    - docker pull --quiet $CI_REGISTRY_IMAGE:latest || true
    - docker build -t $CI_REGISTRY_IMAGE:latest .
    - docker run -t $CI_REGISTRY_IMAGE:latest generic_test page samuel-garratt.gitlab.io/generic_test/about.html
    - docker push $CI_REGISTRY_IMAGE:latest
  only:
    - master
  needs: ["test"]
  except:
    changes:
      - "*.md"

test:
  image: registry.gitlab.com/samuel-garratt/generic_test
  stage: test
  script:
    - gem install bundler
    - bundle install
    - bundle exec rake
  artifacts:
    paths:
      - logs/*.xml
    reports:
      junit: logs/*.xml
    expire_in: 1 week
    when: always

# Example of using generic test
example_test:
  stage: test
  image: registry.gitlab.com/samuel-garratt/generic_test
  script:
    - generic_test page samuel-garratt.gitlab.io/generic_test/about.html
  variables:
    GIT_STRATEGY: none
  artifacts:
    paths:
      - logs/*.xml
      - logs/*.html
    reports:
      junit: logs/*.xml
    expire_in: 1 week
    when: always

pages:
  stage: deploy
  script:
    - mv test_site/ public/
  artifacts:
    paths:
      - public
    expire_in: 30 days
  only:
    - master

.docker_test:
  services:
    - docker:19.03.5-dind
  image: docker:19.03.5
  stage: test
  script:
    - docker run myrepo/generic_test BASE_URL

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
generic_test-0.3.0 .gitlab-ci.yml