.gitlab-ci.yml 643 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
services:
    - docker:dind

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

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

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