GithubHelp home page GithubHelp logo

Comments (5)

ethanmdavidson avatar ethanmdavidson commented on May 19, 2024

Hi @Ankhas! I don't have a virtualbox install handy so I can't run your script myself, but based on the logs you've provided I don't see any errors. Can you describe the behavior that you were expecting to see?

Could you also please download and run the repository.pkr.hcl script from the examples directory and let me know what output you get? It should look something like the following:

$ packer build repository.pkr.hcl 
null.git-plugin-test-repository: output will be in this color.

==> null.git-plugin-test-repository: Running local shell script: /tmp/packer-shell2463536863
    null.git-plugin-test-repository: head: main
    null.git-plugin-test-repository: is_clean: true
    null.git-plugin-test-repository: branches: main
    null.git-plugin-test-repository: tags: v0.0.1,v0.0.2,v0.1.0,v0.1.1,v0.2.0,v0.2.1,v0.3.0,v0.3.1,v0.3.2,v0.3.3,v0.3.4
Build 'null.git-plugin-test-repository' finished after 64 milliseconds 823 microseconds.

==> Wait completed after 64 milliseconds 867 microseconds

==> Builds finished. The artifacts of successful builds are:
--> null.git-plugin-test-repository: Did not export anything. This is the null builder

Thanks!

from packer-plugin-git.

Ankhas avatar Ankhas commented on May 19, 2024

Hi @ethanmdavidson!

I have downloaded your repository and run the script repository.pkr.hcl. I'm getting the same output as yours with no issues at all.

In some way, should it be related with my tree structure? In my project I'm running this command:

packer build builds/linux/ubuntu/20-04-lts

And my tree structure is something like that:

.
├── .git
│   ├── branches
│   ├── [...]
│   └── refs
├── packer
│   ├── builds
│   │   └── linux
│   │       └── ubuntu
│   │           └── 20-04-lts
│   │               ├── http
│   │               │   ├── meta-data
│   │               │   └── user-data.pkrtpl.hcl
│   │               ├── linux-ubuntu.auto.pkrvars.hcl
│   │               ├── linux-ubuntu.pkr.hcl
│   │               ├── secrets.auto.pkrvars.hcl
│   │               ├── secrets.auto.pkrvars.hcl.example
│   │               └── variables.pkr.hcl
│   └── README.md
├── .gitignore
└── README.md

If I replace the content of my file build/linux/ubuntu/20-04-lts/linux-ubuntu.pkr.hcl with the content of the file repository.pkr.hcl, the packer build command is still stuck to the log:

2023/04/05 10:23:26 packer-plugin-git_v0.3.4_x5.0_linux_amd64 plugin: 2023/04/05 10:23:26 [TRACE] starting datasource repository

And the build is not processing at all. Even if I press ctrl+c to break the execution, the packer build command is not terminating and let me get back to the shell prompt.

However, I also tried to replace the content of my file build/linux/ubuntu/20-04-lts/linux-ubuntu.pkr.hcl with the content of commit.pkr.hcl and everything works fine.

I'm wondering why the script repository.pkr.hcl is working fine when I ran it in your repository but not in mine.

from packer-plugin-git.

ethanmdavidson avatar ethanmdavidson commented on May 19, 2024

Thank you! It's very helpful to know that the commit datasource works but not the repository datasource, and that the issue only occurs in your repo. Does your repo happen to be public? It would be very helpful for me to be able to reproduce this myself.

Either way, I'll add some more debug logging to the plugin and see if we can narrow down the issue.

from packer-plugin-git.

ethanmdavidson avatar ethanmdavidson commented on May 19, 2024

Hi @Ankhas! I've released a new version (0.4.0) that has improved debug logging. Please upgrade to this version, run your script again, and share the logs here.

from packer-plugin-git.

ethanmdavidson avatar ethanmdavidson commented on May 19, 2024

Closing due to inactivity - please feel free to reopen with more info.

from packer-plugin-git.

Related Issues (11)

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.