.gitlab-ci.yml 655 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
11
12
docker:
    stage: info
    services:
        - docker:dind
    script:
Nane Kratzke's avatar
Nane Kratzke committed
13
        - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
Nane Kratzke's avatar
Nane Kratzke committed
14
        - docker info
Nane Kratzke's avatar
Nane Kratzke committed
15
        - echo $CI_REGISTRY_NAME
Nane Kratzke's avatar
Nane Kratzke committed
16

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

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