gitlab-ci-lint 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dockerignore +12 -0
- data/.gitignore +215 -60
- data/.gitlab-ci.yml +72 -0
- data/CHANGELOG.md +16 -0
- data/Dockerfile +35 -0
- data/Gemfile +15 -15
- data/Makefile +50 -0
- data/README.md +49 -1
- data/bin/gitlab_ci_lint +16 -11
- data/docker-compose.yml +45 -0
- data/docs/annotations/replace.md +128 -0
- data/gitlab.gemspec +0 -3
- data/lib/gitlab/ci/lint.rb +50 -50
- data/lib/gitlab/ci/lint/actions.rb +11 -0
- data/lib/gitlab/ci/lint/arguments.rb +69 -0
- data/lib/gitlab/ci/lint/client.rb +33 -0
- data/lib/gitlab/ci/lint/colors.rb +25 -0
- data/lib/gitlab/ci/lint/configuration.rb +27 -0
- data/lib/gitlab/ci/lint/log.rb +53 -0
- data/lib/gitlab/ci/lint/multio.rb +19 -0
- data/lib/gitlab/ci/lint/system.rb +21 -0
- data/lib/gitlab/ci/lint/version.rb +7 -7
- data/lib/gitlab/ci/lint/yml.rb +40 -0
- data/spec/gitlab/ci/lint/spec.rb +5 -5
- data/values.yml +11 -8
- metadata +14 -52
- data/.rspec +0 -3
- data/.rspec_status +0 -0
- data/file.log +0 -2
- data/lib/gitlab/ci/lint/reader/yml.rb +0 -19
- data/lib/gitlab/ci/lint/settings/arguments.rb +0 -27
- data/lib/gitlab/ci/lint/settings/colors.rb +0 -17
- data/lib/gitlab/ci/lint/settings/configuration.rb +0 -24
- data/lib/gitlab/ci/lint/settings/log.rb +0 -52
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 801f9398596102e9cda05d2610654fe293a27bbf9a4befa6d7797e16c13514af
|
4
|
+
data.tar.gz: 7e0950e63f65162ec3c5075b306c626d701a9478069778688a1d2c7fcb3f02d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cb1b77b14b8f640fe781971e10b2774fa2c55ccea07e2b05b1796c8ff117fea07982a916cf2aceab74942a4ec6164eb59356b8d7f075cfe7ddb9f2d4990dc89
|
7
|
+
data.tar.gz: 0323f576a3eda307e30445dd5781fcca8c814d7e1113700236d330e495dda37540853bd2581c0312d023367e96c6818fb69726721b07b4b4f29659e67d089303
|
data/.dockerignore
ADDED
data/.gitignore
CHANGED
@@ -1,60 +1,215 @@
|
|
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
|
-
#
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
1
|
+
|
2
|
+
# Created by https://www.gitignore.io/api/ruby,rails,rubymine
|
3
|
+
# Edit at https://www.gitignore.io/?templates=ruby,rails,rubymine
|
4
|
+
|
5
|
+
### Rails ###
|
6
|
+
*.rbc
|
7
|
+
capybara-*.html
|
8
|
+
.rspec
|
9
|
+
/db/*.sqlite3
|
10
|
+
/db/*.sqlite3-journal
|
11
|
+
/public/system
|
12
|
+
/coverage/
|
13
|
+
/spec/tmp
|
14
|
+
*.orig
|
15
|
+
rerun.txt
|
16
|
+
pickle-email-*.html
|
17
|
+
|
18
|
+
# Ignore all logfiles and tempfiles.
|
19
|
+
/log/*
|
20
|
+
/tmp/*
|
21
|
+
!/log/.keep
|
22
|
+
!/tmp/.keep
|
23
|
+
|
24
|
+
# TODO Comment out this rule if you are OK with secrets being uploaded to the repo
|
25
|
+
config/initializers/secret_token.rb
|
26
|
+
config/master.key
|
27
|
+
|
28
|
+
# Only include if you have production secrets in this file, which is no longer a Rails default
|
29
|
+
# config/secrets.yml
|
30
|
+
|
31
|
+
file.log
|
32
|
+
|
33
|
+
# dotenv
|
34
|
+
# TODO Comment out this rule if environment variables can be committed
|
35
|
+
.env
|
36
|
+
|
37
|
+
## Environment normalization:
|
38
|
+
/.bundle
|
39
|
+
/vendor/bundle
|
40
|
+
|
41
|
+
# these should all be checked in to normalize the environment:
|
42
|
+
# Gemfile.lock, .ruby-version, .ruby-gemset
|
43
|
+
|
44
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
45
|
+
.rvmrc
|
46
|
+
|
47
|
+
# if using bower-rails ignore default bower_components path bower.json files
|
48
|
+
/vendor/assets/bower_components
|
49
|
+
*.bowerrc
|
50
|
+
bower.json
|
51
|
+
|
52
|
+
# Ignore pow environment settings
|
53
|
+
.powenv
|
54
|
+
|
55
|
+
# Ignore Byebug command history file.
|
56
|
+
.byebug_history
|
57
|
+
|
58
|
+
# Ignore node_modules
|
59
|
+
node_modules/
|
60
|
+
|
61
|
+
# Ignore precompiled javascript packs
|
62
|
+
/public/packs
|
63
|
+
/public/packs-test
|
64
|
+
/public/assets
|
65
|
+
|
66
|
+
# Ignore yarn files
|
67
|
+
/yarn-error.log
|
68
|
+
yarn-debug.log*
|
69
|
+
.yarn-integrity
|
70
|
+
|
71
|
+
# Ignore uploaded files in development
|
72
|
+
/storage/*
|
73
|
+
!/storage/.keep
|
74
|
+
|
75
|
+
### Ruby ###
|
76
|
+
*.gem
|
77
|
+
/.config
|
78
|
+
/InstalledFiles
|
79
|
+
/pkg/
|
80
|
+
/spec/reports/
|
81
|
+
/spec/examples.txt
|
82
|
+
/test/tmp/
|
83
|
+
/test/version_tmp/
|
84
|
+
/tmp/
|
85
|
+
|
86
|
+
# Used by dotenv library to load environment variables.
|
87
|
+
# .env
|
88
|
+
|
89
|
+
# Ignore Byebug command history file.
|
90
|
+
|
91
|
+
## Specific to RubyMotion:
|
92
|
+
.dat*
|
93
|
+
.repl_history
|
94
|
+
build/
|
95
|
+
*.bridgesupport
|
96
|
+
build-iPhoneOS/
|
97
|
+
build-iPhoneSimulator/
|
98
|
+
|
99
|
+
## Specific to RubyMotion (use of CocoaPods):
|
100
|
+
#
|
101
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
102
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
103
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
104
|
+
# vendor/Pods/
|
105
|
+
|
106
|
+
## Documentation cache and generated files:
|
107
|
+
/.yardoc/
|
108
|
+
/_yardoc/
|
109
|
+
/doc/
|
110
|
+
/rdoc/
|
111
|
+
|
112
|
+
/.bundle/
|
113
|
+
/lib/bundler/man/
|
114
|
+
|
115
|
+
# for a library or gem, you might want to ignore these files since the code is
|
116
|
+
# intended to run in multiple environments; otherwise, check them in:
|
117
|
+
Gemfile.lock
|
118
|
+
.ruby-version
|
119
|
+
.ruby-gemset
|
120
|
+
|
121
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
122
|
+
|
123
|
+
### Ruby Patch ###
|
124
|
+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
125
|
+
.rubocop-https?--*
|
126
|
+
|
127
|
+
### RubyMine ###
|
128
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
129
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
130
|
+
|
131
|
+
# User-specific stuff
|
132
|
+
.idea/**/workspace.xml
|
133
|
+
.idea/**/tasks.xml
|
134
|
+
.idea/**/usage.statistics.xml
|
135
|
+
.idea/**/dictionaries
|
136
|
+
.idea/**/shelf
|
137
|
+
|
138
|
+
# Generated files
|
139
|
+
.idea/**/contentModel.xml
|
140
|
+
|
141
|
+
# Sensitive or high-churn files
|
142
|
+
.idea/**/dataSources/
|
143
|
+
.idea/**/dataSources.ids
|
144
|
+
.idea/**/dataSources.local.xml
|
145
|
+
.idea/**/sqlDataSources.xml
|
146
|
+
.idea/**/dynamic.xml
|
147
|
+
.idea/**/uiDesigner.xml
|
148
|
+
.idea/**/dbnavigator.xml
|
149
|
+
|
150
|
+
# Gradle
|
151
|
+
.idea/**/gradle.xml
|
152
|
+
.idea/**/libraries
|
153
|
+
|
154
|
+
# Gradle and Maven with auto-import
|
155
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
156
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
157
|
+
# auto-import.
|
158
|
+
# .idea/modules.xml
|
159
|
+
# .idea/*.iml
|
160
|
+
# .idea/modules
|
161
|
+
# *.iml
|
162
|
+
# *.ipr
|
163
|
+
|
164
|
+
# CMake
|
165
|
+
cmake-build-*/
|
166
|
+
|
167
|
+
# Mongo Explorer plugin
|
168
|
+
.idea/**/mongoSettings.xml
|
169
|
+
|
170
|
+
# File-based project format
|
171
|
+
*.iws
|
172
|
+
|
173
|
+
# IntelliJ
|
174
|
+
out/
|
175
|
+
|
176
|
+
# mpeltonen/sbt-idea plugin
|
177
|
+
.idea_modules/
|
178
|
+
|
179
|
+
# JIRA plugin
|
180
|
+
atlassian-ide-plugin.xml
|
181
|
+
|
182
|
+
# Cursive Clojure plugin
|
183
|
+
.idea/replstate.xml
|
184
|
+
|
185
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
186
|
+
com_crashlytics_export_strings.xml
|
187
|
+
crashlytics.properties
|
188
|
+
crashlytics-build.properties
|
189
|
+
fabric.properties
|
190
|
+
|
191
|
+
# Editor-based Rest Client
|
192
|
+
.idea/httpRequests
|
193
|
+
|
194
|
+
# Android studio 3.1+ serialized cache file
|
195
|
+
.idea/caches/build_file_checksums.ser
|
196
|
+
|
197
|
+
### RubyMine Patch ###
|
198
|
+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
199
|
+
|
200
|
+
# *.iml
|
201
|
+
# modules.xml
|
202
|
+
# .idea/misc.xml
|
203
|
+
# *.ipr
|
204
|
+
|
205
|
+
# Sonarlint plugin
|
206
|
+
.idea/**/sonarlint/
|
207
|
+
|
208
|
+
# SonarQube Plugin
|
209
|
+
.idea/**/sonarIssues.xml
|
210
|
+
|
211
|
+
# Markdown Navigator plugin
|
212
|
+
.idea/**/markdown-navigator.xml
|
213
|
+
.idea/**/markdown-navigator/
|
214
|
+
|
215
|
+
# End of https://www.gitignore.io/api/ruby,rails,rubymine
|
data/.gitlab-ci.yml
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
# ==============================================================================
|
2
|
+
# STAGES
|
3
|
+
# ==============================================================================
|
4
|
+
|
5
|
+
stages: [ .pre, build, merge, chatops ]
|
6
|
+
|
7
|
+
# ==============================================================================
|
8
|
+
# DEFAULT IMAGE AND SERVICES
|
9
|
+
# ==============================================================================
|
10
|
+
|
11
|
+
default:
|
12
|
+
image: docker:19.03.0
|
13
|
+
services:
|
14
|
+
- docker:19.03.0-dind
|
15
|
+
timeout: 1h 30m
|
16
|
+
|
17
|
+
# ==============================================================================
|
18
|
+
# WORKFLOW RULES
|
19
|
+
# ==============================================================================
|
20
|
+
|
21
|
+
workflow:
|
22
|
+
rules:
|
23
|
+
- if: $PIPELINE_DISABLE == "true"
|
24
|
+
when: never
|
25
|
+
- if: '$CI_PIPELINE_SOURCE =~ /^(trigger|merge_request_event)$/'
|
26
|
+
when: never
|
27
|
+
- when: always
|
28
|
+
|
29
|
+
# ==============================================================================
|
30
|
+
# GLOBAL VARIABLES
|
31
|
+
# ==============================================================================
|
32
|
+
|
33
|
+
variables:
|
34
|
+
GIT_DEPTH: "20"
|
35
|
+
GIT_SUBMODULE_STRATEGY: "none"
|
36
|
+
DOCKER_HOST: tcp://localhost:2375
|
37
|
+
DOCKER_TLS_CERTDIR: ""
|
38
|
+
DOCKER_DRIVER: overlay2
|
39
|
+
DOCKER_BUILDKIT: 1
|
40
|
+
|
41
|
+
# =============================================================================
|
42
|
+
# JOB MERGE REQUEST
|
43
|
+
# =============================================================================
|
44
|
+
|
45
|
+
job:merge:
|
46
|
+
stage: merge
|
47
|
+
script:
|
48
|
+
- echo "Check Project Structure."
|
49
|
+
only:
|
50
|
+
refs:
|
51
|
+
- merge_requests
|
52
|
+
|
53
|
+
# =============================================================================
|
54
|
+
# JOB CHATOPS
|
55
|
+
# =============================================================================
|
56
|
+
|
57
|
+
echo:
|
58
|
+
image: registry.stefanini.io/shared/devops/deploy/k8s:latest
|
59
|
+
stage: chatops
|
60
|
+
only: [chat]
|
61
|
+
before_script:
|
62
|
+
- echo "Configure Kubeconfig"
|
63
|
+
- echo ${KUBECONFIG_CLUSTER_PROD} | base64 -d > ${HOME}/.kube/config
|
64
|
+
script:
|
65
|
+
- echo "Your input was - ${CHAT_INPUT}. This command will not be shown."
|
66
|
+
- |
|
67
|
+
if [ -z "${CHAT_INPUT}" ]
|
68
|
+
then
|
69
|
+
echo -e "section_start:$( date +%s ):chat_reply\r\033[0K\nNothing to Do...\nsection_end:$( date +%s ):chat_reply\r\033[0K"
|
70
|
+
else
|
71
|
+
echo -e "section_start:$( date +%s ):chat_reply\r\033[0K\n$( ${CHAT_INPUT} )\nsection_end:$( date +%s ):chat_reply\r\033[0K"
|
72
|
+
fi
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
# CHANGELOG
|
2
|
+
|
3
|
+
All important changes to this project will be added to this file! This changelog will be based on [Keep a change log](http://keepachangelog.com/)
|
4
|
+
|
5
|
+
## 1.0.1 - Rakefile - [28-04-2020]
|
6
|
+
|
7
|
+
### Added
|
8
|
+
|
9
|
+
* Rake file modules.
|
10
|
+
* Taks in Rakefile.
|
11
|
+
|
12
|
+
## 1.0.0 - Just Initial Adding Files - [27-04-2020]
|
13
|
+
|
14
|
+
### Added
|
15
|
+
|
16
|
+
* Project structure.
|
data/Dockerfile
CHANGED
@@ -0,0 +1,35 @@
|
|
1
|
+
ARG RUBY_VERSION=2.6.5-alpine3.10
|
2
|
+
|
3
|
+
FROM ruby:${RUBY_VERSION}
|
4
|
+
|
5
|
+
LABEL maintainer="Lucca Pessoa da Silva Matos - luccapsm@gmail.com" \
|
6
|
+
org.label-schema.version="1.0.0" \
|
7
|
+
org.label-schema.release-data="29-04-2020" \
|
8
|
+
org.label-schema.url="https://github.com/lpmatos/gitlab-ci-lint" \
|
9
|
+
org.label-schema.ruby="https://www.ruby-lang.org/pt/" \
|
10
|
+
org.label-schema.gitlab="https://docs.gitlab.com/" \
|
11
|
+
org.label-schema.name="GitLab CI Lint"
|
12
|
+
|
13
|
+
ENV HOME=/usr/src/code
|
14
|
+
|
15
|
+
RUN set -ex && apk update
|
16
|
+
|
17
|
+
RUN apk add --no-cache --update \
|
18
|
+
build-base \
|
19
|
+
make \
|
20
|
+
gcc \
|
21
|
+
git \
|
22
|
+
bash
|
23
|
+
|
24
|
+
RUN mkdir -p /var/log && touch /var/log/file.log
|
25
|
+
|
26
|
+
WORKDIR ${HOME}
|
27
|
+
|
28
|
+
RUN gem install bundle
|
29
|
+
|
30
|
+
COPY [ ".", "." ]
|
31
|
+
|
32
|
+
RUN bundle install && bundle exec rake && \
|
33
|
+
chmod +x ./bin/gitlab_ci_lint
|
34
|
+
|
35
|
+
CMD [ "ruby", "/bin/gitlab_ci_lint", "-h" ]
|
data/Gemfile
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
4
|
-
|
5
|
-
gemspec
|
6
|
-
|
7
|
-
group :development do
|
8
|
-
gem "bundler"
|
9
|
-
gem "rake"
|
10
|
-
gem "rspec"
|
11
|
-
gem "httparty"
|
12
|
-
gem "OptionParser"
|
13
|
-
gem "yaml"
|
14
|
-
gem "colorize"
|
15
|
-
end
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
4
|
+
|
5
|
+
gemspec
|
6
|
+
|
7
|
+
group :development do
|
8
|
+
gem "bundler"
|
9
|
+
gem "rake"
|
10
|
+
gem "rspec"
|
11
|
+
gem "httparty"
|
12
|
+
gem "OptionParser"
|
13
|
+
gem "yaml"
|
14
|
+
gem "colorize"
|
15
|
+
end
|