Commit fdea3b10 authored by Lohse, Felix's avatar Lohse, Felix
Browse files

4

parent d047c884
Pipeline #21334 passed with stage
in 15 seconds
stages: variables:
- generate GREET: "Mundo"
- consume
job1:
stage: generate
script:
- mkdir build
- echo "Hello I am job 1 executed on the $CI_COMMIT_REF_NAME branch only" > build/job1-result.txt
artifacts:
paths:
- build/
only:
- master
job2: stages:
stage: generate - test
script:
- mkdir build
- echo "Hello I am job 2 executed on the $CI_COMMIT_REF_NAME branch only" > build/job2-result.txt
artifacts:
paths:
- build/
only:
variables:
- $CI_COMMIT_REF_NAME == "release"
job3: java:
stage: generate stage: test
image: "openjdk:14"
script: script:
- mkdir build - javac src/*.java
- echo "Hello I am job3 and always executed except for the master or release branch" > build/job3-result.txt - java -cp src/ Hello $GREET > result.txt
artifacts: - cat result.txt
paths: - cat result.txt | grep "Hello $GREET"
- build/
except:
- master
- release
job4: python:
stage: consume stage: test
image: "python:3-slim"
script: script:
- cat build/*-result.txt - python src/hello.py $GREET > result.txt
- cat result.txt
- cat result.txt | grep "Hello $GREET"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment