gitlab-ci-lint 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.dockerignore +12 -12
- data/.editorconfig +17 -17
- data/.gitignore +215 -215
- data/.gitlab-ci.yml +72 -72
- data/CHANGELOG.md +39 -39
- data/Dockerfile +35 -35
- data/Gemfile +16 -16
- data/Makefile +50 -50
- data/README.md +213 -213
- data/bin/console +6 -6
- data/bin/setup +5 -5
- data/docker-compose.yml +45 -45
- data/docs/annotations/replace.md +128 -128
- data/exemple/lint.rb +14 -14
- data/gitlab.gemspec +34 -34
- data/lib/gitlab/ci/lint.rb +43 -43
- data/lib/gitlab/ci/lint/actions.rb +20 -20
- data/lib/gitlab/ci/lint/arguments.rb +10 -6
- data/lib/gitlab/ci/lint/client.rb +1 -1
- data/lib/gitlab/ci/lint/colors.rb +26 -26
- data/lib/gitlab/ci/lint/configuration.rb +28 -28
- data/lib/gitlab/ci/lint/log.rb +54 -54
- data/lib/gitlab/ci/lint/multio.rb +20 -20
- data/lib/gitlab/ci/lint/serializer.rb +55 -55
- data/lib/gitlab/ci/lint/system.rb +22 -22
- data/lib/gitlab/ci/lint/version.rb +1 -1
- data/lib/gitlab/ci/lint/yml.rb +47 -47
- data/spec/gitlab/ci/lint/spec.rb +5 -5
- data/values.yml +10 -10
- metadata +1 -1
data/.gitlab-ci.yml
CHANGED
@@ -1,72 +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
|
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
@@ -1,39 +1,39 @@
|
|
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
|
-
## 0.1.2 - Core Project - [29-04-2020]
|
6
|
-
|
7
|
-
### Added
|
8
|
-
|
9
|
-
* Many, many features have been added.
|
10
|
-
* Dockerfile and Docker Compose support.
|
11
|
-
* Class:
|
12
|
-
* GitLab::CI::Lint::Actions.
|
13
|
-
* GitLab::CI::Lint::Arguments.
|
14
|
-
* GitLab::CI::Lint::Client.
|
15
|
-
* GitLab::CI::Lint::Configuration.
|
16
|
-
* GitLab::CI::Lint::Log.
|
17
|
-
* GitLab::CI::Lint::MultIO.
|
18
|
-
* GitLab::CI::Lint::Serializer.
|
19
|
-
* GitLab::CI::Lint::System.
|
20
|
-
* GitLab::CI::Lint::YMLReader.
|
21
|
-
* Create a CLI to get values from bash.
|
22
|
-
* Create a YMLReader to get values from yml files.
|
23
|
-
* Create Client Request GitLab CI to post the content of .gitlab to the API.
|
24
|
-
* Actions to evaluate the result.
|
25
|
-
* Request validations.
|
26
|
-
* YAML validations
|
27
|
-
|
28
|
-
## 0.1.1 - Rakefile - [28-04-2020]
|
29
|
-
|
30
|
-
### Added
|
31
|
-
|
32
|
-
* Rake file modules.
|
33
|
-
* Taks in Rakefile.
|
34
|
-
|
35
|
-
## 0.1.0 - Just Initial Adding Files - [27-04-2020]
|
36
|
-
|
37
|
-
### Added
|
38
|
-
|
39
|
-
* Project structure.
|
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
|
+
## 0.1.2 - Core Project - [29-04-2020]
|
6
|
+
|
7
|
+
### Added
|
8
|
+
|
9
|
+
* Many, many features have been added.
|
10
|
+
* Dockerfile and Docker Compose support.
|
11
|
+
* Class:
|
12
|
+
* GitLab::CI::Lint::Actions.
|
13
|
+
* GitLab::CI::Lint::Arguments.
|
14
|
+
* GitLab::CI::Lint::Client.
|
15
|
+
* GitLab::CI::Lint::Configuration.
|
16
|
+
* GitLab::CI::Lint::Log.
|
17
|
+
* GitLab::CI::Lint::MultIO.
|
18
|
+
* GitLab::CI::Lint::Serializer.
|
19
|
+
* GitLab::CI::Lint::System.
|
20
|
+
* GitLab::CI::Lint::YMLReader.
|
21
|
+
* Create a CLI to get values from bash.
|
22
|
+
* Create a YMLReader to get values from yml files.
|
23
|
+
* Create Client Request GitLab CI to post the content of .gitlab to the API.
|
24
|
+
* Actions to evaluate the result.
|
25
|
+
* Request validations.
|
26
|
+
* YAML validations
|
27
|
+
|
28
|
+
## 0.1.1 - Rakefile - [28-04-2020]
|
29
|
+
|
30
|
+
### Added
|
31
|
+
|
32
|
+
* Rake file modules.
|
33
|
+
* Taks in Rakefile.
|
34
|
+
|
35
|
+
## 0.1.0 - Just Initial Adding Files - [27-04-2020]
|
36
|
+
|
37
|
+
### Added
|
38
|
+
|
39
|
+
* Project structure.
|
data/Dockerfile
CHANGED
@@ -1,35 +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" ]
|
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,16 +1,16 @@
|
|
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
|
-
gem "pry"
|
16
|
-
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
|
+
gem "pry"
|
16
|
+
end
|
data/Makefile
CHANGED
@@ -1,50 +1,50 @@
|
|
1
|
-
# =============================================================================
|
2
|
-
# DECLARING VARIABLES
|
3
|
-
# =============================================================================
|
4
|
-
|
5
|
-
# DOCKERFILE PATH
|
6
|
-
PATH_DOCKERFILE=./Dockerfile
|
7
|
-
|
8
|
-
# DOCKERFILE CONTENTX
|
9
|
-
CONTEXT_DOCKERFILE=./
|
10
|
-
|
11
|
-
# CONTAINERS
|
12
|
-
DOCKER_CONTAINER_LIST:=$(shell docker ps -aq)
|
13
|
-
|
14
|
-
# =============================================================================
|
15
|
-
# DOCKER BUILD
|
16
|
-
# =============================================================================
|
17
|
-
|
18
|
-
build:
|
19
|
-
docker image build --no-cache -t gitlab-ci-lint -f ${PATH_DOCKERFILE} ${CONTEXT_DOCKERFILE}
|
20
|
-
|
21
|
-
system:
|
22
|
-
docker system prune -af
|
23
|
-
|
24
|
-
volume:
|
25
|
-
docker volume prune -f
|
26
|
-
|
27
|
-
network:
|
28
|
-
docker network prune -f
|
29
|
-
|
30
|
-
stop:
|
31
|
-
docker stop ${DOCKER_CONTAINER_LIST}
|
32
|
-
|
33
|
-
remove:
|
34
|
-
docker rm ${DOCKER_CONTAINER_LIST}
|
35
|
-
|
36
|
-
# =============================================================================
|
37
|
-
# DOCKER-COMPOSE
|
38
|
-
# =============================================================================
|
39
|
-
|
40
|
-
compose:
|
41
|
-
docker-compose up --build
|
42
|
-
|
43
|
-
back:
|
44
|
-
docker-compose up --build -d
|
45
|
-
|
46
|
-
down:
|
47
|
-
docker-compose down
|
48
|
-
|
49
|
-
delete:
|
50
|
-
docker-compose down --rmi all
|
1
|
+
# =============================================================================
|
2
|
+
# DECLARING VARIABLES
|
3
|
+
# =============================================================================
|
4
|
+
|
5
|
+
# DOCKERFILE PATH
|
6
|
+
PATH_DOCKERFILE=./Dockerfile
|
7
|
+
|
8
|
+
# DOCKERFILE CONTENTX
|
9
|
+
CONTEXT_DOCKERFILE=./
|
10
|
+
|
11
|
+
# CONTAINERS
|
12
|
+
DOCKER_CONTAINER_LIST:=$(shell docker ps -aq)
|
13
|
+
|
14
|
+
# =============================================================================
|
15
|
+
# DOCKER BUILD
|
16
|
+
# =============================================================================
|
17
|
+
|
18
|
+
build:
|
19
|
+
docker image build --no-cache -t gitlab-ci-lint -f ${PATH_DOCKERFILE} ${CONTEXT_DOCKERFILE}
|
20
|
+
|
21
|
+
system:
|
22
|
+
docker system prune -af
|
23
|
+
|
24
|
+
volume:
|
25
|
+
docker volume prune -f
|
26
|
+
|
27
|
+
network:
|
28
|
+
docker network prune -f
|
29
|
+
|
30
|
+
stop:
|
31
|
+
docker stop ${DOCKER_CONTAINER_LIST}
|
32
|
+
|
33
|
+
remove:
|
34
|
+
docker rm ${DOCKER_CONTAINER_LIST}
|
35
|
+
|
36
|
+
# =============================================================================
|
37
|
+
# DOCKER-COMPOSE
|
38
|
+
# =============================================================================
|
39
|
+
|
40
|
+
compose:
|
41
|
+
docker-compose up --build
|
42
|
+
|
43
|
+
back:
|
44
|
+
docker-compose up --build -d
|
45
|
+
|
46
|
+
down:
|
47
|
+
docker-compose down
|
48
|
+
|
49
|
+
delete:
|
50
|
+
docker-compose down --rmi all
|
data/README.md
CHANGED
@@ -1,213 +1,213 @@
|
|
1
|
-
<p align="center">
|
2
|
-
<img alt="gitlab" src="https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcQYfhC8pImPXqjjQkZfOH2bAMltzPE5w9QMQJd8dUVqGCICbpF1&usqp=CAU" width="250px" float="center"/>
|
3
|
-
</p>
|
4
|
-
|
5
|
-
<h1 align="center">GitLab CI Lint your CI/CD File</h1>
|
6
|
-
|
7
|
-
<p align="center">
|
8
|
-
<strong>This is a simple project that help when you want check your GitLab CI File</strong>
|
9
|
-
</p>
|
10
|
-
|
11
|
-
<p align="center">
|
12
|
-
<a href="https://github.com/lpmatos/gitlab-ci-lint">
|
13
|
-
<img alt="Open Source" src="https://badges.frapsoft.com/os/v1/open-source.svg?v=102">
|
14
|
-
</a>
|
15
|
-
|
16
|
-
<a href="https://github.com/lpmatos/gitlab-ci-lint/graphs/contributors">
|
17
|
-
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/lpmatos/gitlab-ci-lint">
|
18
|
-
</a>
|
19
|
-
|
20
|
-
<a href="https://github.com/lpmatos/gitlab-ci-lint">
|
21
|
-
<img alt="GitHub Language Count" src="https://img.shields.io/github/languages/count/lpmatos/gitlab-ci-lint">
|
22
|
-
</a>
|
23
|
-
|
24
|
-
<a href="https://github.com/lpmatos/gitlab-ci-lint">
|
25
|
-
<img alt="GitHub Top Language" src="https://img.shields.io/github/languages/top/lpmatos/gitlab-ci-lint">
|
26
|
-
</a>
|
27
|
-
|
28
|
-
<a href="https://github.com/lpmatos/gitlab-ci-lint/stargazers">
|
29
|
-
<img alt="GitHub Stars" src="https://img.shields.io/github/stars/lpmatos/gitlab-ci-lint?style=social">
|
30
|
-
</a>
|
31
|
-
|
32
|
-
<a href="https://github.com/lpmatos/gitlab-ci-lint/commits/master">
|
33
|
-
<img alt="GitHub Last Commit" src="https://img.shields.io/github/last-commit/lpmatos/gitlab-ci-lint">
|
34
|
-
</a>
|
35
|
-
|
36
|
-
<a href="https://github.com/lpmatos/gitlab-ci-lint">
|
37
|
-
<img alt="Repository Size" src="https://img.shields.io/github/repo-size/lpmatos/gitlab-ci-lint">
|
38
|
-
</a>
|
39
|
-
|
40
|
-
<a href="https://github.com/lpmatos/gitlab-ci-lint/issues">
|
41
|
-
<img alt="Repository Issues" src="https://img.shields.io/github/issues/lpmatos/gitlab-ci-lint">
|
42
|
-
</a>
|
43
|
-
|
44
|
-
<a href="https://github.com/lpmatos/gitlab-ci-lint/blob/master/LICENSE">
|
45
|
-
<img alt="MIT License" src="https://img.shields.io/github/license/lpmatos/gitlab-ci-lint">
|
46
|
-
</a>
|
47
|
-
</p>
|
48
|
-
|
49
|
-
<p align="center">
|
50
|
-
<a href="#pre-requisites">Pre-Requisites</a> |
|
51
|
-
<a href="#description">Description</a> |
|
52
|
-
<a href="#environment-variables">Environment Variables</a> |
|
53
|
-
<a href="#how-to-contribute">How to contribute</a>
|
54
|
-
</p>
|
55
|
-
|
56
|
-
## ▶️ Getting Started
|
57
|
-
|
58
|
-
Starting with **git clone**:
|
59
|
-
|
60
|
-
```bash
|
61
|
-
git clone --depth 1 https://github.com/lpmatos/gitlab-ci-lint.git -b master
|
62
|
-
```
|
63
|
-
|
64
|
-
This will give access on your local machine to this project.
|
65
|
-
|
66
|
-
## ☕ Buy me a coffee
|
67
|
-
|
68
|
-
Pull requests are welcome. If you'd like to support the work and buy me a ☕, I greatly appreciate it!
|
69
|
-
|
70
|
-
<a href="https://www.buymeacoffee.com/EatdMck" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 100px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
|
71
|
-
|
72
|
-
## 🚏 Pre-requisites
|
73
|
-
|
74
|
-
To this project you yeed:
|
75
|
-
|
76
|
-
- Ruby.
|
77
|
-
- Docker.
|
78
|
-
- Docker Compose.
|
79
|
-
- Install all Dependencies.
|
80
|
-
|
81
|
-
## Gem Steps
|
82
|
-
|
83
|
-
```bash
|
84
|
-
gem build .\gitlab.gemspec
|
85
|
-
gem install .\gitlab-ci-lint-0.1.2.gem
|
86
|
-
gem push .\gitlab-ci-lint-0.1.2.gem
|
87
|
-
```
|
88
|
-
|
89
|
-
## Environment variables
|
90
|
-
|
91
|
-
**Name** | **Description**
|
92
|
-
:---: | :---:
|
93
|
-
**GITLAB_ENDPOINT** | GitLab API Lint Endpoint
|
94
|
-
**GITLAB_CI_FILE** | GitLab CI File
|
95
|
-
**VALUES** | Values File
|
96
|
-
**LOG_FILE** | Log File
|
97
|
-
|
98
|
-
## 🐋 Development with Docker
|
99
|
-
|
100
|
-
Steps to build the Docker Image.
|
101
|
-
|
102
|
-
### Build
|
103
|
-
|
104
|
-
```bash
|
105
|
-
docker image build -t <IMAGE_NAME> -f <PATH_DOCKERFILE> <PATH_CONTEXT_DOCKERFILE>
|
106
|
-
docker image build -t <IMAGE_NAME> . (This context)
|
107
|
-
```
|
108
|
-
|
109
|
-
### Run
|
110
|
-
|
111
|
-
Steps to run the Docker Container.
|
112
|
-
|
113
|
-
* **Linux** running:
|
114
|
-
|
115
|
-
```bash
|
116
|
-
docker container run -d -p <LOCAL_PORT:CONTAINER_PORT> <IMAGE_NAME> <COMMAND>
|
117
|
-
docker container run -it --rm --name <CONTAINER_NAME> -p <LOCAL_PORT:CONTAINER_PORT> <IMAGE_NAME> <COMMAND>
|
118
|
-
```
|
119
|
-
|
120
|
-
* **Windows** running:
|
121
|
-
|
122
|
-
```
|
123
|
-
winpty docker.exe container run -it --rm <IMAGE_NAME> <COMMAND>
|
124
|
-
```
|
125
|
-
|
126
|
-
For more information, access the [Docker](https://docs.docker.com/) documentation or [this](docs/annotations/docker.md).
|
127
|
-
|
128
|
-
## 🐋 Development with Docker Compose
|
129
|
-
|
130
|
-
Build and run a docker-compose.
|
131
|
-
|
132
|
-
```bash
|
133
|
-
docker-compose up --build
|
134
|
-
```
|
135
|
-
|
136
|
-
Down all services deployed by docker-compose.
|
137
|
-
|
138
|
-
```bash
|
139
|
-
docker-compose down
|
140
|
-
```
|
141
|
-
|
142
|
-
Down all services and delete all images.
|
143
|
-
|
144
|
-
```bash
|
145
|
-
docker-compose down --rmi all
|
146
|
-
```
|
147
|
-
|
148
|
-
## 📣 Usage
|
149
|
-
|
150
|
-
<kbd>gitlab_ci_lint --help</kbd> - Helper
|
151
|
-
|
152
|
-
## 🎒 How to contribute
|
153
|
-
|
154
|
-
1. Make a **Fork**.
|
155
|
-
2. Follow the project organization.
|
156
|
-
3. Add the file to the appropriate level folder - If the folder does not exist, create according to the standard.
|
157
|
-
4. Make the **Commit**.
|
158
|
-
5. Open a **Pull Request**.
|
159
|
-
6. Wait for your pull request to be accepted.. 🚀
|
160
|
-
|
161
|
-
Remember: There is no bad code, there are different views/versions of solving the same problem. 😊
|
162
|
-
|
163
|
-
## 🔔 Add to git and push
|
164
|
-
|
165
|
-
You must send the project to your GitHub after the modifications
|
166
|
-
|
167
|
-
```bash
|
168
|
-
git add -f .
|
169
|
-
git commit -m "Added - Fixing somethings"
|
170
|
-
git push origin master
|
171
|
-
```
|
172
|
-
|
173
|
-
## 📋 Versioning
|
174
|
-
|
175
|
-
- [CHANGELOG](CHANGELOG.md)
|
176
|
-
|
177
|
-
## 📜 License
|
178
|
-
|
179
|
-
Distributed under the MIT License. See [LICENSE](LICENSE) for more information.
|
180
|
-
|
181
|
-
## ☎️ Contacts
|
182
|
-
|
183
|
-
Hey!! If you like this project or if you find some bugs feel free to contact me in my channels:
|
184
|
-
|
185
|
-
* **Email**: luccapsm@gmail.com
|
186
|
-
* **Linkedin**: www.linkedin.com/in/lucca-pessoa-4abb71138/
|
187
|
-
|
188
|
-
[](https://www.facebook.com/lucca.pessoa.9)
|
189
|
-
[](https://github.com/lpmatos)
|
190
|
-
|
191
|
-
## ✨ Contributors
|
192
|
-
|
193
|
-
<table>
|
194
|
-
<tr>
|
195
|
-
<td align="center"><a href="https://github.com/lpmatos"><img src="https://avatars2.githubusercontent.com/u/58797390?s=400&v=4" width="100px;" alt=""/><br /><sub><b>Lucca Pessoa</b></sub></a><br /><a href="https://github.com/lpmatos/gitlab-ci-lint/commits?author=lpmatos" title="Code">💻</a></a></td>
|
196
|
-
<tr>
|
197
|
-
</table>
|
198
|
-
|
199
|
-
## 🐯 Autor
|
200
|
-
|
201
|
-
<table>
|
202
|
-
<tr>
|
203
|
-
<td align="center"><a href="https://github.com/lpmatos"><img src="https://avatars2.githubusercontent.com/u/58797390?s=400&v=4" width="100px;" alt=""/><br /><sub><b>Lucca Pessoa</b></sub></a><br /><a href="https://github.com/lpmatos/gitlab-ci-lint/commits?author=lpmatos" title="Code">💻</a> <a href="https://github.com/lpmatos/gitlab-ci-lint/commits?author=lpmatos" title="Design">🎨</a></td>
|
204
|
-
<tr>
|
205
|
-
</table>
|
206
|
-
|
207
|
-
## Project Status
|
208
|
-
|
209
|
-
* 🔛 In production
|
210
|
-
|
211
|
-
---
|
212
|
-
|
213
|
-
<p align="center">Feito com ❤️ by <strong>Lucca Pessoa :wave:</p>
|
1
|
+
<p align="center">
|
2
|
+
<img alt="gitlab" src="https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcQYfhC8pImPXqjjQkZfOH2bAMltzPE5w9QMQJd8dUVqGCICbpF1&usqp=CAU" width="250px" float="center"/>
|
3
|
+
</p>
|
4
|
+
|
5
|
+
<h1 align="center">GitLab CI Lint your CI/CD File</h1>
|
6
|
+
|
7
|
+
<p align="center">
|
8
|
+
<strong>This is a simple project that help when you want check your GitLab CI File</strong>
|
9
|
+
</p>
|
10
|
+
|
11
|
+
<p align="center">
|
12
|
+
<a href="https://github.com/lpmatos/gitlab-ci-lint">
|
13
|
+
<img alt="Open Source" src="https://badges.frapsoft.com/os/v1/open-source.svg?v=102">
|
14
|
+
</a>
|
15
|
+
|
16
|
+
<a href="https://github.com/lpmatos/gitlab-ci-lint/graphs/contributors">
|
17
|
+
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/lpmatos/gitlab-ci-lint">
|
18
|
+
</a>
|
19
|
+
|
20
|
+
<a href="https://github.com/lpmatos/gitlab-ci-lint">
|
21
|
+
<img alt="GitHub Language Count" src="https://img.shields.io/github/languages/count/lpmatos/gitlab-ci-lint">
|
22
|
+
</a>
|
23
|
+
|
24
|
+
<a href="https://github.com/lpmatos/gitlab-ci-lint">
|
25
|
+
<img alt="GitHub Top Language" src="https://img.shields.io/github/languages/top/lpmatos/gitlab-ci-lint">
|
26
|
+
</a>
|
27
|
+
|
28
|
+
<a href="https://github.com/lpmatos/gitlab-ci-lint/stargazers">
|
29
|
+
<img alt="GitHub Stars" src="https://img.shields.io/github/stars/lpmatos/gitlab-ci-lint?style=social">
|
30
|
+
</a>
|
31
|
+
|
32
|
+
<a href="https://github.com/lpmatos/gitlab-ci-lint/commits/master">
|
33
|
+
<img alt="GitHub Last Commit" src="https://img.shields.io/github/last-commit/lpmatos/gitlab-ci-lint">
|
34
|
+
</a>
|
35
|
+
|
36
|
+
<a href="https://github.com/lpmatos/gitlab-ci-lint">
|
37
|
+
<img alt="Repository Size" src="https://img.shields.io/github/repo-size/lpmatos/gitlab-ci-lint">
|
38
|
+
</a>
|
39
|
+
|
40
|
+
<a href="https://github.com/lpmatos/gitlab-ci-lint/issues">
|
41
|
+
<img alt="Repository Issues" src="https://img.shields.io/github/issues/lpmatos/gitlab-ci-lint">
|
42
|
+
</a>
|
43
|
+
|
44
|
+
<a href="https://github.com/lpmatos/gitlab-ci-lint/blob/master/LICENSE">
|
45
|
+
<img alt="MIT License" src="https://img.shields.io/github/license/lpmatos/gitlab-ci-lint">
|
46
|
+
</a>
|
47
|
+
</p>
|
48
|
+
|
49
|
+
<p align="center">
|
50
|
+
<a href="#pre-requisites">Pre-Requisites</a> |
|
51
|
+
<a href="#description">Description</a> |
|
52
|
+
<a href="#environment-variables">Environment Variables</a> |
|
53
|
+
<a href="#how-to-contribute">How to contribute</a>
|
54
|
+
</p>
|
55
|
+
|
56
|
+
## ▶️ Getting Started
|
57
|
+
|
58
|
+
Starting with **git clone**:
|
59
|
+
|
60
|
+
```bash
|
61
|
+
git clone --depth 1 https://github.com/lpmatos/gitlab-ci-lint.git -b master
|
62
|
+
```
|
63
|
+
|
64
|
+
This will give access on your local machine to this project.
|
65
|
+
|
66
|
+
## ☕ Buy me a coffee
|
67
|
+
|
68
|
+
Pull requests are welcome. If you'd like to support the work and buy me a ☕, I greatly appreciate it!
|
69
|
+
|
70
|
+
<a href="https://www.buymeacoffee.com/EatdMck" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 100px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
|
71
|
+
|
72
|
+
## 🚏 Pre-requisites
|
73
|
+
|
74
|
+
To this project you yeed:
|
75
|
+
|
76
|
+
- Ruby.
|
77
|
+
- Docker.
|
78
|
+
- Docker Compose.
|
79
|
+
- Install all Dependencies.
|
80
|
+
|
81
|
+
## Gem Steps
|
82
|
+
|
83
|
+
```bash
|
84
|
+
gem build .\gitlab.gemspec
|
85
|
+
gem install .\gitlab-ci-lint-0.1.2.gem
|
86
|
+
gem push .\gitlab-ci-lint-0.1.2.gem
|
87
|
+
```
|
88
|
+
|
89
|
+
## Environment variables
|
90
|
+
|
91
|
+
**Name** | **Description**
|
92
|
+
:---: | :---:
|
93
|
+
**GITLAB_ENDPOINT** | GitLab API Lint Endpoint
|
94
|
+
**GITLAB_CI_FILE** | GitLab CI File
|
95
|
+
**VALUES** | Values File
|
96
|
+
**LOG_FILE** | Log File
|
97
|
+
|
98
|
+
## 🐋 Development with Docker
|
99
|
+
|
100
|
+
Steps to build the Docker Image.
|
101
|
+
|
102
|
+
### Build
|
103
|
+
|
104
|
+
```bash
|
105
|
+
docker image build -t <IMAGE_NAME> -f <PATH_DOCKERFILE> <PATH_CONTEXT_DOCKERFILE>
|
106
|
+
docker image build -t <IMAGE_NAME> . (This context)
|
107
|
+
```
|
108
|
+
|
109
|
+
### Run
|
110
|
+
|
111
|
+
Steps to run the Docker Container.
|
112
|
+
|
113
|
+
* **Linux** running:
|
114
|
+
|
115
|
+
```bash
|
116
|
+
docker container run -d -p <LOCAL_PORT:CONTAINER_PORT> <IMAGE_NAME> <COMMAND>
|
117
|
+
docker container run -it --rm --name <CONTAINER_NAME> -p <LOCAL_PORT:CONTAINER_PORT> <IMAGE_NAME> <COMMAND>
|
118
|
+
```
|
119
|
+
|
120
|
+
* **Windows** running:
|
121
|
+
|
122
|
+
```
|
123
|
+
winpty docker.exe container run -it --rm <IMAGE_NAME> <COMMAND>
|
124
|
+
```
|
125
|
+
|
126
|
+
For more information, access the [Docker](https://docs.docker.com/) documentation or [this](docs/annotations/docker.md).
|
127
|
+
|
128
|
+
## 🐋 Development with Docker Compose
|
129
|
+
|
130
|
+
Build and run a docker-compose.
|
131
|
+
|
132
|
+
```bash
|
133
|
+
docker-compose up --build
|
134
|
+
```
|
135
|
+
|
136
|
+
Down all services deployed by docker-compose.
|
137
|
+
|
138
|
+
```bash
|
139
|
+
docker-compose down
|
140
|
+
```
|
141
|
+
|
142
|
+
Down all services and delete all images.
|
143
|
+
|
144
|
+
```bash
|
145
|
+
docker-compose down --rmi all
|
146
|
+
```
|
147
|
+
|
148
|
+
## 📣 Usage
|
149
|
+
|
150
|
+
<kbd>gitlab_ci_lint --help</kbd> - Helper
|
151
|
+
|
152
|
+
## 🎒 How to contribute
|
153
|
+
|
154
|
+
1. Make a **Fork**.
|
155
|
+
2. Follow the project organization.
|
156
|
+
3. Add the file to the appropriate level folder - If the folder does not exist, create according to the standard.
|
157
|
+
4. Make the **Commit**.
|
158
|
+
5. Open a **Pull Request**.
|
159
|
+
6. Wait for your pull request to be accepted.. 🚀
|
160
|
+
|
161
|
+
Remember: There is no bad code, there are different views/versions of solving the same problem. 😊
|
162
|
+
|
163
|
+
## 🔔 Add to git and push
|
164
|
+
|
165
|
+
You must send the project to your GitHub after the modifications
|
166
|
+
|
167
|
+
```bash
|
168
|
+
git add -f .
|
169
|
+
git commit -m "Added - Fixing somethings"
|
170
|
+
git push origin master
|
171
|
+
```
|
172
|
+
|
173
|
+
## 📋 Versioning
|
174
|
+
|
175
|
+
- [CHANGELOG](CHANGELOG.md)
|
176
|
+
|
177
|
+
## 📜 License
|
178
|
+
|
179
|
+
Distributed under the MIT License. See [LICENSE](LICENSE) for more information.
|
180
|
+
|
181
|
+
## ☎️ Contacts
|
182
|
+
|
183
|
+
Hey!! If you like this project or if you find some bugs feel free to contact me in my channels:
|
184
|
+
|
185
|
+
* **Email**: luccapsm@gmail.com
|
186
|
+
* **Linkedin**: www.linkedin.com/in/lucca-pessoa-4abb71138/
|
187
|
+
|
188
|
+
[](https://www.facebook.com/lucca.pessoa.9)
|
189
|
+
[](https://github.com/lpmatos)
|
190
|
+
|
191
|
+
## ✨ Contributors
|
192
|
+
|
193
|
+
<table>
|
194
|
+
<tr>
|
195
|
+
<td align="center"><a href="https://github.com/lpmatos"><img src="https://avatars2.githubusercontent.com/u/58797390?s=400&v=4" width="100px;" alt=""/><br /><sub><b>Lucca Pessoa</b></sub></a><br /><a href="https://github.com/lpmatos/gitlab-ci-lint/commits?author=lpmatos" title="Code">💻</a></a></td>
|
196
|
+
<tr>
|
197
|
+
</table>
|
198
|
+
|
199
|
+
## 🐯 Autor
|
200
|
+
|
201
|
+
<table>
|
202
|
+
<tr>
|
203
|
+
<td align="center"><a href="https://github.com/lpmatos"><img src="https://avatars2.githubusercontent.com/u/58797390?s=400&v=4" width="100px;" alt=""/><br /><sub><b>Lucca Pessoa</b></sub></a><br /><a href="https://github.com/lpmatos/gitlab-ci-lint/commits?author=lpmatos" title="Code">💻</a> <a href="https://github.com/lpmatos/gitlab-ci-lint/commits?author=lpmatos" title="Design">🎨</a></td>
|
204
|
+
<tr>
|
205
|
+
</table>
|
206
|
+
|
207
|
+
## Project Status
|
208
|
+
|
209
|
+
* 🔛 In production
|
210
|
+
|
211
|
+
---
|
212
|
+
|
213
|
+
<p align="center">Feito com ❤️ by <strong>Lucca Pessoa :wave:</p>
|