File: .gitlab-ci.yml

package info (click to toggle)
chasquid 1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,672 kB
  • sloc: sh: 1,040; python: 286; makefile: 71
file content (52 lines) | stat: -rw-r--r-- 1,459 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

stages:
  - test
  - image

# Integration test, using the module versions from the repository.
stable:
  stage: test
  image: docker:stable
  services:
    - docker:dind
  script:
    - docker info
    - docker build -t chasquid-test -f test/Dockerfile .
    - docker run chasquid-test  env
    - docker run chasquid-test  make test

# Integration test, using the latest module versions.
latest:
  stage: test
  image: docker:stable
  services:
    - docker:dind
  script:
    - docker info
    - docker build -t chasquid-test --build-arg GO_GET_ARGS="-u=patch" -f test/Dockerfile .
    - docker run chasquid-test  env
    - docker run chasquid-test  make test

# Build docker image, upload to gitlab registry.
build_gitlab:
  stage: image
  image: docker:stable
  services:
    - docker:dind
  script:
    - docker info
    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
    - docker build -t $CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME -f docker/Dockerfile .
    - docker push $CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME

# Build docker image, upload to dockerhub registry.
build_dockerhub:
  stage: image
  image: docker:stable
  services:
    - docker:dind
  script:
    - docker info
    - docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD docker.io
    - docker build -t index.docker.io/albertito/chasquid:$CI_BUILD_REF_NAME -f docker/Dockerfile .
    - docker push index.docker.io/albertito/chasquid:$CI_BUILD_REF_NAME