.gitlab-ci.yml 2.58 KB
Newer Older
1 2 3 4 5
image: docker

stages:
  - build

Vicente Mataix Ferrándiz's avatar
Update  
Vicente Mataix Ferrándiz committed
6
build_docker:
7 8
    stage: build
    retry: 2
9
    only:
10
        - web
11
    script:
Vicente Mataix Ferrándiz's avatar
Revert  
Vicente Mataix Ferrándiz committed
12
        - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
13 14
        # Latest is always generated but not pushed if ${UPDATE_LATEST_TAG} is not "True"
        - docker build -f docker/Dockerfile -t $CI_REGISTRY/$CI_PROJECT_PATH/xeus-cling:${TAG} -t $CI_REGISTRY/$CI_PROJECT_PATH/xeus-cling:latest .
Vicente Mataix Ferrándiz's avatar
Revert  
Vicente Mataix Ferrándiz committed
15
        - docker container prune
16
        - docker push $CI_REGISTRY/$CI_PROJECT_PATH/xeus-cling:${TAG}
17
        - if [ "${UPDATE_LATEST_TAG}" == "True" ]; then docker push $CI_REGISTRY/$CI_PROJECT_PATH/xeus-cling:latest; fi
Vicente Mataix Ferrándiz's avatar
Vicente Mataix Ferrándiz committed
18 19 20 21

build_docker_full:
    stage: build
    retry: 2
22
    only:
23
        - web
Vicente Mataix Ferrándiz's avatar
Vicente Mataix Ferrándiz committed
24 25
    script:
        - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
26 27
        # Latest is always generated but not pushed if ${UPDATE_LATEST_TAG} is not "True"
        - docker build -f docker/Dockerfile_full -t $CI_REGISTRY/$CI_PROJECT_PATH/xeus-cling-and-compilers:${TAG} -t $CI_REGISTRY/$CI_PROJECT_PATH/xeus-cling-and-compilers:latest .
Vicente Mataix Ferrándiz's avatar
Vicente Mataix Ferrándiz committed
28
        - docker container prune
29
        - docker push $CI_REGISTRY/$CI_PROJECT_PATH/xeus-cling-and-compilers:${TAG}
30 31 32 33 34 35 36 37 38 39 40
        - if [ "${UPDATE_LATEST_TAG}" == "True" ]; then docker push $CI_REGISTRY/$CI_PROJECT_PATH/xeus-cling-and-compilers:latest; fi


build_fedora:
    stage: build
    retry: 2
    only:
        - web
    script:
        - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
        # Latest is always generated but not pushed if ${UPDATE_LATEST_TAG} is not "True"
41
        - docker build -f docker/Dockerfile.fedora -t $CI_REGISTRY/$CI_PROJECT_PATH/fedora_for_tp:${TAG} -t $CI_REGISTRY/$CI_PROJECT_PATH/fedora_for_tp:latest .
42 43
        - docker container prune
        - docker push $CI_REGISTRY/$CI_PROJECT_PATH/fedora_for_tp:${TAG}
44 45 46 47 48 49 50 51 52 53
        - if [ "${UPDATE_LATEST_TAG}" == "True" ]; then docker push $CI_REGISTRY/$CI_PROJECT_PATH/fedora_for_tp:latest; fi        

build_boost:
    stage: build
    retry: 2
    only:
        - web
    script:
        - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
        # Latest is always generated but not pushed if ${UPDATE_LATEST_TAG} is not "True"
54
        - docker build -f docker/Dockerfile.boost -t $CI_REGISTRY/$CI_PROJECT_PATH/with_boost:${TAG} -t $CI_REGISTRY/$CI_PROJECT_PATH/with_boost:latest .
55 56 57
        - docker container prune
        - docker push $CI_REGISTRY/$CI_PROJECT_PATH/with_boost:${TAG}
        - if [ "${UPDATE_LATEST_TAG}" == "True" ]; then docker push $CI_REGISTRY/$CI_PROJECT_PATH/with_boost:latest; fi