Newer
Older
Sébastien DA ROCHA
committed
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
stages:
- build
- Static analysis
variables:
SONAR_PROJECTKEY: "$CI_PROJECT_NAME"
SONAR_HOST_URL: "https://sonarqube.neogeo.fr"
GIT_DEPTH: 0
build testing docker image:
stage: build
only:
- develop
tags:
- build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- export
- echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"$DOCKER_AUTH\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination neogeo/geocontrib-front:testing
- echo Image docker neogeo/geocontrib-front:testing livrée
build stable docker image:
stage: build
only:
- master
tags:
- build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"$DOCKER_AUTH\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination neogeo/geocontrib-front:latest
Sébastien DA ROCHA
committed
- echo Image docker neogeo/geocontrib:latest livrée
build tagged docker image:
stage: build
only:
- tags
when: manual
tags:
- build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
# Don't build tag id package.json as wrong version
- grep "\"version\":.\"$CI_COMMIT_TAG\"" package.json
Sébastien DA ROCHA
committed
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"$DOCKER_AUTH\"}}}" > /kaniko/.docker/config.json
Sébastien DA ROCHA
committed
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination neogeo/geocontrib-front:$CI_COMMIT_TAG
- echo Image docker neogeo/geocontrib-front:$CI_COMMIT_TAG livrée
sonarqube-check:
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
only:
- develop
stage: Static analysis
script:
- sonar-scanner -Dsonar.qualitygate.wait=true -Dsonar.projectKey=$CI_PROJECT_NAME -Dsonar.projectName=$CI_PROJECT_NAME -Dsonar.projectVersion=$CI_COMMIT_BRANCH
allow_failure: true