I need to start jenkins build job from Intellij, from terminal it works:
sudo java -jar jenkins-cli.jar -s http://localhost:8080/ build job-x/master -s -v
Intellij allows to create jar build configuration, but it doesn't allow to run jar files with administrator rights. So is there way to create build configuration in Intellij which runs jenkins-cli.jar?
Initial problem: need to run and debug jenkins pipeline script.
Related
I’m configuring a very simple CI job. GitLab Runner is running on my own server, the specific runner for this project has been registered, with the shell executor, as I want to simply run shell commands.
stages:
- build
build:
stage: build
script:
- npm install
- npm run build
artifacts:
paths:
- "public/dist/main.js"
only:
- master
The job fails at the first command, npm install, with npm: command not found. I just installed npm and node via npm. If I SSH on my server and run npm -v, I can see version 8.5.5 is installed. If I sudo su gitlab-runner, which I suppose is what GitLab Runner is running as, npm -v works just as well.
I installed npm while gitlab-runner was already running. So I ran service gitlab-runner restart, thinking that it had to reevaluate its PATH, but it didn’t fix the issue.
I fixed it by simply adding this command before npm install: . ~/.bashrc.
I’m not sure why gitlab-runner didn’t properly read .bashrc before, even though I restarted it. Maybe it’s not supposed to? That would be contrary to what’s said in the GitLab CI runners docs.
N.B.: A key element in me being able to debug this was to clone the repo on a folder on my server, cd into it, and run gitlab-runner exec shell build after any (local) change to .gitlab-ci.yml. Skipping the whole commit + push + wait was a huge time (and sanity) saver.
I want to use gerrit v2.16.7 with the gerrit plugin for IntelliJ IDEA.
The errorlog in IDEA says that I need a download-commands plugin. How do I install it?
The easiest way to install the latest version of download-commands plugin on your Gerrit v2.16.7 is:
ssh to your Gerrit server
change your current directory to the $GERRIT_SITE/plugins
run curl -O https://gerrit-ci.gerritforge.com/view/Gerrit/job/Gerrit-bazel-stable-2.16/lastSuccessfulBuild/artifact/gerrit/bazel-bin/plugins/download-commands/download-commands.jar
Gerrit will automatically detect the new plugin and load it without any downtime.
HTH
Luca.
You can install the correct version of the download-commands plugin with the configurator from gerrit:
java -jar gerrit.war init -d {path to gerrit home e.g. ../} --install-plugin=download-commands
All the options should be by default, what you already configured except the option to install download-commands.
Source
We're working on a small docker image container for windows to run a specflow test in a dotnet core projecct. The problem we have is that we can't get chromedriver to work as well as running the dotnet test command.
The specflow project we're running just contains one hello world testcase which we can run without chromedriver, but then we get the error message "OpenQA.Selenium.DriverServiceNotFoundException : The chromedriver.exe file does not exist in the current directory or in a directory on the PATH environment variable."
We're providing an instance of chromedriver in the project so we don't have to download it.
The dockerfile we're running:
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
COPY . .
ENV PATH="/src/chromedriver:$PATH"
RUN dotnet test
We're using this command to run it: docker build . --build-arg HTTP_PROXY=http://PROXY:8080 --build-arg HTTPS_PROXY=http://PROXY:8080 --rm
We expect the specflow tests to run with chromedriver. When we run the dockerfile we get the error message "'dotnet' is not recognized as an internal or external command, operable program or batch file." It seems that the chromedriver is not added correctly to the PATH variable. We need it there to be able to run the specflow tests.
Does anybody know how to configure the dockerfile to work correctly with chromedriver?
Thanks for your time.
I am using cypress testing server.
When I am running my tests with cypress window, its working right.
$./node_modules/.bin/cypress open --project tests/e2e/
But when I am trying to run it with command line, my tests didn't worked.
In screenshots I see, that my link doesn't loading and my page is empty and my tests result is false.
I am running with selected command
$ ./node_modules/.bin/cypress run --config pageLoadTimeout=10000,watchForFileChanges=false --project tests/e2e/
How I can run my tests with command line
First you should navigate to your project folder, for example if your cypress test is lying in below folder
C:/Project/
From the command prompt you should cd to the project folder, ie cd C:/Project/, now copy the cypress bin path as follows C:\Project\node_modules\.bin\ paste the path and then from there run the following command:
cypress run C:\Project\cypress\integration\examples\test-spec.js
note: This is tested and run in windows 10 environment
I have tried to build the Hadoop MapReduce eclipse-plugin from source, but get the following error.
SRC_BASE_DIR/hadoop-common/hadoop-mapreduce-project/build/ivy/lib/Hadoop/common
does not exist.
I cloned the Hadoop source from the Apache GIT repo and managed to build the actual Hadoop binaries using the following commands
cd SRC_BASE_DIR/hadoop-common
mvn clean install
This was successful so next I changed directory
cd SRC_BASE_DIR/hadoop-common/hadoop-mapreduce-project/src/contrib/eclipse-plugin
I appended eclipse.home property to the build.properties file...
echo "eclipse.home=/opt/eclipse" >> build.properties
then tried to build the plugin...
ant jar
But I still get the error outlined above.
What am I missing?
OK I was missing a step.
In the folder
SRC_BASE_DIR/hadoop-common/hadoop-mapreduce-project
I ran the following command
mvn -DskipTests install
which was successful. Then in folder
SRC_BASE_DIR/hadoop-common/hadoop-mapreduce-project/src/contrib/eclipse-plugin
I ran the command
ant jar
and this time it was succesful and created the JAR file hadoop-1.0.2-eclipse-plugin.jar
Now, I just hope that that the plugin works!