Jenkins time out on private Bower repository - jenkins

We had a bower registry on git hub. The Jenkins job been configured and the build was successful. Recently, we set up a bower private repository. When I trigger the build on Jenkins, its referring to all the url of the private bower repository but getting "Timed Out" and thereby, results in build failure.
Will changing registry to https or https-proxy in .bowerrc make the build successful? What's the resolution?

If it is a private repository, chances are it is internal to your network, therefore you should not use any proxy. (you could try to unset it in .bowerrc)
Im sure you already checked the documentation but just in case https://bower.io/docs/config/#placement--order

Related

Nuget.config file setup in Jenkins (From Jfrog Artifactory)

I'm trying to execute Build action for a dot net core application using Jenkins Pipeline (Cloudbees Jenkins). During the build, when the dotnet restore command is executed, necessary dependency has to be pulled from JFrog antifactory. As of now I have created a local repo, Remote repo and also Virtual repo as suggested by JFrog. What steps have to be taken to make the connection and configuration possible (All the way from Jenkins to Jfrog).
Thanks in Advance.
You should be able to use the Jenkins Artifacttory Plugin. Refer this.

How to include code from another repository in gitlab registry?

I have a shared registry (a docker image with tools installed for running my code) which is used by multiple repositories. I have created a new repository called LuaServer, which uses code from another repository called LuaDB. In LuaServer I have created a test which requires the code from LuaDB, this test is run in a pipeline on GitLab CI/CD in said shared registry. I get an error during the execution of this test, stating the following:
spec/serializer_spec.lua:36: module 'luadb.manager.AST' not found:No LuaRocks module found for luadb.manager.AST
Now I tried to directly clone the repository and set it up in the registry (a docker image basically which now has LuaDB), which did not seem to work as the error stays the same. Then I tried to include LuaDB as a submodule for LuaServer, but this still did not solve my problem. Is there a way to work this out?
Try using curl to get files from gitlab repo (check gitlab api)
Gitlab CI/CD pipeline when using it's runner (gitlab shared runners or custom runners) they use a default path that exists on $CI_PROJECT_DIR env variable. so you can clone you code (luaDB) under $CI_PROJECT_DIR/your_existing_code_luaserver

Jenkins failing to clone Bitbucket links during Rspec Puppet unit tests

I'm trying to set up a Jenkins build to clone a Bitbucket link and run unit tests I've written against some Puppet modules. I've got Jenkins set up with an SSH keypair and have verified that it can clone the Bitbucket repository initially, but when the unit tests run and clone separate modules as part of the test, I get an error that the public key does not work.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I've verified that the build is running under the Jenkins user and that the keys are in the .ssh directory, what else can I try to fix it?
I was able to fix it by logging into the Jenkins Docker instance and using the SSH keypair from there instead of the one on the Jenkins server hosting the instance. It worked completely after I did this.

Dockerhub automated build: BitBucket repository with private submodules

I have a private BitBucket repository that stores my Dockerfile. This repository has two other private BitBucket repositories as git submodules. I setup an automated build process on Docker hub and added the public SSH key to my three private repositories on BitBucket. However, when the build runs, it successfully connects to the main private repository on BitBucket but fails when trying to get the submodules. I see the following error in the log file:
fatal: could not read Username for 'https://bitbucket.org': No such device or address
It seems like the build agent is trying to access the submodules via HTTPS, and obviously, fails as there is no web access setup.
Am I missing something or is it a limitation that I'll have to live with for the moment?
I figured it out. My .gitmodules had an HTTPS URL for that particular repository. I edited the .gitmodules file and changed the URL to SSH. Seems like it is building now :-)

Git plugin for Jenkins doesn't work with BitBucket repository

I have a project on bitbucket with git repository.
I want Jenkins job that pulls stuff from that repository. So I installed the Git Plugin.
I configure My Jenkins job to use git repository. I add credentials I use on BitBucket. Then I enter repository URL like this:
https://PawelRoman#bitbucket.org/PawelRoman/myproject.git
I'm getting the following error in red:
Failed to connect to repository : Failed to connect to https://PawelRoman#bitbucket.org/PawelRoman/myproject.git using credentials PawelRoman on BitBucket (status = 401)
401 seems like an authorization issue, but what can possibly be wrong? When I run git clone command manually from the server where I have Jenkins installed, using exactly the same repo URL and exactly the same credentials - it works without any issue. I am 100% sure the credentials are OK and repository URL is fine. How can I track down the cause of the issue?
Found out what the issue was. Repository URL was incorrect. For some reason jenkins git plugin does not allow for Username# in the repository URL.
So instead of https://PawelRoman#bitbucket.org/PawelRoman/myproject.git
You need to use
https://bitbucket.org/PawelRoman/myproject.git
And it will work.
User this url to get the project from the bitbucket
https://<user>:<pass>#bitbucket.org/<user>/<project>.git

Resources