Giter Site home page Giter Site logo

gitlab-cleaner's Introduction

Gitlab Registry Cleaner

This Projects aims to create a Small Docker Container that can be run as part of a gitlab-ci Pipeline to trigger a Docker Registry cleanup.

Development Setup

Install glide follwing the instructions here https://github.com/Masterminds/glide#install

glide install

For the development setup, you have to connect your local copy to the Golang Dependency System. In $GOPATH/src/github.com/phaus create a Softlink to your local copy (e.g. ln -s /Users/philipp/GIT/go/gitlab-claner).

Optional

Install direnv. Copy and modify .envrc.example to .envrc matching to your gitlab project configuration. Run direnv allow . in your current folder. Your ENV Variables should now be injected, everytime you enter that folder.

Install jq. Run the Script scripts/get.sh to test your setup.

Use the Docker Container

Wer möchte kann unter gitlab-ci gerne mal etwas testen:

  1. Create a new private access token: https://gitlab.com/profile/personal_access_tokens (Access to api)

  2. Add this Token as PRIVATE_ACCESS_TOKEN as a CI/CD Variable.

  3. Add this snippet to your .gitlab-ci.yml file:

cleaner:
  stage: test
  image: phaus/gitlab-cleaner
  script:
    - cleaner test
    - cleaner list

At the moment, it just parses the Registry API. No changes are made.

gitlab-cleaner's People

Contributors

phaus avatar

Watchers

James Cloos avatar  avatar

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.