Newer
Older
Sébastien DA ROCHA
committed
stages:
- Static analysis
Sébastien DA ROCHA
committed
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
deploy testing docker image:
stage: deploy
only:
- develop
tags:
- build
image:
name: curlimages/curl
script:
- curl -X POST -F token=$TRIGGER_TOKEN -F ref=main https://git.neogeo.fr/api/v4/projects/226/trigger/pipeline
Sébastien DA ROCHA
committed
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
Sébastien DA ROCHA
committed
build tagged docker image:
stage: build
only:
- tags
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