Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Habitat Build #10

Open
pierzapin opened this issue Jul 18, 2019 · 6 comments
Open

Install Habitat Build #10

pierzapin opened this issue Jul 18, 2019 · 6 comments

Comments

@pierzapin
Copy link

I have habitat build and run steps in an Azure DevOps YAML Build definition running against a SelfHosted Linux Build Agent. I am encountering a number of errors as the build steps progress that appear to me to things the extension should be doing by default.

  1. The Install step reports as complete (i.e. green) but the hab binary is not extracted to the expected location. This causes a "Unable to locate executable file: '/tmp/hab" error in any later habitat build step. I remedied this by manually exectracting and moving the binary from /hab-0.82.0-20190605214032-x86_64-linux/hab to /tmp/hab

  2. The licence agreement is not accepted, therefore any hab build attempts will spin indefinitely. Again I manually triggered a hab build via ssh in order to accept the agreement and unblock use of the command in the build automation

  3. And finally the build appears to start but now fails with:

mount: mounting /src on /hab/studios/src/src failed: No such file or directory
##[error]The process '/tmp/hab' failed with exit code 255

I'll attach the build yaml and screenshots of the errors encountered. Am I doing something wrong?

@pierzapin
Copy link
Author

azure-pipeline.yaml.txt
Issue 3 Screen Shot
Issue 2 Screen Shot
Issue 1 Screen Shot

@russellseymour
Copy link
Contributor

Thanks for this @pierzapin
I am about to release a new version of the Install task that handles installing Habitat on windows properly and sets the path properly. It has moved to C:\ProgramData\habitat\hab.exe

For accepting the license, the easiest way is to add an environment HAB_LICENSE variable to the build which is set to accept. I am reluctant to add it to the tasks as it would need to be selected on all the tasks (or at least the first one in the pipeline). By making it an environment variable it is a concious thing that needs to be done to accept the license. Would this work for you?

@pierzapin
Copy link
Author

I appreciate you getting back to me on this, Russell. For clarity, I was having issues with builds on Linux agents, although I guess you may have mentioned the Windows path to indicate that work is required here across platforms.

Thanks also for explaining the env var option, I'll give that a whirl as well.

@russellseymour
Copy link
Contributor

@pierzapin I apologise, I had clocked you were talking about Linux ... doh!!!

Can I ask if you are using the "Install Habitat" task before the "Habitat Build" task? That will ensure that Habitat is /tmp/hab which is where the task is looking for it.

@pierzapin
Copy link
Author

Indeed, I do have "Habitat Install" as the first step in the pipeline. That step runs green, although as I described in the initial report, I feel as if there is an extra step required in the install task, because a simple manual move of the downloaded asset to the expected path unblocked me. Has something changed in the way the habitat files are packaged into the tar up on api.bintray.com?

@russellseymour
Copy link
Contributor

@pierzapin I am about to release the aforementioned version of the extension. Can you see if that fixes the issue you are seeing? If not then I will happily look at it again.

I do not think things have changed in the way that Hab is packaged.

Are you using version 3.x of the extension?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants