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!

    BM - Help needed for Git checkout

    Scheduled Pinned Locked Moved Support
    8 Posts 2 Posters 16 Views
    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.
    • P Offline
      philippe.camelio_3885
      last edited by

      Hi,

      I have some problem to make git-checkout running properly

      I created one application linked to gitlab repository.
      This part is working fine
      836cf608-59e9-40dc-bd6c-c88ace695692-image.png

      I created a pipelinestage and I ran this script :

      set $DestFolder = /opt/${ApplicationName};
      Ensure-Directory $DestFolder;
      {
          Git::Checkout-Code
          (
              To: $DestFolder,
          );
      }
      

      As I understand, the Git::Checkout-code will grab the code from $Repository, but it can't reach the gitlab server

      bfb5626a-5f79-40a6-85c1-6421fb98948d-image.png.

      I have done a second application, where I am using Git::Checkout-Code but I had all the expected variables manually and it is working fine.
      I thought if the application is linked to the git repo, it is transparent and I don't need to add the infor i n the checkout function.

      Something is missing but I don't know what exactly, any advice, example is welcome

      Thanks
      Philippe

      atrippA 1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer @philippe.camelio_3885
        last edited by

        Hi @philippe-camelio_3885 ,

        Hmmm, good question; 8min: 20seconds is quite a long time. So I guess, there's a timeout going on? Maybe it's a prompt for input that's happening? I dunno why that would be the case.

        There's a lot of logs missing, so we can't really see where it's failing. Does it work if you're checking out to a Windows server (maybe localhost?)

        I thought if the application is linked to the git repo, it is transparent and I don't need to add the infor i n the checkout function.

        The build is associated with a Commit/Branch/Repository. The operation will effectively default as follows:

            Git::Checkout-Code
            (
                From: $Repository,
                BranchOrCommit: $Commit
            );
        

        $Repository will just be the name of your connection, and before running on the remote server, the url/username/password will be extracted from the connection.

        Thanks,
        Alana

        1 Reply Last reply Reply Quote 0
        • P Offline
          philippe.camelio_3885
          last edited by

          @atripp said in BM - Help needed for Git checkout:

          There's a lot of logs missing, so we can't really see where it's failing. Does it work if you're checking out to a Windows server (maybe localhost?)

          In fact, it never ends. - more than one hour running
          6e66d98e-a6f3-4273-8f66-0fd8202ef046-image.png

          And I made a test on localhost build it is a docker setup 😊
          so I have the same result

          I will make some tests

          1 Reply Last reply Reply Quote 0
          • P Offline
            philippe.camelio_3885
            last edited by

            I ran on localhost (ia the buildmaster server) and the chekout is working fine.

            Same script on target server => not working

            I will capture and make an artifact to overcome the problem

            Do you thin this is a bug or is it something I misused ?

            Best regards

            Philippe

            atrippA 1 Reply Last reply Reply Quote 0
            • atrippA Offline
              atripp inedo-engineer @philippe.camelio_3885
              last edited by

              Thanks for clarifying! So it sounds like the issue is, the Git::Checkout-Code operation is freezing on a remote server (connected via SSH).

              I don't think there's anything you're doing wrong, but there's clearly something going on. It's hard to guess what; typically an input prompt is about the only thing that will cause a freeze like that -- but I don't know how that can happen with that operation.

              From here, i would check out the sshd logs, and see what's going on between the servers. You should see the last ssh command ran, and maybe that will give some kind of clue as to a problem

              1 Reply Last reply Reply Quote 0
              • P Offline
                philippe.camelio_3885
                last edited by

                from sshd log, the bm server make a connection, create the tmp folder and nothing else happen since I cancel the job 🤔

                2023-08-29 14:41:46 # VM004073 # info #  sshd[1887]: #  Accepted publickey for root from 10.101.4.65 port 35342 ssh2: ED25519 *****************************
                2023-08-29 14:41:46 # VM004073 # info #  sshd[1887]: #  pam_unix(sshd:session): session opened for user root(uid=0) by (uid=0)
                2023-08-29 14:41:47 # VM004073 # info #  systemd-logind[833]: #  New session 74 of user root.
                2023-08-29 14:41:47 # VM004073 # info #  systemd: #  pam_unix(systemd-user:session): session opened for user root(uid=0) by (uid=0)
                2023-08-29 14:48:25 # VM004073 # info #  sshd[1887]: #  Received disconnect from 10.101.4.65 port 35342:11: Normal disconnect
                2023-08-29 14:48:25 # VM004073 # info #  sshd[1887]: #  Disconnected from user root 10.101.4.65 port 35342
                2023-08-29 14:48:25 # VM004073 # info #  sshd[1887]: #  pam_unix(sshd:session): session closed for user root
                2023-08-29 14:48:25 # VM004073 # info #  systemd-logind[833]: #  Session 74 logged out. Waiting for processes to exit.
                2023-08-29 14:48:25 # VM004073 # info #  systemd-logind[833]: #  Removed session 74.
                
                atrippA 1 Reply Last reply Reply Quote 0
                • atrippA Offline
                  atripp inedo-engineer @philippe.camelio_3885
                  last edited by

                  Hmm that's really peculiar; we haven't seen an issue like this, so I'm not sure how to troubleshoot.

                  I don't think this is operation-specific, so I wonder if you could try some other tests on this server. Perhaps do something simple, like shexec echo hello world; ? And perhaps see if it's an issue on other servers?

                  Thanks,
                  Alana

                  P 1 Reply Last reply Reply Quote 0
                  • P Offline
                    philippe.camelio_3885 @atripp
                    last edited by philippe.camelio_3885

                    @atripp said in BM - Help needed for Git checkout:

                    shexec echo hello world;

                    I have no issue to run a shexec. This is just the git-checkout.
                    The server is also configured thru Otter without any problems ...

                    I am using artifact captured from localhost so it is OK for me

                    I will make other tests later

                    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