.gitlab-ci.yml 614 Bytes
Newer Older
Nane Kratzke's avatar
Nane Kratzke committed
1
2
3
variables:
    GREET: "Mundo"

Nane Kratzke's avatar
Nane Kratzke committed
4
stages:
Nane Kratzke's avatar
Nane Kratzke committed
5
    - info
Nane Kratzke's avatar
Nane Kratzke committed
6
    - test
Nane Kratzke's avatar
Nane Kratzke committed
7

Nane Kratzke's avatar
Nane Kratzke committed
8
9
10
docker:
    stage: info
    script:
Nane Kratzke's avatar
Nane Kratzke committed
11
        - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
Nane Kratzke's avatar
Nane Kratzke committed
12
        - docker info
Nane Kratzke's avatar
Nane Kratzke committed
13
        - echo $CI_REGISTRY
Nane Kratzke's avatar
Nane Kratzke committed
14

Nane Kratzke's avatar
Nane Kratzke committed
15
16
java:
    stage: test
17
    image: "openjdk:14"
Nane Kratzke's avatar
Nane Kratzke committed
18
    script:
Nane Kratzke's avatar
Nane Kratzke committed
19
20
21
22
        - javac src/*.java
        - java -cp src/ Hello $GREET > result.txt
        - cat result.txt
        - cat result.txt | grep "Hello $GREET"
23

Nane Kratzke's avatar
Nane Kratzke committed
24
25
python:
    stage: test
26
    image: "python:3-slim"
Nane Kratzke's avatar
Nane Kratzke committed
27
    script:
Nane Kratzke's avatar
Nane Kratzke committed
28
29
30
        - python src/hello.py $GREET > result.txt
        - cat result.txt
        - cat result.txt | grep "Hello $GREET"