Commit bfdeb03b authored by Nane Kratzke's avatar Nane Kratzke
Browse files

Merge branch 'tester' into 'master'

Merge Tester into Master

See merge request cloud-native/lab-gitlab!4
parents d86f3b23 9561461b
variables:
GREET: "Mundo"
stages: stages:
- generate - build
- consume - test
job1: compile:
stage: generate stage: build
image: openjdk:14.0
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
artifacts:
paths:
- build/
only:
- master
job2: java:
stage: generate stage: test
image: openjdk:14.0
script: script:
- mkdir build - javac src/*.java
- echo "Hello I am job 2 executed on the $CI_COMMIT_REF_NAME branch only" > build/job2-result.txt - java -cp src/ Hello $GREET > result.txt
artifacts: - cat result.txt
paths: - cat result.txt | grep "Hello $GREET"
- build/
only:
variables:
- $CI_COMMIT_REF_NAME == "release"
job3: python:
stage: generate stage: test
script: image: python:3-slim
- 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
script: script:
- cat build/*-result.txt - python src/hello.py $GREET > result.txt
- cat result.txt
- cat result.txt | grep "Hello $GREET"
public class German {
public static void main(String[] args) {
System.out.println("Hallo Welt");
}
}
public class English { public class Hello {
public static void main(String[] args) { public static void main(String[] args) {
System.out.println("Hello world"); System.out.println("Hello " + args[0]);
} }
} }
public class Spanish {
public static void main(String[] args) {
System.out.println("Ola mundo");
}
}
\ No newline at end of file
import sys
print(f"Hello {sys.argv[1]}")
Supports Markdown
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