Using Jenkins' Testlink plugin - jenkins

Hi i'm trying to implement testlink plugin in jenkins.
I followed this tutorial http://tupilabs.com/books/jenkins-testlink-plugin-tutorial/en/book.pdf
I can build the project but the test isn't run.
there is a file not found error
I don't understand where i have to put my testfile. I supposed the output format must be TestNG, but where i have to put it ?
Thanks for your answer

I had exactly the same problem with building project, when I was following through tutorial placed in book Jenkins:The Definitive Guide.
I had Jenkis (jenkins-1.502.msi) instaled on Windows7 64 as a service - whatever I tried always received:
[workspace] $ mvn.bat
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: Cannot run program "mvn.bat" (in directory "C:\Work\jenkins\jobs\gameoflifedefault\workspace"): CreateProcess error=2, The system cannot find the file specified
Unfortunately I didn't managed to resolve this jenkis service problem but found another solution to make it work on Windows:
Use Apache Tomcat java server - if you have properly configured Tomcat do:
Download jenkins.war
Place it in webapps folder in your Tomcat directory
Run Tomcat and check via http://localhost:8080/manager if jenkins is there
Go to http://localhost:8080/jenkins
Now mvn.bat is seen and my build run without problems.
Ofcourse I understand that maven is properly configured on your system - so you should had specified in environmental variables:
variable: M2
value: %M2_HOME%\bin
variable: M2_HOME
value: C:\yourPathToMaven\apache-maven-3.0.4
variable: PATH
add to existing value: %M2_HOME%;
To check if maven is visible type in comand promp:
C:\Users\x>mvn --version
You should get something like:
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: C:\Work\Maven\apache-maven-3.0.4
Java version: 1.7.0, vendor: Oracle Corporation
Java home: C:\Work\ja\jdk1.7.0_10\jre
Default locale: en_US, platform encoding: Cp1250
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Hope it helps.

Update : I found that the error was :
Cannot run program mvn.bat in directory d:/jenkins/jobs/JobTest/workspace CreateProcess error=2 File not found.
I made a free style project as said in the tutorial. It seems to be a maven error so i don't understand ...
If somebody can help me i'd be gratefull

Related

After installation of Hyperon not able to browse http://localhost:38080/hyperon/app

I have installed Hyperon a business rule engine on windows machine.
I have fallowed instruction to install it from:
- https://www.hyperon.io/tutorial/installing-hyperon-studio
After installation I have browse below URL to see whether #Hyperon web app is running or not.
http://localhost:38080/hyperon/app
I am getting this error:
Error Screenshot
Reproduceable Steps:
Downloaded hyperon zip and extracted it.
Open the file directory and reach to the /bin folder
Opened it in command prompt:
Ran startup.bat file.
Refer to below screenshot:
command prompt logs
tomcat command prompt logs and output after executing- startup.bat
Such effect occurs when trying to run hyperon with JDK 8.
Hyperon Studio requires JDK 11.
See installation guide:
https://www.hyperon.io/tutorial/installing-hyperon-studio
If you have multiple JDKs installed, you can swith to proper by setting JAVA_HOME variable:
for example:
cd c:\hyperon-studio-2.1.9\bin
set JAVA_HOME=c:\java\jdk-11.0.4
startup.bat
The first run may take a minute, because hyperon needs to initialize database schema.
Once it is fully started you will see hyperon.log file and should be able to access localhost:38080/hyperon/app.

Maven upgrade unable to run package appengine:stage

I have a Java 8 Spring Boot app that is deployed to Google App Engine and being built via GCP CloudBuild. I am trying to upgrade it from Java 8 to Java 11.
In the cloudbuild.yaml file, I changed:
- id: 'Build and Test'
name: 'gcr.io/cloud-builders/mvn:3.5.0-jdk-8'
args: ['package', 'appengine:stage']
to:
- id: 'Build and Test'
name: 'maven:3.8.3-jdk-11'
args: ['package', 'appengine:stage']
When I run the CloudBuild, this step now suddenly fails with the following error:
docker.io/library/maven:3.8.3-jdk-11
/usr/local/bin/mvn-entrypoint.sh: 50: exec: package: not found
In its previous configuration, it was running just fine. The entire cloudbuild.yaml file is:
steps:
- id: 'copy file'
name: 'ubuntu'
args: ['cp', 'src/main/appengine/app.yaml', src/main/appengine/app.yaml]
- id: 'Build and Test'
name: 'maven:3.8.3-jdk-11'
args: ['package', 'appengine:stage']
What is going on here? Does the gcr.io/cloud-builders/mvn:3.5.0-jdk-8 image somehow understand mvn package appengine:stage, whereas the maven:3.8.3-jdk-11 image doesn't? Mainly I just need someone to help me understand why I'm getting the error. If anyone could also lend some suggestions for how to fix or circumvent it, that'd be greatly appreciated as well. Thanks in advance!
Reviewing Google documentation about migrating to the Java 11 runtime, I found that App Engine standard environment allows you to use several of App Engine's packaged services and APIs in the Java 11 runtime, reducing runtime conversion effort and complexity.
The Project Engine API JAR allows your Java 11 app to contact the bundled services APIs and access most of the same functionality as the Java 8 runtime.
You can also use Google Cloud products that are equivalent to the App Engine packaged services in functionality.
Adding overview of the migration process documentation.
The process to follow is:
Download Cloud SDK.
Migrate from the standalone App Engine Maven plugin to the Cloud
SDK-based Maven plugin or the Cloud SDK-based Gradle plugin.
Install the App Engine API JAR if you are using the App Engine
bundled services.
Migrate your XML files to the equivalent yaml files.
Now, regarding the issue you are getting, you should specify the whole path of the script because /usr/src/app may not be in your path. You must also ensure that your entrypoint.sh is executable; however, depending on your circumstance, docker will duplicate the permissions precisely as they are on your build host, so this step may not be necessary.
Additional suggestion is that you can't use single quotes ' for the entrypoint/command, you can try with “,
It was so obvious in hindsight. I needed to specify mvn as the entrypoint command in the step like so:
- id: 'Build and Test'
entrypoint: mvn
name: 'maven:3.8.3.0-jdk-11'
args: ['package','appengine:stage']

Failed to generate a native image: GRAALVM_HOME was not set

Failed to generate a native image: GRAALVM_HOME was not set (MacOsx)
I have set the classpath, running the set command gives me,
GRAALVM_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-19.0.0/contents/home. java -version points to OpenJDK GraalVM CE 19.0.0...
I was expecting to successfully build native quarkus images
I was able to resolve this, thanks to Marcus Biel, Quarkus is not ready for Java 11, So I pointed JAVA_HOME to java8, so I set up an alias to enable easy switching between J8 and J11 as it may be required in different projects.

Bazel internal shell issue using windows

I am trying to migrate a huge project having visual studio and maven projects to bazel. I need to access our in house maven server which is encrypted. To get access I need the load the maven_jar skylark extension since the default impl does not support encryption (get error 401). using the extension leads to a lot of troubles, like:
ERROR: BUILD:4:1: no such package '#org_bouncycastle_bcpkix_jdk15on//jar': Traceback (most recent call last):
File ".../external/bazel_tools/tools/build_defs/repo/maven_rules.bzl", line 280
_maven_artifact_impl(ctx, "jar", _maven_jar_build_file_te...)
File ".../external/bazel_tools/tools/build_defs/repo/maven_rules.bzl", line 248, in _maven_artifact_impl
fail(("%s: Failed to create dirs in e...))
org_bouncycastle_bcpkix_jdk15on: Failed to create dirs in execution root.
The main issue seems to be the shell that needs to be provided to bazel in BAZEL_SH environment variables:
I am working under windows
I am using bazel 0.23.2
bazel seems to run a bash command using "bash" directly and not the one provided by env variable.
I got a ubuntu shell installed in windows. bazel was using everything from ubuntu, especially when using maven (settings.xml was using from ubuntu ~/.m2 and not from windows user)
after uninstalling ubuntu and making sure that bash in a cmd ends up in "command not found" I also removed the BAZEL_SH env var and bazel throws the message above
after setting the BAZEL_SH variable again it fails with the same error message
I am assuming that bazel gets a bash from somewhere or is ignoring the env variable. My questions are:
1. How to setup a correct shell?
2. Is BAZEL_SH needed when using current version?
For me the doc at bazel website about setup is outdated.
Cheers
Please consider using rules_jvm_external to manage your Maven dependencies. It supports both Windows and private repositories using HTTP Basic Authentication.
For me the doc at bazel website about setup is outdated.
The Bazel team is aware of this and will be updating our docs shortly.

Jenkins service start error on red hat linux

The jenkins service does not start when ever i run jenkins service start . It says
Starting Jenkins bash: /usr/bin/java: No such file or directory
[FAILED]
I have java installed at /usr/lib/jvm/jdk1.7.0_51. The JAVA_HOME variable is also set. Also tried adding this java to /etc/init.d/jenkins file. I need to use the sun jdk, not open jdk.
Tried some of the alternatives from stackoverflow as well but did not work out.
Any suggestions will be of great help.
Thanks,
Bhargav
Thanks Paul. The script inside /etc/sysconfig/jenkins needs to be edited. Else it uses the default java.
JENKINS_JAVA_CMD="path of java installation"
Along with the above script, one can make changes to /etc/init.d/jenkins file if needed to add the path of java installation in your system.
I'd guess that there's a script that has /usr/bin/java hardcoded. When you find the culprit, remove the /usr/bin so that it uses the default. Or you can change it to use the JAVA_HOME path, something like this:
JAVA_EXECUTABLE=$JAVA_HOME/bin/java
$JAVA_EXECUTABLE $JAVA_OPTS etc.. etc..

Resources