Skip to content

Commit d5dc8f1

Browse files
committed
glci 0.7.0 (new formula)
GitLab Local CI: run GitLab CI/CD pipelines locally using Docker or Podman. Parses .gitlab-ci.yml offline to lint, list jobs and render pipeline graphs, and executes jobs in containers without pushing.
1 parent d27cec5 commit d5dc8f1

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Formula/g/glci.rb

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
class Glci < Formula
2+
desc "Run GitLab CI/CD pipelines locally"
3+
homepage "https://gitlab.com/gitlab-org/ci-cd/runner-tools/glci"
4+
url "https://gitlab.com/gitlab-org/ci-cd/runner-tools/glci/-/archive/v0.7.0/glci-v0.7.0.tar.gz"
5+
sha256 "350367daf09af8da22b0d4376222bc004c43b372151d6206b3ce717857c15d62"
6+
license "MIT"
7+
head "https://gitlab.com/gitlab-org/ci-cd/runner-tools/glci.git", branch: "main"
8+
9+
depends_on "go" => :build
10+
11+
deny_network_access! [:postinstall, :test]
12+
13+
def install
14+
system "go", "build", *std_go_args, "./cmd/glci"
15+
generate_completions_from_executable(bin/"glci", "completion")
16+
end
17+
18+
def caveats
19+
<<~EOS
20+
glci requires a running container engine (Docker or Podman) to execute jobs.
21+
EOS
22+
end
23+
24+
test do
25+
(testpath/".gitlab-ci.yml").write <<~YAML
26+
test-job:
27+
stage: test
28+
script:
29+
- echo hello
30+
YAML
31+
assert_match "test-job", shell_output("#{bin}/glci jobs")
32+
assert_match "test-job", shell_output("#{bin}/glci show --plain")
33+
end
34+
end

0 commit comments

Comments
 (0)