Commit 97ab5234 authored by Pump, Cedric's avatar Pump, Cedric
Browse files

Merge branch 'Praktikumsaufgaben' into 'master'

Praktikumsaufgaben

See merge request !2
parents 41d3466a b0808259
Pipeline #21379 passed with stage
in 8 seconds
variables:
GREET: "Mundo"
stages: stages:
- generate - test
- consume
job1: java:
stage: generate stage: test
image: "openjdk:14"
script: script:
- mkdir build - javac src/*.java
- echo "Hello I am job 1 executed on the $CI_COMMIT_REF_NAME branch only" > build/job1-result.txt - java -cp src/ Hello $GREET > result.txt
- cat result.txt
- cat result.txt | grep "Hello $GREET"
artifacts: artifacts:
paths: paths:
- build/ - ./result.txt
only:
- master
job2:
stage: generate
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: python:
stage: generate stage: test
image: "python:3-slim"
script: script:
- mkdir build - python src/hello.py $GREET > result.txt
- echo "Hello I am job3 and always executed except for the master or release branch" > build/job3-result.txt - cat result.txt
- cat result.txt | grep "Hello $GREET"
artifacts: artifacts:
paths: paths:
- build/ - ./result.txt
except: \ No newline at end of file
- master
- release
job4:
stage: consume
script:
- cat build/*-result.txt
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