Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login
    1. Home
    2. thoven
    3. Posts

    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!

    T Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 124
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: LDAPS authentication

      It's possible it may work (I can't verify) if you specify the port in the domain controller host value under advanced settings (i.e. enter your-dc-server:636 as the value).

      See the LDAP Advanced Settings documentation for info on how to find that page to configure that value.

      If that doesn't work, I suspect a code change is needed - it is not clear via the Microsoft documentation what the default AuthenticationType is for this call: https://github.com/Inedo/inedox-inedocore/blob/master/InedoCore/InedoExtension/UserDirectories/ADUserDirectory.cs#L268

      posted in Support
      T
      thoven
    • RE: Buildmaster SDK - ReleaseNumber

      Try the following code; it removes the need for IGenericBuildMasterContext altogether and uses an async method to replace the Task.Run call:


          public override async Task ExecuteAsync(IOperationExecutionContext context)
          {
              // Clone Repo to directory
              CloneOptions co = new CloneOptions();
      
              co.CredentialsProvider = (_url, _user, _cred) => new LibGit2Sharp.SecureUsernamePasswordCredentials { Username = Username, Password = Password };
      
              var path = context.ResolvePath(CloneTo);
      
              path = Repository.Clone(Path.Combine(BaseUrl, RepositoryName), path, co);
      
              // Get Commit hash
              var repo = new Repository(path);
              var commitHash = repo.Head.Tip.Sha;
      
              // Get local + remote branch names
              var localBranchName = "refs/heads/" + Branch;
              var remoteBranchName = "refs/remotes/origin/" + Branch;
      
              Log(new SimpleLogMessage(Inedo.Diagnostics.MessageLevel.Debug, $"Local Branch set to {localBranchName}", "Git", "", context));
              Log(new SimpleLogMessage(Inedo.Diagnostics.MessageLevel.Debug, $"Remote Branch set to {remoteBranchName}", "Git", "", context));
      
              // Check the remote branch exists
              var trackingBranch = repo.Branches[remoteBranchName];
              if (trackingBranch == null)
              {
                  Log(new SimpleLogMessage(Inedo.Diagnostics.MessageLevel.Error, $"Branch {Branch} does not exist on the remote.", "Git", "", context));
                  throw new Exception($"Branch {Branch} does not exist on remote");
              }
      
              // Checkout branch
              Log(new SimpleLogMessage(Inedo.Diagnostics.MessageLevel.Debug, $"Creating Branch {Branch} Locally", "Git", "", context));
              Branch localBranch;
              try
              {
                  localBranch = repo.CreateBranch(Branch, trackingBranch.Tip);
              }
              catch
              {
                  // Branch already exists - set it up
                  localBranch = repo.Branches[localBranchName];
              }
      
              Log(new SimpleLogMessage(Inedo.Diagnostics.MessageLevel.Debug, "Tracking remote branch", "Git", "", context));
              repo.Branches.Update(localBranch, b => b.TrackedBranch = trackingBranch.CanonicalName);
      
              Log(new SimpleLogMessage(Inedo.Diagnostics.MessageLevel.Debug, "Checking out branch", "Git", "", context));
              Commands.Checkout(repo, Branch);
              Log(new SimpleLogMessage(Inedo.Diagnostics.MessageLevel.Debug, $"Cloned branch {Branch} Successfully", "Git", "", context));
      
              // If hash is specified, checkout that
              if (!string.IsNullOrWhiteSpace(Commit))
              {
                  Log(new SimpleLogMessage(Inedo.Diagnostics.MessageLevel.Debug, $"Commit Hash set. Attempting to checkout commit hash {Commit}", "Git", "", context));
                  repo.Reset(ResetMode.Hard, Commit);
              }
      
              // Make sure the commit hash is set correctly
              commitHash = repo.Head.Tip.Sha;
      
              Log(new SimpleLogMessage(Inedo.Diagnostics.MessageLevel.Information, $"Cloned Successfully: Hash is {commitHash}", "Git", "", context));
      
              // Set commit hash 
              if (String.IsNullOrWhiteSpace(VariableName))
              {
                  Log(new SimpleLogMessage(Inedo.Diagnostics.MessageLevel.Information, "No Commit Hash Variable Specified. Not setting.", "Git", "", context));
              }
              else
              {
                  using (var db = new DB.Context())
                  {
                      var exec = await db.Builds_GetExecutionAsync(context.ExecutionId);
      
                      await db.Variables_CreateOrUpdatePackageVariableAsync(
                          Build_Id: exec.Build_Id,
                          Variable_Name: VariableName,
                          ValueType_Code: Domains.VariableValueType.Scalar,
                          Variable_Value: InedoLib.UTF8Encoding.GetBytes(commitHash),
                          Sensitive_Indicator: false,
                          EvaluateVariables_Indicator: false
                      );
      
                      Log(new SimpleLogMessage(Inedo.Diagnostics.MessageLevel.Information, $"Assigned commit hash {commitHash} to variable {VariableName}", "Git", "", context));
                  }
              }
      
              //Delete the .git Directory
              repo.Dispose();
              Helpers.DirectoryHelper.DeleteReadOnlyDirectory(path);
              Helpers.DirectoryHelper.DeleteReadOnlyFile(context.ResolvePath(".gitignore"));
              Log(new SimpleLogMessage(Inedo.Diagnostics.MessageLevel.Debug, "Removed .git directory and .gitignore", "Git", "", context));              
          }
      

      However, I'm guessing this was written a while ago before the built-in Git operations handled this? We use the Git operations to perform this same functionality by combining two operations:

      # Gets source from the BuildMaster repository and creates a release package variable named GitCommit
      Git::Git-GetSource
      (
          Credentials: GitLab,
          RepositoryUrl: https://gitlab.com/inedo/BuildMaster.git,
          DiskPath: ~\Src,
          RecurseSubmodules: true,
          Branch: $Branch,
          CommitHash => $commit
      );
      
      Set-ReleaseVariable GitCommit
      (
          Value: $commit,
          Package: $PackageNumber
      );
      
      posted in Support
      T
      thoven
    • RE: Disabling TLS 1.0 and 1.1

      For completeness, after the registry value is configured the server will likely need a reboot to take effect.

      posted in Support
      T
      thoven
    • RE: Buildmaster SDK - ReleaseNumber

      Are you able to post the full code, or submit the code as a support ticket if you don't want it public? There must be something else happening because that should definitely work.

      posted in Support
      T
      thoven
    • RE: Not working with GitHub.com

      See this post:

      https://inedo.com/support/questions/8831#inline-post-8848

      posted in Support
      T
      thoven
    • RE: AD configuration

      If you are connecting from a VM that isn't joined to the domain, you need to install the latest Inedo Core extension (i.e. at least v1.0.6) from the Admin > Extensions page (the extension was shipped after the ProGet release).

      You would also have to point it at the AD server via Admin > Change User Directory (LDAP) > Advanced > edit "Active Directory (New)", and set the LDAP host or IP there. You can perform most search tests / diagnostics there.

      posted in Support
      T
      thoven
    • RE: Disabling TLS 1.0 and 1.1

      What that article says is that programs should not set specific TLS versions (which ProGet does not) because the defaults will change as the OS is patched/updated. This means that it should be using the most secure by default, which based on the TCP error, it is not doing. Unfortunately this is symptom of applications targeting versions of the .NET Framework before v4.7 like ProGet does (it targets v4.5.2).

      We may be able to hack in a fix like we did for our Git extension in a future version, but if you want to get it working right away, follow this part of the guide: Configuring security via the Windows Registry

      posted in Support
      T
      thoven
    • RE: Not working with GitHub.com

      This is OS & .NET Framework dependent, does this guide help?

      https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls

      posted in Support
      T
      thoven
    • RE: Hedgehog Web service does not work under Windows Server 2016

      Can you try executing Hedgehog.Service.exe from the command line? Also, can you verify that %PROGRAMDATA%\Inedo\SharedConfig\Hedgehog.config exists and has a valid connection string in it?

      posted in Support
      T
      thoven
    • RE: How to query a package's manifest?

      I can't seem to find any indication that endpoint is part of official NuGet API, but in ProGet if you want a specific file you can query as per this example:

      http://proget.company.com/package-files/download?packageId={packageId}&version={packageVersion}&feedName={feedName}&path={packageId}.nuspec

      A live example:

      https://proget.inedo.com/package-files/download?packageId=InedoLib&version=528.0.0&feedName=ExternalBuild&path=InedoLib.nuspec

      posted in Support
      T
      thoven
    • RE: Send Email on Plan Changes for BuildMaster

      We added basic support for this in BM-3197, though anything more complicated needs to be handled with a custom event listener.

      If you want to create a custom extension for this (and are an enterprise customer) you already have access to the source code at https://my.inedo.com, or you can request direct source access to our GitLab repository as well, just send a note via the contact form.

      posted in Support
      T
      thoven
    • RE: Authentication to Symbols Server

      Now that the current version of Visual Studio seems to respect authentication challenges, we are adding support for this. The tracking issue is here: PG-1273

      posted in Support
      T
      thoven
    • RE: Limiting Resource Credentials in Environments

      This exact feature was added in v6.0; in that version there is another checkbox when editing the resource credential to "Restrict by environment" and it behaves exactly as you describe.

      As a side note, the Agents.EnforceServerRestrictions setting is designed to catch server/environment mismatches (i.e. error out when deploying to stage associated with Integration and targeting a server associated with Production) when deploying and will not affect credentials.

      posted in Support
      T
      thoven
    • RE: Missing parameters in IIS::Ensure-AppPoll ?

      Hello Philippe,

      For restartTimeLimit, I believe StartupTimeLimit and ShutdownTimeLimit (in the Process Model tab for the visual editor) are what you're looking for.

      I've submitted a pull request to add PeriodicRestartSchedule: https://github.com/Inedo/inedox-windows/pull/35

      posted in Support
      T
      thoven
    • RE: TeamCity extension install error

      The latest version was incorrect in the Den -- the latest cross-product TeamCity extension should be v1.0.0, and its legacy counterpart extension (i.e. TeamCityLegacy) should be v6.0.0.

      If it doesn't appear on the extensions page in BuildMaster, you can download and install it manually from here: https://inedo.com/den/inedox/teamcity

      If you go the manual route, note in the manual installation instructions it says the file extension is ".inedox", while in this case it is actually ".upack". Make sure there is no TeamCity.bmx or TeamCity.inedox in the extension path (TeamCityLegacy.bmx is OK if not a fresh installation of BuildMaster).

      posted in Support
      T
      thoven
    • RE: Assets folder upload being denied

      Hi David,

      This was fixed as part of PG-1096 in v4.8.3

      posted in Support
      T
      thoven
    • RE: When do we get Server too busy

      Thank you for the followup, that is good information.

      For future reference, the docs for switching from the built-in webserver to IIS can be found here: https://inedo.com/support/kb/1013/hosting-through-iis-instead-of-the-integrated-web-server

      The only thing I notice from the article is the mention of Classic mode for the application pool - at some point each product was updated to support Integrated mode.

      posted in Support
      T
      thoven
    • RE: [Feature Request] Set-ReleaseVariable support all types

      Yes, here is the tracking issue: BM-3165

      posted in Support
      T
      thoven
    • RE: Where has the feed APIKey gone

      It was generalized to use ProGet's API keys which have more granular security options: https://inedo.com/support/documentation/proget/feeds/nuget#nuget-api-key

      posted in Support
      T
      thoven
    • RE: Tracking Codes

      I think you are a looking for a different vendor - Inedo's BuildMaster is a DevOps tool, not accounting software.

      posted in Support
      T
      thoven
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 5 / 7