Jenkins doesn't work with repo git organized in folders - jenkins

I'm doing a project for an exam and I'm having trouble connecting jenkins with my own repository (which is organized in folders). In practice, in my repository I have a folder containing some code and another one with some .tex files. When I run the build, jenkins finds the repository but going to see in the workspace it does not generate the build directory containing the .class files. Thanks in advance for the help.

Related

VSTS Build not generating latest bin binaries

I am using TFS 2018 CI pipeline for MVC project, also I added the project's bin files into the TFS, there is no problem with the pipeline, its getting succeeded and artifact is generated successfully but the main problem is that if I made any changes in code related to project's DLL,
the CI pipeline's build solution not generating its own latest bin file
Until or unless I manually check Out the project.dll file and than check In the file than pipeline will pick the changes, what I am missing, same result by using 'MSBUILD' tasks, I also TICK clean the 'all directories' but same result
After spending whole day I came to the solution that, bin folder should not be added/included into the Source Control (TFS/Azure),
bin folder or project's binaries should not be added in to TFS
bin folder should be excluded in the project, after doing this operation, when I run the same build pipeline and inspect the artifact found that TFS builds added the bin folder and files accordingly, thats shocked me.
One thing should be remember in this case that what about external dlls reference, create a CommonDLLs folder at the same level of the src folder and put all external DLLs there. They are referenced through a relative path

How to use one .travis.yml file for multiple repositories

I have several separate github repositories in a github organization for which I want to run the same build test with travis-ci.
That is, I want to be able to use the same .travis.yml for all of these repositories. Moreover, I'd like to be able to update this file and have those changes be valid for each repository.
I could copy the .travis.yml into each repository. But if I have hundred or two hundred repositories, that gets annoying real fast.
Is there anyway to simply point each repository to an external .travis.yml rather than having to put a duplicate .travis.yml file in each repository.
There isn't a way to do this with a remote .travis.yml file, as Travis-CI will look at the root of the project for this file. An alternative approach I would suggest to accomplish your goal:
Build automation around updating all of your repository's .travis.yml files from a shared common file. Using your favorite scripting language, updating the file in all specified repositories and then pushed to GitHub/GitLab automatically. This should help in maintenance of your repositories with just a bit of extra automated work.

copy jenkins job artifact to right destination

I've setup two project with jenkins, the first is handled by an agent that builds a asp.net mvc project and then publish it on local file system in a folder that is called publish/customername.
the second job run on customer machine and copy the artifact folder in the application directory and restart iis.
The problem is that when i copy the files it replicate the directory structure like
c:/webs/vhost/project/publish/customername
instead what i want to achieve is to copy all files in
c:/webs/vhost/project
Thanks for the help

Jenkins slave job with two git repos

I'm trying to setup master/slave on two osx machines, while using only slave for build.
Have one main git repo for the project but few additional files are kept in separate git repository. After adding two git repositories noticed after checkout it's creating two project directories under workspace and one has "#2" in the name.
That makes a problem with copying/accessing files between two repositories using $WORKSPACE variable as directory "project_name#2" is not logically part or $WORKSPACE (getting file not found error). And also cannot know which repo will be in which directory with every new build.
And more confusing sometimes it even pulls one repo to the master machine even though I've set that the build executes only on slave.
I'd appreciate any advice or suggestion?
If you're using the GIT plugin you can use advance cloning settings and specify a sub folder to clone to. make sure to clone to different folders under your workspace and then you can access both. I'm doing that in some of my projects and it works like a charm.
Use : https://wiki.jenkins-ci.org/display/JENKINS/Multiple+SCMs+Plugin
Good luck!

How can I push to bitbucket.org without my project parent directory

I had created a remote repo with bitbucket.org, for example, https://somebody#bitbucket.org/somebody/test.git
When I pushed my local repo to the bitbucket repo by Eclipse EGit, I got all my project files in a parent directory, for example, https://somebody#bitbucket.org/somebody/test.git/Test/XXX. But I only hoped all my project files located in the repo root, for example, https://somebody#bitbucket.org/somebody/test.git/XXXX.
How can I do? Thanks!
eGit converts eclipse project into a folder under your Git repo when you 'share' it. This is the way eGit works, so I don't think what you asking is possible with eGit.
It is better this way IMO because such design allows for several projects in the same Git repository, which is very common.

Resources