Skip to content
Snippets Groups Projects
.gitlab-ci.yml 745 B
Newer Older
variables:
  DOCKER_HOST: $DOCKER_HOST_BIO
  PROJECT_NAME: "frontend"
cache:
  key: $CI_COMMIT_REF_NAME
  paths:
    - build/

stages:
  - build
  - test
  - create
  - read
  tags:
    - rancher02
    - echo "Building on rancher02"
job2:
  stage: test
  tags:
    - rancher03
    - echo "Running tests on a worker runner"
create-cache:
  stage: create
  tags:
    - cache
    - mkdir -p build
    - echo "Hello World" > build/hello.txt
    - echo "Cache file created."
read-cache:
  stage: read
  tags:
    - cache
    - if [ -f build/hello.txt ]; then
        echo "Reading cached file:";
        cat build/hello.txt;
      else
        echo "Cached file not found.";
      fi