I am using Jenkins pipeline and Cypress. In Cypress I am using environment variable, but I didn't push the cypress.env.json to the git server.
From Jenkins pipeline, the test project is pull from git server, and continue with cypress run, but the problem is all the url path is define in the env.json file, since the cypress.env.json is not push initially, I hit with path not found problem
How can I solve this problem?
This is neither cypress issue nor jenkins. It looks like how you are committing the file and the path of that file. However I want to take a look at the issue and help you if you can provide the cypress.env.json file and full error log that you are getting.
Please show how you are committing this file to git repo so that we can pinpoint the issue.
Related
I have created a pipeline project with a bitbucket git project. It is checking out the Jenkins file using https://Username#bitbucket.org/myproject.git
No problems there.
I have created a multi branch pipeline project to the same bitbucket git project. I used the same credentials as the single pipeline project but now it is NOT checking out the Jenkins (or other) files.
It keeps complaining about: "could not read Password for 'https://Username#bitbucket.org': terminal prompts disabled"
I tried to use the SSH variant but that does not work at all even for the single branch pipeline project it is causing problems so that might be a completely different problem.
Is there a difference between single branch pipeline and a multi branch pipeline I need to know wit regards to user credentials?
If more information is needed the please let me now.
I want to trigger a Jenkins job for a maven(v3.5.3) project from my local work space folder location instead of configuring SVN Repository URL in the Source code management section. Is there a way to achieve this?. I need to test with code modifications in the project and not wanting to commit the changes, that is the purpose.
I am using Jenkins (v2.161) and it is installed in another machine.
Thanks in Advance.
Although it might look like a sort of tinkering, the source code can be pulled to the Jenknins' host from your local machine, provided that they are properly configured to communicate via ssh.
In the project build configuration on Jenkins' host:
Do not use "Source Code Management" (choose "None").
Check "Delete workspace before build starts", to avoid conflicts with previous changes.
As the very first build step, add "Execute shell" and write a few commands that pull the data, for example:
scp myusername#myhost:/path/to/myworkspace/myproject/src .
scp myusername#myhost:/path/to/myworkspace/myproject/pom.xml .
# etc for all the files/dirs you need to build the project
Then continue with the build steps that were already used for building the project from SCM.
Consider a situation where a test is failing in a golang project, say "github.com/originaluser/reponame".
A person who wants to fix the bug forks the repo into github.com/forkeduser/reponame" and then go gets it into his local machine.
The test will fail on his machine even after he fixes the bug if the test file is importing from "github.com/originaluser/reponame" because his changes have not been merged with the original project.
How does testing work in such a scenario?
The only resource I found was a splice.com blog
Just a short and simple solution it to clone the forked repository into the original repository path.
Step 1: create the path github.com/originaluser/reponame inside your gopath.
Step 2: change the working directory to your new folder
Step 3: git clone github.com/forkeduser/reponame.git
Step 4: fix the bug
Because now your fix is inside the original path, everything works.
I'm new to GitHub and mainly going to be using it to backup service and to show off code. Anyhow, I'm trying to get my latest program up there and am getting the error in the title of this thread when I try to push.
Repro steps:
Sit in Starbucks with crappy wifi (Could this be related to the problem? Serious question.)
Open latest version of GitHub for latest Macintosh operating system
File --> New Repository
Local Path --> the folder that contains my XCode project
Name --> give it a name
Publish
Sync
Push .... Get error
Look in my XCode project's folder and it looks like an empty subfolder with the name of my GitHub project was created there. Huh?
I had these issues, I followed these steps to resolve.
cd /directory
git init
git add .
git commit -m "Name of Repo"
I then opened the github desktop application and dragged the folder over.
All my files are now available and I can make commits. Hope this helps.
I received a similar error using GitHub Desktop on OS X. I got the error when trying to commit files for the first time to a newly created repository. The error message was something along the following: Failed To Get Head (Unborn)
The steps I followed to create the error were:
Created a new repository on GitHub.com
Cloned the empty repository using GitHub Desktop
Created a new project locally on my computer inside the directory I cloned the repository to in step 2.
Using GitHub Desktop, tried to commit the files. This is when I got the error.
To "fix" this, I went to GitHub desktop and created a ReadMe for the repository. I then 'Synced' the repository on GitHub Desktop and was able to commit.
This error can appear if you did not initiate the repository. make sure to check the box saying "Initialize this repository with a README"
In my case all I needed to do was to run:
git add -A
After this I was successfully able to commit through the GitHub client.
I was using Xcode and I copied some files into the folder with my project and they were not automatically added to the git (hence the error).
git reset
And then come back to GitHub Desktop. That works in my case.
Certainly not the Starbucks Wifi.
This happened to me with the official GitHub client when I tried to make an initial commit, I then tried again using the inbuilt versioning module within my code editor (Intellij IDEA) and it worked just fine.
I won't even hazard a guess to the cause of the problem, but try a different GIT client if you need a potential quick fix.
Please try to commit first and try to push. I am also very new to git, I used to SVN a lot, It worked for me after initial commit.
I am trying to implement automated builds using Jenkins for my iOS projects. I added the Git plugin, but as soon as I try to put the URL for git in the git configuration for the project, it is showing the error in the screen shot below. Here Jenkins cannot clone from the repo to its workspace.
For the "Repository URL" field it is expecting a remote repository URL, something like git#github.com:github/hubot.git. It will use that url to copy down code to run the job against.
If you just want to run a job in a particular directory where you already have the code you want to work against, then leave this section empty. You can set the directory that you want to run a job in by
1. scroll to the "Advanced Project Options" section
2. click "Advanced"
3. Check "Use custom workspace"
For one off things, this is fine, but if you use this a lot, I think you'll find it more useful to commit your code to github and have jenkins clone down a fresh copy of code for each run.
You will get that error if you miss the following cases:
Whenever the clone URL is wrong.
When you are trying to clone from a place where you don't have the
access to git server.
Whenever your Pem key is not added to the list of keys on the git
server.
In most cases git bare repo has extension .git
I mean (other)/test1 dont look correct, i think it should be (other)/test1.git had this same error on my mac.
Actually i solved the issue . it was because of the permission the remote git is not updating properly