Hi @atripp,
So I associated the deployment targets with environments and that fixed both of my issues: $EnvironmentName is populated and now the environments are showing on that application screen:
Thanks!
Hi @atripp,
So I associated the deployment targets with environments and that fixed both of my issues: $EnvironmentName is populated and now the environments are showing on that application screen:
Thanks!
Hi @atripp,
Sorry, I got kind of muddled there; it's actually $EnvironmentName that is empty.
I'm running a script as part of promoting a build to a Test environment. I expect the $EnvironmentName would contain "Test".
For some reason the $ApplicationName variable is empty in one of my applications. It's working in the others. The plan is fully working, I can create releases and run the pipelines, etc, but the variable is empty when I use it in scripts.
Maybe also related, on the landing page, it says there are no executions for the app, even though under Releases I have multiple releases that have gone through various stages.
Hi @rhessinger,
I should have taken a larger screenshot to show the context. That error I mention in my reply is when creating the connection:
I'm pretty sure there is a bug in validating the "Repository name" field and it is disallowing digits in the name even though they should be allowed.
-Philip
Ok thanks, I'll be a little more diligent looking through the docs next time. Here, I think, is a real issue though, the docker connection doesn't seem to allow digits in the repository name, despite the message:
Our actual Docker registry, does in fact, start with 'c4i'.
Not sure what exactly is wrong here. I have a Dockerfile in the git repo under code/
Here is my OtterScript
Git::Checkout-Code();
SHExec >>pwd;
ls;>>;
Docker::Build-Image
(
Repository: mydockerserver/foo,
From: $WorkingDirectory/code
);
I get this error:
Unhandled exception: System.ArgumentException: The specified DockerRepository resource ("mydockerserver/foo") was not found.
at Inedo.Extensibility.SecureResources.SecureResource.Create(SecureResourceType type, String resourceName, IResourceResolutionContext context)
at Inedo.Extensions.Docker.Operations.DockerOperation_ForTheNew.CreateRepository(ICredentialResolutionContext context, String repositoryResourceName, String repositoryNameOverride) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E374097\Src\Docker\InedoExtension\Operations\DockerOperation.cs:line 41
at Inedo.Extensions.Docker.Operations.BuildImageOperation.ExecuteAsync(IOperationExecutionContext context) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E374097\Src\Docker\InedoExtension\Operations\BuildImageOperation.cs:line 91
at Inedo.BuildMaster.Windows.ServiceApplication.Executions.PlanExecuter.OtterScriptExecuter.Inedo.ExecutionEngine.Executer.IExecutionHostEnvironment.ExecuteActionAsync(ActionStatement actionStatement, IExecuterContext context)
I manually built the docker image and pushed it as mydockerserver/foo:latest ahead of time, to verify that all works.
Suggestions?
@atripp
Thanks, I installed 23.0.10 this morning and the git checkout task succeeds on the RedHat server. Next step is getting the docker build task to succeed. I may open a separate post for that.
Also I just tried doing the same thing with another server, a Centos7 server, that we had been able to successfully build on and deploy to from an old version of BuildMaster (4.9.10) in the recent past. This server does not have noexec mount at /tmp.
I configured it with the same creds and a similar tmp directory as the old buildmaster was using, but I am getting the same original error above:
Unhandled exception: System.InvalidOperationException: Error initializing remote process.
at Inedo.Agents.Hosting.RemoteHostedAgentProcess.SendMessageAsync(AgentCommand command, CancellationToken cancellationToken)
at Inedo.Extensibility.Operations.RemoteExecuteOperation.ExecuteAsync(IOperationExecutionContext context)
I suppose we are looking at 2 separate issues. I'd like to resolve both, but the noexec /tmp issue is the more important one for me.
@atripp
So /tmp is being mounted with 'noexec'. I might be able to get our security department to grant an exemption, but it'll probably take a long time.
Anyway to change where buildmaster stores its libraries?
Edit: I was thinking, I can probably get an exemption for one machine, but if we start using buildmaster in a bigger way, we'll want to be deploying apps to a number of different machines and I don't think I will be able to get exemptions for all of them. If it's not possible to change the path currently, then that would be an important feature request for us.
@atripp
I think you are right. Yes, the file exists. I saw it didn't have execution permissions so I gave it that but it still fails.
I tried running 'ldd' on it but that failed too: "ldd: warning: you do not have execution permission for `/tmp/Inedo/ExtensionCache/fafcab6c8d528766939b379f9e8f3dc9ba44db15/package/runtimes/linux-x64/native/libgit2-a2bde63.so'
not a dynamic executable"
However if I copy it to another location I can run ldd on it.
Can I change the location of the /tmp/Inedo/ folder? I'll reach out to one of our Linux admins too, to see if it can be resolved on our side.
Just upgraded to 23.0.9, same issue
On a whim, I changed the tmp path to /home/buildmaster/tmp/buildmaster-agent and I get what looks like a git error instead.
Not sure about the original error, I would have said it was a permissions error, but the 'buildmaster' user has write permissions to the /tmp folder.
Using SshAgent agent on #######
Updating local repository for https://svc_buildmaster@bitbucket.coh.org/scm/riapps/foo.git...
Repository path is /home/buildmaster/tmp/buildmaster-agent/.gitrepos/bitbucket.coh.org$scm$riapps$foo.git
Repository does not exist or is not valid.
Cloning from https://svc_buildmaster@bitbucket.coh.org/scm/riapps/foo.git...
Unhandled exception: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load shared library '/tmp/Inedo/ExtensionCache/fafcab6c8d528766939b379f9e8f3dc9ba44db15/package/runtimes/linux-x64/native/libgit2-a2bde63.so' or one of its dependencies.
In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: /tmp/Inedo/ExtensionCache/fafcab6c8d528766939b379f9e8f3dc9ba44db15/package/runtimes/linux-x64/native/libgit2-a2bde63.so: failed to map segment from shared object at System.Runtime.InteropServices.NativeLibrary.LoadFromPath(String libraryName, Boolean throwOnError) at System.Runtime.InteropServices.NativeLibrary.Load(String libraryPath) at System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDllFromPath(String unmanagedDllPath) at Inedo.Extensibility.ExtensionLoadContext.LoadUnmanagedDll(String unmanagedDllName) at System.Runtime.Loader.AssemblyLoadContext.ResolveUnmanagedDll(String unmanagedDllName, IntPtr gchManagedAssemblyLoadContext) at System.Runtime.InteropServices.NativeLibrary.LoadByName(String libraryName, QCallAssembly callingAssembly, Boolean hasDllImportSearchPathFlag, UInt32 dllImportSearchPathFlag, Boolean throwOnError) at System.Runtime.InteropServices.NativeLibrary.LoadLibraryByName(String libraryName, Assembly assembly, Nullable`1 searchPath, Boolean throwOnError) at System.Runtime.InteropServices.NativeLibrary.TryLoad(String libraryName, Assembly assembly, Nullable`1 searchPath, IntPtr& handle) at LibGit2Sharp.Core.NativeMethods.ResolveDll(String libraryName, Assembly assembly, Nullable`1 searchPath) in /_/LibGit2Sharp/Core/NativeMethods.cs:line 124 at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags) at LibGit2Sharp.Core.NativeMethods.git_libgit2_init() at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary() in /_/LibGit2Sharp/Core/NativeMethods.cs:line 148 at LibGit2Sharp.Core.NativeMethods..cctor() in /_/LibGit2Sharp/Core/NativeMethods.cs:line 54 --- End of inner exception stack trace --- at LibGit2Sharp.Core.NativeMethods.git_clone(git_repository*& repo, String origin_url, FilePath workdir_path, GitCloneOptions& opts) at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts) in /_/LibGit2Sharp/Core/Proxy.cs:line 278 at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options) in /_/LibGit2Sharp/Repository.cs:line 810 at Inedo.Extensions.Git.RepoMan.FetchOrCloneAsync(RepoManConfig config, CancellationToken cancellationToken) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E412252\Src\Git\InedoExtension\RepoMan.cs:line 89 at Inedo.Extensions.Git.Operations.CanonicalGitOperation.FetchOrCloneAsync(IRemoteOperationExecutionContext context) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E412252\Src\Git\InedoExtension\Operations\CanonicalGitOperation.cs:line 123 at Inedo.Extensions.Git.Operations.CheckoutCodeOperation.RemoteExecuteAsync(IRemoteOperationExecutionContext context) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E412252\Src\Git\InedoExtension\Operations\CheckoutCodeOperation.cs:line 61 at Inedo.Extensibility.Operations.RemoteExecuteOperation.RemoteExecuteJob.ExecuteAsync(CancellationToken cancellationToken) at Inedo.Agents.AgentCommand`1.Inedo.Agents.IAgentCommandWithResponse.ExecuteAsync(Stream responseStream) at Inedo.Agents.AgentCommandDispatcher.ExecuteCommandAsync(AgentCommand command, IClientConnection connection)Cleaning up...
Deleting /home/buildmaster/tmp/buildmaster-agent/_E243 on #####
.../home/buildmaster/tmp/buildmaster-agent/_E243 on ###### deleted.Cleanup complete.
We're on 23.0.2. The linux server is running RHEL8. It seems like the SSH connection is successful, since I do see the /tmp/buildmaster-agent folder is being created.
I'm getting the exception below. I'm brand new to BuildMaster. I have a build pipeline that just does a git checkout on a remote linux server and nothing else. The server connection is good, and in fact, running the build does create the /tmp/buildmaster-agent folder. Not the /tmp/Inedo folder however.
Include Debug
Using SshAgent agent on ########
Unhandled exception: System.InvalidOperationException: Error initializing remote process.
at Inedo.Agents.Hosting.RemoteHostedAgentProcess.SendMessageAsync(AgentCommand command, CancellationToken cancellationToken)
at Inedo.Extensibility.Operations.RemoteExecuteOperation.ExecuteAsync(IOperationExecutionContext context)
at Inedo.BuildMaster.Windows.ServiceApplication.Executions.PlanExecuter.OtterScriptExecuter.Inedo.ExecutionEngine.Executer.IExecutionHostEnvironment.ExecuteActionAsync(ActionStatement actionStatement, IExecuterContext context)
Cleaning up...
Deleting /tmp/buildmaster-agent/_E241 on #########...
/tmp/buildmaster-agent/_E241 on ######### deleted.
Cleanup complete.