2022-07-09 15:23:22 +00:00
|
|
|
---
|
|
|
|
# You can override the included template(s) by including variable overrides
|
|
|
|
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
|
|
|
|
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
|
|
|
|
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
|
|
|
|
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
|
|
|
|
# Note that environment variables can be set in several places
|
|
|
|
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
|
|
|
|
stages:
|
2022-07-09 15:29:18 +00:00
|
|
|
- build
|
2022-07-09 15:23:22 +00:00
|
|
|
- test
|
2022-07-09 15:29:18 +00:00
|
|
|
- publish
|
|
|
|
|
2022-07-09 17:33:29 +00:00
|
|
|
build:executable:
|
2022-07-09 15:29:18 +00:00
|
|
|
stage: build
|
2022-07-09 17:51:37 +00:00
|
|
|
image: crystallang/crystal:1.5.0
|
2022-07-09 15:29:18 +00:00
|
|
|
script:
|
2022-07-09 17:39:39 +00:00
|
|
|
# Debug
|
|
|
|
- crystal version
|
|
|
|
- shards version
|
|
|
|
# Build
|
2022-07-09 15:30:25 +00:00
|
|
|
- make build
|
2022-07-09 15:29:18 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- bin
|
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- lib
|
2022-07-09 15:23:22 +00:00
|
|
|
|
2022-07-09 17:37:28 +00:00
|
|
|
build:docker-image:
|
2022-07-09 17:33:29 +00:00
|
|
|
stage: build
|
|
|
|
image: docker:20.10.16
|
|
|
|
services:
|
|
|
|
- docker:20.10.16-dind
|
2022-07-09 17:35:58 +00:00
|
|
|
needs:
|
2022-07-09 17:33:29 +00:00
|
|
|
- build:executable
|
|
|
|
script:
|
2022-07-09 18:20:48 +00:00
|
|
|
- apk install make
|
2022-07-09 17:37:28 +00:00
|
|
|
- make docker-build
|
2022-07-09 18:15:04 +00:00
|
|
|
- make docker-save > _artifacts/docker-image.tar
|
2022-07-09 17:33:29 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2022-07-09 18:15:04 +00:00
|
|
|
- _artifacts
|
2022-07-09 17:33:29 +00:00
|
|
|
|
2022-07-09 15:23:22 +00:00
|
|
|
sast:
|
|
|
|
stage: test
|
|
|
|
|
2022-07-09 17:37:28 +00:00
|
|
|
publish:docker-image:
|
2022-07-09 15:29:18 +00:00
|
|
|
stage: publish
|
2022-07-09 17:37:28 +00:00
|
|
|
needs:
|
|
|
|
- build:docker-image
|
2022-07-09 18:10:38 +00:00
|
|
|
image: docker:20.10.16
|
|
|
|
services:
|
|
|
|
- docker:20.10.16-dind
|
2022-07-09 15:29:18 +00:00
|
|
|
script:
|
2022-07-09 18:10:38 +00:00
|
|
|
- apk install make
|
2022-07-09 18:15:04 +00:00
|
|
|
- make docker-load < _artifacts/docker-image.tar
|
2022-07-09 17:37:28 +00:00
|
|
|
- make docker-push
|
2022-07-09 15:29:18 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- bin
|
|
|
|
|
2022-07-09 15:23:22 +00:00
|
|
|
include:
|
|
|
|
- template: Security/SAST.gitlab-ci.yml
|
|
|
|
|