I need Bamboo to build the project automatically when a file in "api" subfolder changes. When a file in any other subfolder changes the bamboo build plan shouldn't run.
Folder structure:
project
- api
- ui
- core
In the Plan Configuration repositories tab, from the "Include / exclude files" dropdown I have selected the following option
Include only changes that matches the following pattern
and I have tried the following patterns:
.*/api/.*
api/
api/*
api\/*
api/**
/api/*
but the build plan isn't running. With "Include / exclude files" dropdown set to None the build plan runs (but does so when a file changes in any other subfolder also)
I can't split the project up to different repositories.
What pattern should I use or is there any other solution for this?
Pattern that ended up working was
api/.*
It's a regular expression from the root of the checkout supposedly, although I have not used this feature. Here are some of their examples:
https://confluence.atlassian.com/display/BAMBOO052/_planRepositoryIncludeExcludeFilesExamples?_ga=2.91083610.1778956526.1502832020-118211336.1443803386
What you might try is let it checkout the whole thing without the include filter set, and don't let it delete the working directory. Look on the filesystem and verify the path from the root of the working directory. Then test your regex against the whole path relative from that working directory.
Related
I think what I am looking to do is fairly simple - I just can't wrap my head around it.
I've got a repo in AzDo. This repo contains configuration files for firewalls. This is how we manage changes in these configurations.
I've got a simple build pipeline that copies the relevant files and creates an artifact.
I have a release pipeline that gets the files onto the on-prem machine in my Deployment Group. The files show up in c:\azagent\r1\_work\<artifact folder>.
As part of this pipeline I am looking to copy the files from c:\azagent\r1\_work\<artifact folder> to e:\shares\<artifact name>. This is the part that I cannot figure out how to make work.
What strategy could I use to put this together? I've looked into the documentation but it seems like this is somewhat of an edge case (not deploying an app or web site, etc). Ideally, I'd love to do this in a multi-stage YAML pipeline - but from what I've read, it appears as if these do not yet support Deployment Groups. So a classic pipeline is fine for now.
You can add a copy file task(Click the plus sign(+) on the agent job and search for copy files) in your release pipeline to copy the files to a different place on your local machine.
Then you can specify the source folder(ie. $(System.DefaultWorkingDirectory)), and the contents to copy and the target folder(ie. e:\shares\). In below example all contents in $(System.DefaultWorkingDirectory)(ie. C:\agent\_work\r1\a) will be copied to folder D:\Test\New folder
Please check the prefined variables for more information about its map to the local folders.
I've been playing around with Jekyll lately and recently discovered that S3 wouldn't allow me to have enough buckets to have one bucket per website.
So I'm struggling to figure out two things
1) How do I specify that I want a 'child' subdirectory to be created, and all the generated website's files to be in it ?
2) How do I use a variable as the 'child' subdirectory's name ? (since it will be different for each website)
The baseurl config option doesn't seem to do anything about that. Any idea will be welcome :-)
Thanks a lot, and have a great day !
I'm not sure about the variable option, however, for child sub-directories:
A) If you can put the content into "child" folders directly within the jekyll content, then use different configuration files to manage each site through build properties. See the examples under the example below.
B) If you just want to put the same content in different places, perhaps you could use different baseurl or destination properties in different config files? Use the same config file approach as below, but with different versions of those properties instead of/in combination with the exclude property (see https://jekyllrb.com/docs/configuration/#serve-command-options).
Example: Use different config files
Use the exclude config property to exclude folders (and all of that folder's contents) when running a build. You could also specify different output folder locations per site, base URLs, and so on. I'll focus on the exclude property, but you can find other useful properties in the documentation: https://jekyllrb.com/docs/configuration/#global-configuration
For example, you could have the following files/folders:
/siteA-folder/siteA-content/blah.html
/siteB-folder/siteB=content/meh.html
/siteC-folder/siteC=content/foo.html
config.yaml
config_buildA.yaml
config buildB.yaml
Use the build option --config FILE1[,FILE2...] (https://jekyllrb.com/docs/configuration/#build-command-options) to explicitly call your custom config file A or B, each of which has its own version of the exclude property.
Snippet from config_buildA.yaml:
exclude:
- /siteB-folder/ # While building A, you want to exclude the siteB folder and contents
- /siteC-folder/ # Similarly, exclude siteC contents
Snippet from config_buildB.yaml:
exclude:
- /siteA-folder/ # While building B, you want to exclude the siteA folder and contents
- /siteC-folder/ # Similarly, exclude siteC contents
Building A from the command line:
jekyll build --config config_buildA.yaml
Building B from the command line:
jekyll build --config config_buildB.yaml
By managing excludes in the config file, you can re-use the common templates and css, and keep everything together (using less disk space overall).
If there's shared content, you could also look into using a more advanced feature, includes (see https://jekyllrb.com/docs/includes/), to manage the shared content in the includes folder, referenced within the html or markdown files (but that's getting a little of the beaten track for your question, so I'll stop there...)
EDIT: I see you've edited the question specifying the baseurl property doesn't do what you're looking for.
I've used a combination of the url site property baseurl and destination similar to below. In my case, I have different destinations depending on whether it's an archive or latest content, but you could use this to build to different web folders if you wanted.
Ex: config for latest content
url: http://example.com
baseurl: "/latest/"
destination: /path/to/latest/output/
Ex: config for archived content
url: http://example.com
baseurl: "/archive/content/"
destination: /path/to/archive/output/
Then, using the multiple versions of the config file, I can just call whichever one applies.
I am in the process of rebuilding a API documentation site for an open source project where we want to keep an archive of previous releases. I am wondering how I can configure Jekyll to generate the right hierarchy?
We have the following directory layout in our current /docs folder (which we would like to reuse in Jekyll somehow):
current/
v1/
v2/
v3/
Whenever we release a new version the current folder gets copied to a new folder (say v4). The contents of each folder is something like this:
introduction.md
testing.md
api-foo.md
api-bar.md
I'd like these to be available under the url domain.com/v3/testing/, domain.com/current/testing/, etc. I see that I could probably employ collections to do this, having one collection per version. To do this I see myself auto-updating the _config.yml as part of a build script (I made an example doing this here), but I am not sure how to progress from here, or if using collections for this is the wrong approach ...
This is too brief of an update to be of real quality, but thought I would mention that we solved this in the end in the Sinon project. Check out the repo at GitHub sinonjs/sinon and see the docs folder as well as the scripts called from package.json.
Feel free to improve on this answer by editing it and adding content and links.
I am using TeamCity as build server and have a little trouble when configuring projects and their dependencies.
Eventually I want to get the checkout directory of project dependencies to configure certain build steps. For that I have the variable %teamcity.build.checkoutDir% for the checkout directory of the project itself.
However, I did not find something like %dep.<dependencyID>.teamcity.build.checkoutDir%.
Is there a way to get the checkout directory of a dependency?
You can add a parameter (say checkoutDir ) in the first build whose value is equal to %teamcity.build.checkoutDir% . You can then fetch this value in the dependent build (either through snapshot or artefact dependency)
I am using this myself and I can access my dependent Build's Checkout directory with...
%dep.<dependecyID>.teamcity.build.default.checkoutDir%
I believe this will only work with a Snapshot Dependency though
Our build has a variety of generated HTML reports. I would like to have those reported and accessible on the build page, like JavaDoc entries. Is there a generic way to expose these reports without writing a custom plug ins ?
If that isn't available, is there a way to post an HTTP link on the page ?
You can choose "archive the artifacts" and archive for example "reports/*.html"
These will appear under the project page under the heading "Last successful artifacts".
Even if you clear your workspace before each build, these artifacts are moved to a separate directory.
You could also add a build script which will modify or update a file in your userContent directory (since Hudson 1.299), and link to these build artifacts in yet another location.