Giter Site home page Giter Site logo

030 / dip Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 6.0 255 KB

Docker Image Patrol (DIP) is a tool that returns the latest version of a docker image using a regular expression.

Home Page: https://dip.releasesoftwaremoreoften.com/

License: MIT License

Go 91.48% Shell 5.66% Dockerfile 2.78% Ruby 0.07%
cli devops devops-tools docker docker-image docker-registry go golang kubernetes openshift tags versions

dip's Introduction

profile for 030 on Stack Exchange, a network of free, community-driven Q&A sites

dip's People

Contributors

030 avatar github-actions[bot] avatar rvanbutselaar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dip's Issues

Refactor Tags(tags []string)

I've selected Tags(tags []string) for refactoring, which is a unit of 16 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Refactor inOrOutsideCluster(kubeconfig string)

I've selected inOrOutsideCluster(kubeconfig string) for refactoring, which is a unit of 17 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

minio tags

dip -image 'minio/minio' -latest "^.*2020-11-25.*$" -semantic false
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x674c91]

goroutine 1 [running]:
github.com/hashicorp/go-version.(*Version).String(0x0, 0x40, 0x203000)
	/home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/version.go:359 +0x51
github.com/hashicorp/go-version.(*Version).Compare(0x0, 0x0, 0x776d80)
	/home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/version.go:118 +0x2f
github.com/hashicorp/go-version.(*Version).LessThan(...)
	/home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/version.go:298
github.com/hashicorp/go-version.Collection.Less(...)
	/home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/version_collection.go:12
sort.quickSort(0x77b5c0, 0xc0002696a0, 0x0, 0x7, 0x6)
	/home/travis/.gimme/versions/go1.14.2.linux.amd64/src/sort/sort.go:205 +0x1b8
sort.Sort(0x77b5c0, 0xc0002696a0)
	/home/travis/.gimme/versions/go1.14.2.linux.amd64/src/sort/sort.go:218 +0x79
main.latestTag(0xc0003a2800, 0x64, 0x80, 0x7ffcc65b7172, 0x10, 0x1, 0x0, 0xc000056fa0, 0xc00007cde0, 0xc00001c8e0)
	/home/travis/gopath/src/github.com/030/dip/main.go:150 +0x36f
main.main()
	/home/travis/gopath/src/github.com/030/dip/main.go:202 +0x1113

Refactor checkWhetherImagesAreUpToDate(containerImage, namespace, kind, name string)

I've selected checkWhetherImagesAreUpToDate(containerImage, namespace, kind, name string) for refactoring, which is a unit of 43 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Refactor main()

I've selected main() for refactoring, which is a unit of 58 lines of code and 9 branch points. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Simple Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the number of branch points (if, for, while, etc.) per unit to 4.
  • Whyโ“
    Keeping the number of branch points low makes units easier to modify and test.
  • How ๐Ÿ”ง
    Split complex units with a high number of branch points into smaller and simpler ones.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Refactor Latest(tags []string)

I've selected Latest(tags []string) for refactoring, which is a unit of 56 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

mongo returns non existing tags

dip -image mongo -latest "3."
:3.6.17
dip -image mongo -latest "4.
"
:4.24.0
dip -image mongo -latest "5."
:5.0.0
dip -image mongo -latest "6.
"
:6.17.0
dip -image mongo -latest "7."
:7.0.0
dip -image mongo -latest "8.
"
:809.0.0
dip -image mongo -latest "9.*"
:9.0.0

Refactor main()

I've selected main() for refactoring, which is a unit of 57 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Refactor ToInt(tagWithoutChars string)

I've selected ToInt(tagWithoutChars string) for refactoring, which is a unit of 17 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

omit library

use a bool to indicate that an official image from dockerhub is used rather than enforcing to add library/ to every dockerfile

Refactor Latest(tags []string)

I've selected Latest(tags []string) for refactoring, which is a unit of 56 lines of code and 12 branch points. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Simple Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the number of branch points (if, for, while, etc.) per unit to 4.
  • Whyโ“
    Keeping the number of branch points low makes units easier to modify and test.
  • How ๐Ÿ”ง
    Split complex units with a high number of branch points into smaller and simpler ones.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Refactor main()

I've selected main() for refactoring, which is a unit of 57 lines of code and 12 branch points. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Simple Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the number of branch points (if, for, while, etc.) per unit to 4.
  • Whyโ“
    Keeping the number of branch points low makes units easier to modify and test.
  • How ๐Ÿ”ง
    Split complex units with a high number of branch points into smaller and simpler ones.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Refactor LatestTagBasedOnRegex(official bool, latest string, image string)

I've selected LatestTagBasedOnRegex(official bool, latest string, image string) for refactoring, which is a unit of 34 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Refactor main()

I've selected main() for refactoring, which is a unit of 58 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Refactor dockerfileTag(i string)

I've selected dockerfileTag(i string) for refactoring, which is a unit of 16 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Refactor absent(image, registry string)

I've selected absent(image, registry string) for refactoring, which is a unit of 19 lines of code. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

get latest images from gitlab, harbor, redhat, jfrog, quay

ghcr.io
mcr.microsoft.com
k8s.gcr.io

error handling preserve option

At the moment the errors are ignored in the preserve function resulting in GREEN builds while they could be RED due to errors.

Fix this by checking the error and return a log.FATAL so that the pipeline fails and the issue can be fixed.

Refactor latestTag(s []string, t string, z bool)

I've selected latestTag(s []string, t string, z bool) for refactoring, which is a unit of 36 lines of code and 3 parameters. Addressing this will make our codebase more maintainable and improve Better Code Hub's Keep Unit Interfaces Small guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the number of parameters per unit to at most 4.
  • Whyโ“
    Keeping the number of parameters low makes units easier to understand, test and reuse.
  • How ๐Ÿ”ง
    Reduce the number of parameters by grouping related parameters into objects. Alternatively, try extracting parts of units that require fewer parameters.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ

Update version not taken into account

Examples

14000002
14.0.2_12-jre-hotspot-bionic
14000002
14.0.2_8-jre-hotspot-bionic

latest version: 14.0.2_8-jre-hotspot-bionic, while it should be 14.0.2_12-jre-hotspot-bionic

and

1016002
1.16.2-alpine3.13
1016002
1.16.2-alpine3.12

latest version: 1.16.2-alpine3.12, while it should be 1.16.2-alpine3.13

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.