Comments (5)
How is your code organized? Did you look at https://github.com/RamblingCookieMonster/BuildHelpers#get-project-name? It sounds like your psd1 is in the root of your repo.
from buildhelpers.
Not all powershell projects are modules!
My case in particular where I noticed this is a repo of Azure Automation Runbooks, so there's no .psd1 file anywhere. Additionally, looking closely at the code, the first case is assuming that your project will have a folder matching the name of the project, and that it will get checked out into a folder with the same name as the project, which will never be the case in Azure Devops unless your project is for some reason called s
.
from buildhelpers.
Well certainly. This project seems like it's primarily focused on helping with building modules however.
I think in order to get it to work out of the box for your use case, you could create a folder using the project name within your repo and then put the source you wish to build there. Then when you kick off your process, kick it off within that subfolder, not the root i.e., agent working directory.
from buildhelpers.
So I was reading through some YAML build related documentation and found this tidbit which may be of use to you. https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/pipeline-options-for-git?view=azure-devops#checkout-path
Checkout path
By default, your source code will be checked out into a directory called s. For YAML pipelines, you can change this by specifying checkout with a path. The specified path is relative to$(Agent.BuildDirectory). For example: if the checkout path value is mycustompath and $ (Agent.BuildDirectory) is C:\agent_work\1, then the source code will be checked out into C:\agent_work\1\mycustompath.
Please note that the checkout path value cannot be set to go up any directory levels above $(Agent.BuildDirectory), so path..\anotherpath will result in a valid checkout path (i.e. C:\agent_work\1\anotherpath), but a value like ..\invalidpath will not (i.e. C:\agent_work\invalidpath).
You could specify a subpath with you project name in it.
from buildhelpers.
@rlvandaveer the code in this module is not always strict on that; check out Get-BuildVariable which leans heavily on environment variables of each build system. If this was a 'pure' Git/PS module, it could have done without. I am sure @RamblingCookieMonster had his reasons.
@FISHMANPET just use $(System.TeamProject). I do agree with @rlvandaveer; this is made for PS modules...
from buildhelpers.
Related Issues (20)
- Get files changed since <branch> rather than just most recent commit HOT 2
- If you're going to just copy my module into yours .... HOT 1
- Get-BuildVariable: inconsistent commit message detection HOT 3
- Get-BuildVariable: inconsistent PATH parameter usage HOT 11
- Add build checks in Azure Pipelines
- Add support for -Credential <pscredential> in Get-NextNugetPackageVersion and Find-Nugetpackage
- Import-Metadata should be exported
- Strange error when using Set-ModuleFunctions during AppVeyor build HOT 2
- BuildHelpers grabs the wrong variable GitLab CI HOT 1
- Publish a module locally feature request HOT 1
- Get-Buildvariable overwrites CommitMessage on switch default HOT 2
- Include RepoRoot as a BH variable
- Invoke-Git : warning: refname 'x' is ambiguous. HOT 3
- Set-ShieldsIoBadge replaces whole line (until last ')') HOT 1
- Set-BuildEnvironment fails when git is not installed
- Error in Azure Pipeline when Get-ProjectName returns multiple items
- Get-ProjectName fails when alias `git` exists HOT 2
- Return all variables with matching prefix
- Make all environment variables upper-cased?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buildhelpers.