Coder Social home page Coder Social logo

hirosassa / tfcmt-gitlab Goto Github PK

View Code? Open in Web Editor NEW
34.0 3.0 3.0 823 KB

tfcmt-gitlab is a CLI command to parse and notify Terraform execution results. This command supports GitLab as a CI and notification platform.

License: Other

Go 99.85% Makefile 0.15%
devops gitlab gitlab-ci terrform

tfcmt-gitlab's Introduction

tfcmt-gitlab

Build Status Go Report Card GitHub last commit License

Fork of suzuki-shunsuke/tfcmt, supporting GitLab (dropped GitHub support).

Document

Prerequisites

Create and store GitLab access token in project or group CI variables with key name GITLAB_TOKEN.

ref: Project access tokens | GitLab

Basic commands are as follows:

# plan
tfcmt-gitlab plan --patch -- terraform plan -no-color

# apply
tfcmt-gitlab apply -- terraform apply -auto-approve -no-color

tfcmt-gitlab runs without any configuration file. The concrete examples of configuration of tfcmt-gitlab running on GitLab CI are available in examples/getting-started.

Install

GitHub Releases

Download a prebuilt binary from GitHub Releases and install it in $PATH.

aqua

Install tfcmt-gitlab with aqua.

aqua g -i hirosassa/tfcmt-gitlab

License

License of original code

This is a fork of mercari/tfnotify and suzuki-shunsuke/tfcmt, so about the origincal license, please see https://github.com/mercari/tfnotify#license and https://github.com/suzuki-shunsuke/tfcmt#license.

Copyright 2018 Mercari, Inc.

Licensed under the MIT License.

License of code which we wrote

MIT

tfcmt-gitlab's People

Contributors

andrescidoncha avatar b4b4r07 avatar babarot avatar chroju avatar cicdguy avatar drlau avatar dtan4 avatar dtaniwaki avatar fujiwara avatar fumikony avatar genert avatar hirosassa avatar isaoshimizu avatar johejo avatar kitagry avatar krrrr38 avatar kyontan avatar mdolinin-chwy avatar mizzy avatar moemoe89 avatar nownabe avatar renovate-bot avatar shogo82148 avatar suzuki-shunsuke avatar takumin avatar teraken0509 avatar tkak avatar tomfaulkner avatar tomoasleep avatar yuya-takeyama avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tfcmt-gitlab's Issues

Getting 401 Unauthorized

I tried adding this to a pipeline, but it seems it is not working at all.

For all the label, and comment, calls to the API we get 401 Unauthorized even with a token that has the correct permissions.

I suspect, but was unable to confirm, that it is the same problem as here: mercari/tfnotify#113

The namespace information is being added to the API calls, when it apparently shouldn't be. I can see this in our output as well.

It is a self-hosted Gitlab instance.

time="2023-12-04T07:26:40Z" level=error msg="remove labels" error="GET https://{gitlab}/api/v4/projects/{group}/{subgroup}/{project}/merge_requests/{mr}: 401 {message: 401 Unauthorized}" program=tfcmt
time="2023-12-04T07:26:40Z" level=error msg="add a label" error="PUT https://{gitlab}/api/v4/projects/{group}/{subgroup}/{project}/merge_requests/{mr}: 401 {message: 401 Unauthorized}" label=add-or-update program=tfcmt
POST https://{gitlab}/api/v4/projects/{group}/{subgroup}/{project}/merge_requests/{mr}/notes: 401 {message: 401 Unauthorized}

cannot install tfcmt-gitlab by following given example

Hi,

We tried to install tfcmt-gitlab using the given getting started example

getting started

But it fails giving the below error

cat: can't open '/root/.local/share/aquaproj-aqua/pkgs/github_archive/github.com/tfutils/tfenv/v3.0.0/tfenv-3.0.0/version': No such file or directory
Version could not be resolved (set by /root/.local/share/aquaproj-aqua/pkgs/github_archive/github.com/tfutils/tfenv/v3.0.0/tfenv-3.0.0/version or tfenv use <version>)

Add the installation guide with aqua to the document

Hi, thank you for your great project!

We suggest to add the installation guide with aqua to the document.
aqua is a declarative CLI Version Manager.
You can install this tool with aqua.

aqua init # Create aqua.yaml
aqua g -i hirosassa/tfcmt-gitlab # Add this tool to aqua.yaml
aqua i # Install tools

For the detail of aqua, please see the official document.

We expect you can just copy and paste the following guide to your document.


Install with aqua

You can install this tool with aqua.

aqua g -i hirosassa/tfcmt-gitlab # Add hirosassa/tfcmt-gitlab to aqua.yaml

Thank you.

This issue was created automatically by script. For the detail, please see here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.