Giter Site home page Giter Site logo

devcontainers's Introduction

Hi there ๐Ÿ‘‹

I'm Iain Galloway. I build software and make music.

devcontainers's People

Contributors

iaingalloway avatar

Watchers

 avatar  avatar

devcontainers's Issues

Mainline mode in GitVersion isn't working properly

> mkdir gitversion-source-branches && cd gitversion-source-branches && git init
Initialized empty Git repository in /home/iain/repos/gitversion-source-branches/.git/

> echo mode: mainline > gitversion.yaml

> git add . && git commit -m "Initial commit" && git t v1.0.0
[main (root-commit) 3f1d085] Initial commit
 1 file changed, 1 insertion(+)
 create mode 100644 gitversion.yaml

> docker run --rm -v "$(pwd):/src" gittools/gitversion /src | grep '"MajorMinorPatch":'
  "MajorMinorPatch": "1.0.0",

> git commit --allow-empty -m "Empty commit"
[main 5c703e8] Empty commit

> docker run --rm -v "$(pwd):/src" gittools/gitversion /src | grep '"MajorMinorPatch":'
  "MajorMinorPatch": "1.0.1",

> git commit --allow-empty -m "Empty commit"
[main 9f20369] Empty commit

> docker run --rm -v "$(pwd):/src" gittools/gitversion /src | grep '"MajorMinorPatch":'
  "MajorMinorPatch": "1.0.1",

Expected 1.0.2

Consider some method of bootstrapping templates

Say I want to make a dotnet project called foo.

I could have a script in my env repo that creates /repos/foo/.devcontainer/devcontainer.json and launches vscode

Once I'm in the container, I could have a custom template for dotnet new that creates

  • .config/dotnet-tools.json
  • .husky/pre-commit
  • .husky/task-runner.json
  • src/
  • .editorconfig
  • .gitattributes
  • .gitignore
  • Directory.Build.props
  • Foo.sln
  • README.md
  • stylecop.json
    with all my standard configuration.

Need to figure out how to create non .NET templates too:

  • .editorconfig
  • .gitattributes
  • README.md

Need to figure out a way of not having github run two actions when I tag

This commit:

iaingalloway/gitversion-prototype@8127362

Is tagged v1.0.0

I created it with

> git commit -m "Add gitversion.yaml"
> git t v1.0.0
> git push --follow-tags 
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 20 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 431 bytes | 431.00 KiB/s, done.
Total 4 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To github.com:iaingalloway/gitversion-prototype.git
   08084c2..8127362  main -> main
 * [new tag]         v1.0.0 -> v1.0.0

Workflows were queued twice:

https://github.com/iaingalloway/gitversion-prototype/actions/runs/6676439638
https://github.com/iaingalloway/gitversion-prototype/actions/runs/6676439672

And two images were created with different SHAs:

https://github.com/iaingalloway/gitversion-prototype/pkgs/container/gitversion-prototype/142030062?tag=1.0.0
https://github.com/iaingalloway/gitversion-prototype/pkgs/container/gitversion-prototype/142030077?tag=1.0.0.main--14ef668

They both have the same version:

> docker run --rm -it ghcr.io/iaingalloway/gitversion-prototype:1 cat version.txt
1.0.0

> docker run --rm -it ghcr.io/iaingalloway/gitversion-prototype:1.0.0.main--14ef668 cat vers
ion.txt
1.0.0

So they're tagged correctly, but I don't think I want two builds here.

Tag devcontainers with gitversion

On complicating factor is that the docker metadata action appears to split out tags separated by newlines

https://github.com/iaingalloway/gitversion-prototype/actions/runs/6677007276/job/18146608120

Docker tags
  ghcr.io/iaingalloway/gitversion-prototype:main
  ghcr.io/iaingalloway/gitversion-prototype:latest
  ghcr.io/iaingalloway/gitversion-prototype:1.13.2
  ghcr.io/iaingalloway/gitversion-prototype:1.13
  ghcr.io/iaingalloway/gitversion-prototype:1
  ghcr.io/iaingalloway/gitversion-prototype:1.13.2.main-2-cf1659b
  ghcr.io/iaingalloway/gitversion-prototype:1.13.2.main-2-cf1659bdf0d5a06334f8d2035ff55c0f17042d49

and

with:
    file: src/Dockerfile
    push: true
    tags: ghcr.io/iaingalloway/gitversion-prototype:main
  ghcr.io/iaingalloway/gitversion-prototype:latest
  ghcr.io/iaingalloway/gitversion-prototype:1.1[3](https://github.com/iaingalloway/gitversion-prototype/actions/runs/6677007276/job/18146608120#step:8:3).2
  ghcr.io/iaingalloway/gitversion-prototype:1.13
  ghcr.io/iaingalloway/gitversion-prototype:1
  ghcr.io/iaingalloway/gitversion-prototype:1.13.2.main-2-cf1659b
  ghcr.io/iaingalloway/gitversion-prototype:1.13.2.main-2-cf1659bdf0d5a0633

ghcr.io doesn't have retention policy settings

Need to set one up with an action: https://github.com/marketplace/actions/container-retention-policy

Existing actions don't seem to support the functionality I want:

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.