Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lohse, Felix
lab-gitlab
Commits
fdea3b10
Commit
fdea3b10
authored
Nov 09, 2020
by
Lohse, Felix
Browse files
4
parent
d047c884
Pipeline
#21334
passed with stage
in 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
fdea3b10
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
:
stage
:
test
image
:
"
openjdk:14"
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
:
stage
:
test
image
:
"
python:3-slim"
script
:
-
cat build/*-result.txt
-
python src/hello.py $GREET > result.txt
-
cat result.txt
-
cat result.txt | grep "Hello $GREET"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment