Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    pgutil usage

    Scheduled Pinned Locked Moved Support
    7 Posts 4 Posters 44 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      caterina
      last edited by

      Hi,

      I have questions regarding the usage of pgutil.

      Our previous approach using pgscan was to upload an sbom which contained all necessary information. The project was automatically created.
      As far as I understand, uploading an sbom with pgutil (pgutil.exe builds scan) also creates the project without explicitly creating one (pgutil.exe builds create).
      Using the promote command (pgutil.exe builds promote) a build can be promoted to a different stage.
      Is it possible to combine this functionality? We would love to upload an sbom directly to a specific stage. If it is not possible - have you thought about adding this functionality? Or will we have to call both commands consecutively?

      Further, I have tried to create a build using pgutil but I keep getting an error.
      My pgutil call looks like this:
      pgutil.exe builds create --build=1.0.0 --project=BuildStageTest --api-key=*** --source=Test
      And the error I get is:
      Server responded with BadRequest (400): Invalid project name.
      If I try to create this project directly in ProGet there are no errors. Can you reproduce this problem? Or is something wrong with my call? I am working with the latest sources from github.

      Thank you
      Caterina

      stevedennisS 1 Reply Last reply Reply Quote 0
      • stevedennisS Offline
        stevedennis inedo-engineer @caterina
        last edited by

        Hi @caterina,

        We haven't thought of adding a --stage option to the pgutil builds scan command, but of course it's possible. I know that we are exploring other options like associating builds/projects with pipelines (i.e. a sequence of stages).

        So perhaps that would mean, pgutil builds scan --workflow=MyWorkflow, and then MyWorkflow would start/end in different stages.

        For now, we'd love to see how you utilize the stages. Maybe it means calling two commands temporarily, and we can revisit once we add new features, etc.?

        For the pgutil builds create command, the project must already exist, or you'll get that error. You can create or update a project using pgutil builds projects create.

        So basically, these command would probably do what you want?

        pgutil builds projects create --project=BuildStageTest
        pgutil builds create --build=1.0.0 --project=BuildStageTest --stage=DesiredStage
        

        Note that when using pgutil builds create, you can also specify a stage name, like in the example above.

        1 Reply Last reply Reply Quote 0
        • C Offline
          caterina
          last edited by

          Hi @stevedennis,

          thank you for your response.
          Maybe you can also help me with a follow-up-problem.

          I created a project using

          pgutil builds projects create --project=BuildStageTest
          

          and i created a build using

          pgutil builds scan --input=<path-to-sln> --project-name=BuildStageTest --version=1.1.0 --api-key=***
          

          Those steps worked perfectly fine:
          69294664-04ba-4f7c-8ee1-9021de7a0d5b-image.png

          Afterwards I wanted to promote this build to another stage:

          pgutil builds promote --build=1.1.0 --project=BuildStageTest --stage=Test --api-key=***
          

          but I got an error:
          Server responded with BadRequest (400): Missing required query argument: build

          I really hope you can help me here as well.

          Thanks,
          Caterina

          1 Reply Last reply Reply Quote 0
          • Dan_WoolfD Offline
            Dan_Woolf inedo-engineer
            last edited by

            Hi @caterina,

            This looks to be an issue with pgutil. I just pushed an update to pgutil, 2.0.3, that includes the fix. If you update to that version, you should be able to promote builds now.

            Thanks,
            Dan

            1 Reply Last reply Reply Quote 0
            • C Offline
              caterina
              last edited by

              Hi @Dan_Woolf,

              thank you for the quick fix.
              But the promotion call does not seem to promote the build. The build remains in its initial stage.
              From pgutil I do get the feedback "Promoting BuildStageTest 1.1.0 to Test/Production/Integration". I tested it with all of our stages. But if I have a look at ProGet the build is still in the initial stage "Build".
              Can you reproduce this behavior as well?

              Thanks,
              Caterina

              1 Reply Last reply Reply Quote 0
              • rhessingerR Offline
                rhessinger inedo-engineer
                last edited by

                Hi @caterina,

                The fix in pgutil corrected the API to enure the proper parameter was passed to the SCA API. There looks to also be a regression on the ProGet side in the SCA API. I have created a ticket, PG-2805, which will be released next week on Friday Oct 4th that contains the fix. If you need the fix sooner, please let us know and we can get a pre-release build out for you.

                Thanks,
                Rich

                Products Engineer, Inedo

                1 Reply Last reply Reply Quote 0
                • C Offline
                  caterina
                  last edited by

                  Hi @rhessinger,

                  thank you very much! We will just wait for the next release and I will come back to you if we encounter further problems.

                  Thanks,
                  Caterina

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • 1 / 1
                  • First post
                    Last post
                  Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation