I know I have seen this before when I have either inadvertently added an extra arg in my hab pkg build or in a HAB_DOCKER_OPTS variable in such a way that causes the pass through to docker to make docker run think it needs to start a named container.
Can we see the actual hab pkg build command you are invoking and also check your HAB_DOCKER_OPTS variable.
Before its working fine but recentli all builds failed due to the invalid container name error. We are planning to upgrade hab version 0.72 but upgrade is the only solution?
Please let me know how to upgrade and downgrade habitaat in windows
I’m hesitant to say that upgrading is the only solution since I cannot reproduce on version 0.69.0 locally. More information of the hab command your CI is calling to invoke the build would help us to better zero in on the problem. Also helpful is if you invoke the build with the RUST_LOG environment variable set to debug. This outputs the exact arguments sent to docker.exe and would help identify how a container name is being passed to docker.
Regarding upgrade/downgrade: if you are on a system that already has habitat installed, you can downgrade or upgrade to any version of Habitat by running hab pkg install core/hab/<VERSION_NUMBER>. For example, to upgrade to 0.72.0, you would run hab pkg install core/hab/0.72.0. Then you cab invoke a build under that version by using the absolute path of its hab.exe binary. This binary would live in c:\hab\pkgs\core\hab\0.72.0\<RELEASE NUMBER>\bin\. You could also add that directory to your path and then hab should resolve to it.
I want to make it clear. Am doing upgrade in jenkins windows slave from hab version 0.69 to 0. 72 and we are using chocolatey and i have upgraded with the command choco upgrade hab - - version 0.72.
After execution Now its showing hab version 0.72. Apart from that i have to do anything in slave to invoke jenkins job builds with hab version 0.72? There will be any mpact on the jobs? 0. 72 relies on docker?
That is correct. There should not be any other impact. Had I known you were using chocolatey I would have suggested that you just use choco upgrade habitat --version 0.72.0 -y which would have handled the path for you.
A habitat build only relies on docker if you specifically pass -D to hab pkg build. Without that docker should not be invoked.
hi i upgraded , but now its not able to find artifact pls find the below error
we are using habitat executer plugin
Setting Directory: C:\hab\svc\jenkins-slave\data\workspace\workspace\test-hab/results/
null
before we gave {workspace}/results/last_build.env to find artifact but now its taking only {workspace}/results/last_build.ps1 any reason ?
while running promote stage this path script is executing and showing error
C:\hab\svc\jenkins-slave\data\workspace\workspace\test-hab@tmp\durable-876282e7\powershellScript.ps1
error: The following required arguments were not provided: <CHANNEL> USAGE: hab.exe pkg promote [OPTIONS] <PKG_IDENT> <CHANNEL> For more information try --help