.gitlab-ci.yml 672 Bytes
Newer Older
Ugur Cayoglu's avatar
Ugur Cayoglu committed
1
before_script:
Ugur Cayoglu's avatar
Ugur Cayoglu committed
2
3
4
  - docker info
  - docker-compose -v

Ugur Cayoglu's avatar
Ugur Cayoglu committed
5
build_job:
Ugur Cayoglu's avatar
Ugur Cayoglu committed
6
7
8
9
  stage: build
  script:
    - echo "Hello, $GITLAB_USER_LOGIN!"

Ugur Cayoglu's avatar
Ugur Cayoglu committed
10
test_job1:
Ugur Cayoglu's avatar
Ugur Cayoglu committed
11
12
13
14
  stage: test
  script:
    - echo "This job tests something"

Ugur Cayoglu's avatar
Ugur Cayoglu committed
15
test_job2:
Ugur Cayoglu's avatar
Ugur Cayoglu committed
16
17
18
19
20
  stage: test
  script:
    - echo "This job tests something, but takes more time than test-job1."
    - echo "After the echo commands complete, it runs the sleep command for 20 seconds"
    - echo "which simulates a test that runs 20 seconds longer than test-job1"
Ugur Cayoglu's avatar
Ugur Cayoglu committed
21
22
23
    - docker run --rm hello-world
    - which docker-compose
    - sleep 5
Ugur Cayoglu's avatar
Ugur Cayoglu committed
24

Ugur Cayoglu's avatar
Ugur Cayoglu committed
25
deploy_prod:
Ugur Cayoglu's avatar
Ugur Cayoglu committed
26
27
28
  stage: deploy
  script:
    - echo "This job deploys something from the $CI_COMMIT_BRANCH branch."