ci-includes-yml/templates/build-container.tpl.yml

62 lines
1.4 KiB
YAML
Raw Normal View History

2023-04-09 16:16:30 +00:00
stages:
2023-04-09 16:52:50 +00:00
- build
2023-04-09 19:39:37 +00:00
version:
image: gittools/gitversion:5.12.0
2023-05-20 11:45:05 +00:00
stage: .pre
2023-05-16 00:13:54 +00:00
variables:
GIT_DEPTH: "0"
script:
- ./scripts/version-number.sh
artifacts:
reports:
dotenv: version.env
2023-05-21 08:11:04 -05:00
sonarcloud-check:
stage: .pre
variables:
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
script:
- sonar-scanner
rules:
- if: $CI_COMMIT_REF_NAME == 'main' || $CI_PIPELINE_SOURCE == 'merge_request_event'
2023-04-09 11:05:20 -05:00
build-container:
2023-05-20 12:03:39 +00:00
image: registry.durp.info/docker:20.10.17
2023-04-09 11:05:20 -05:00
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
2023-05-20 12:19:20 +00:00
DOCKER_HOST: tcp://127.0.0.1:2375/
2023-04-09 11:05:20 -05:00
services:
2023-05-20 12:22:04 +00:00
- name: docker:dind
entrypoint: ["dockerd-entrypoint.sh", "--tls=false"]
2023-04-09 16:16:30 +00:00
stage: build
2023-04-09 11:05:20 -05:00
script:
- ./scripts/docker-login.sh
- ./scripts/docker-build.sh
needs:
- job: version
artifacts: true
2023-04-09 11:05:20 -05:00
only:
2023-04-09 19:39:37 +00:00
- main
2023-04-09 19:39:37 +00:00
HelmChart:
2023-05-10 12:05:58 +00:00
image: registry.durp.info/dtzar/helm-kubectl
2023-04-09 19:39:37 +00:00
stage: build
script:
- ./scripts/helm-addrepo.sh
- ./scripts/helm-package.sh
- ./scripts/helm-push.sh
needs:
- job: version
artifacts: true
2023-04-09 19:39:37 +00:00
only:
- main