Commit 9ebec7ae authored by Ladwig, Désirée's avatar Ladwig, Désirée
Browse files

Update .gitlab-ci.yml

parent 0e45208e
Pipeline #21675 passed with stage
in 7 seconds
stages:
- generate
- consume
variables:
GREET: "Mundo"
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
stages:
- test
job2:
stage: generate
java:
image: "openjdk:14"
stage: 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"
- javac src/*.java
- java -cp src/ Hello $GREET > result.txt
- cat result.txt
- cat result.txt | grep "Hello $GREET"
job3:
stage: generate
script:
- mkdir build
- echo "Hello I am job3 and always executed except for the master or release branch" > build/job3-result.txt
artifacts:
paths:
- build/
except:
- master
- release
job4:
stage: consume
python:
image: "python:3-slim"
stage: test
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