I have a requirement to build only changed project in hudson. We have out repository structure as
Projects/
------- Project A/src
------- Project B/src
------- Project C/src
We have arount 100+ indipendent projects in
I have a job configured in hudson which monitors the entire projects folder for changes (svn update).
What I'm trying to achieve is to build only the project which gets changed by passing the project name as argument for my build script
like ..... ant Project B ( upon changes in projectB). Is this feasible? Please guide me through.
Thanks
Related
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
I am using FDT 5 and would like to create a new project with already existing source files and assets. When I start up the Project Wizard (New->FDT Project) I browse to the folder I want to make as the project but I cannot proceed as FDT gives me the error:
*"PROJECT_NAME overlaps the location of another project: PROJECT_NAME"*
I have downloaded a flash project (developed in FDT) and would just simply like to make it a project in my FDT environment.
I mean this shouldn't be so complicated right? I don't want to create an entirely new project (its own folder) I want to use the same folder I downloaded and view that project. I am using git so I have to work in the same path, sort of speak.
Any ideas?
EDIT:
Apparently this is an issue with FDT, a small bug. I managed to solve the problem following this:
FDT / Eclipse Error : ‘overlaps the location of another project’
And on the eclipse forum:
Eclipse Forum
Flash builder project files can't be opened on another computer even if the files were copied, for e.g. through version control like git or svn.
Importing and Exporting fxp projects is not possible as we do not want to overwrite files for git or svn unnecessarily.
How do people collaborate on Flash Builder projects without creating new project in Flash Builder and having to set up all the settings for the project again and again for multiple collaborators?
If you import the project using its folder location as per #Sean Fujiwara answer then:
One useful way to collaborate in Flash Builder projects is to utilise environment variables. You can access these using - Window > Preferences > General > Workspace > Linked Resources:
From here you can add a new variable or edit an existing one, from the example above you can see that we use a FRAMEWORK_SOURCE variable which points to the source for our shared framework code, we use a swc but this is handy for debugging errors.
We also have another variable called OUTPUT_FOLDER which in our case points to a folder where we run our project over localhost see example below, to use this in a project, you go to right click project name > Properties > ActionScript Build Path, here you enter the folder name you want creating inside the folder that OUTPUT_FOLDER points to:
When you do a Project > Clean from the menu, all resources from your html-template folder will be copied across to this folder and it should open in a browser.
Now we have been able to check in to SVN our .project and .actionScriptProperities files with few issues. When someone new to the project checks them out, they will get an Error in the Problems panel telling them they don't have for example - OUTPUT_FOLDER\MyProjectName, therefore the project leader should have a document listing all the required variables to be setup in your environment.
Other things you can share are paths to raw font files etc.
The only problem I've had with this approach is sometimes it asks for the path to the SDK if it is different from your location, not had chance to figure this one out yet.
Flash builder project files can't be opened on another computer even
if the files were copied, for e.g. through version control like git or
svn.
Flash builder projects can be imported into the workspace just like other Eclipse projects.
Once you copy them to another computer:
Right click in package explorer and go to Import....
Select General/Existing Projects into Workspace.
Select the folder containing the .project directory.
If you make sure Copy projects into workspaces is deselected, you can commit the files directly from wherever you checked the code out.
This is now solved in Flash Builder 4.7 where you can actually import the project folder as is.
It seems that, when doing a build promotion in Jenkins using the Promoted Builds Plugin, it generates a new BUILD_ID environment variable. Is there a way, or a plugin that lets you access the current BUILD_ID of the build you are trying to promote?
Basically, the functionality I need is to: Navigate to a build in Jenkins, be able to launch an ant or gradle script to promote an already built artifact that is archived under the build I'm currently in.
Use the PROMOTED_JOB_NAME and PROMOTED_NUMBER variables to get the name and build number of the build being promoted. These two values are only set DURING the promotion process; they are part of the jobs build. This doesn't exactly map to BUILD_ID, but it does allow access to that build.
When I had this problem in the past, I did the following.
Have the original job copy certain variables (like JOB_ID) out to config style file (each line is NAME=VALUE).
Archive that file as part of the build.
At the time of the promotion, use the PROMOTED_JOB_NAME and PROMOTED_NUMBER variables to get the original build, feed the values into the Copy Artifact Plugin to retrieve the archived file of values, then use the EnvInject Plugin with that values file to bring the values into the promotion process.
I'll try to explain my situation as concise as possible:
I have a template project that I use as a template (duh) when starting a new project.
This template project evolves, and sometimes I update it as I am working on another project.
So imagine that:
Template project: template.file
Project A: template.file & projectA.file
Project B: template.file & projectB.file
(all projects are under revision control) Now when I change template.file in project A, I would like all other template.files in all other projects to update
I am on windows, using tortoisehg and I am relatively new at this versioning game. I suppose I would do this with branches? But then wouldn't the projectA.file and ProjectB.file also get added to the template project?
Here is something you could do:
Go into the template project and merge in project A, then prune everything you didn't want before committing. This is rather laborious and time consuming.
Then you can go into project be and pull from the template project and very carefully merge.
I would not do this for any number of reasons. First, it's messy and error prone. Secondly it results in both projects containing all the files of all the other projects, even if in the tip revisions those files are considered deleted. The history is still all there.
Here is another thing you could do:
Use hg export to export the change that modifies the template file from project A. Then use hg import to import that change into your template project.
Then pull from the template project into both project A and project B and merge.
This requires that you discipline yourself when modifying project A and always make modifications to template files their own change.
Alternatively, you can hand modify the exported change to remove extraneous changes.
Here is a third thing you could do:
Always modify template files only in the template project. Then you can pull from the template project into projects A and B and merge.
There's nothing in Mercurial that will you out of the box with this, cleanly.
You could:
Stuff everything inside one big repository, just separate them into different directories
Use sub-repositories, meaning that Project A and Project B would reference the template project as a sub-repository
Just make a copy of the file in question to all the other projects/repositories
In either of these 3, there's nothing that will help you make sure a file inside each repository is in sync.
In the first case, you would have 3 distinct copies of the template.file, and updating one will not update the other two, and there's nothing in Mercurial that will help you with that.
In the third case, the three repositories are completely distinct and separate, which means changes in one does not propagate into the other.
The second case, however, can be done, but if you need to have a copy of the file inside the Project A/B repositories, you're back to the third case.
However, you can make the template project a sub-repository of Project A, and instead of making a copy of the file, out of the template project and into Project A, you refer to the one you have in the sub-repository.
This is the way Mercurial handles such things.