-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
52 lines (48 loc) · 1.09 KB
/
.gitlab-ci.yml
File metadata and controls
52 lines (48 loc) · 1.09 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
include:
- project: "kdanmobile/deployment/cluster-cicd-config"
ref: master
file: "/gitlab-ci/node-brakeman-sast-upload.yaml"
stages:
- test
- sast_upload
- lint
- rspec
- publish
rubocop:
stage: lint
image: ruby:3.4.8
tags:
- arm64
script:
- bundle install
- bundle exec rubocop
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "master"
rspec:
stage: rspec
image: ruby:3.4.8
tags:
- arm64
script:
- bundle install
- rspec spec
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "master"
to_gem:
stage: publish
image: ruby:3.4.8
tags:
- arm64
script:
- mkdir -p ~/.gem
- touch ~/.gem/credentials
- chmod 0600 ~/.gem/credentials
- 'printf -- "---\n:rubygems_api_key: $GEM_HOST_API_KEY\n" > ~/.gem/credentials'
- RELEASE_VERSION=$(cat VERSION.md)
- GEM_NAME=error_response-$RELEASE_VERSION.gem
- gem build error_response.gemspec
- gem push $GEM_NAME
rules:
- if: '$CI_COMMIT_TAG =~ /^release-\d+\.\d+\.\d+(\.\d+)?$/'