Use firefox for Selenium in CircleCI 2.0 - ruby-on-rails

In my CircleCI config.yml file I have the following:
docker:
- image: circleci/ruby:2.5.3-browsers-legacy
In the CircleCI docs it says that by attaching -browsers-legacy to the language it will include Chrome, Firefox, Java 8 and PhantomJS
And I also tried adding to the config.yml:
- image: selenium/standalone-firefox:3.141.59
But I am still getting the error:
Unable to find Mozilla geckodriver. Please download the server from https://github.com/mozilla/geckodriver/releases and place it somewhere on your PATH. More info at https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver.
(Selenium::WebDriver::Error::WebDriverError)
What config should I use instead?

Related

AspNetCore:2.1 not found

Created a new .NET CORE 2.1 (preview) web app. Running it in local docker with Linux container
I am getting compiler error:
Error Building blobtest
Service 'blobtest' failed to build: manifest for microsoft/aspnetcore:2.1 not found.
My dotnetversion
C:\WINDOWS\system32>dotnet --version
2.1.300-preview2-008530
They have changed the repo for .NET Core 2.1 onwards to microsoft/dotnet.
Change your FROM statement to reference microsoft/dotnet using the following tags:
2.1-sdk
2.1-aspnetcore-runtime
2.1-runtime
Documentation on how to upgrade can be found here
I had this issue as well. I thought I'd update this post to show the fix here. Thanks to Marius Bidireac for the link to the resource.
Here is an excerpt from the original docker file
FROM microsoft/aspnetcore:2.0 AS base
FROM microsoft/aspnetcore-build:2.0 AS build
Here is an excerpt from the corrected docker file
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
FROM microsoft/dotnet:2.1-sdk AS build
If you are using GitLab CI, then these images don't work—maybe because they changed the names of the images again. See official page on Docker.
If I used the labels suggested by this answer,
image: microsoft/dotnet:2.2
Then, it kept giving the errors,
manifest for microsoft/dotnet:2.2 not found
Solution to this was to use the recent naming convention provided by Microsoft. Please see the Docker link I provided above. In my GitLab CI (.gitlab-ci.yml) file I used the following and it worked,
image: mcr.microsoft.com/dotnet/core/sdk:2.2
Now the build pipeline succeeds just fine.

Error "plugin is in use but not enabled" in kong environment

We are trying to use the hello-world plugin described in this page - https://streamdata.io/blog/developing-an-helloworld-kong-plugin/
also we have tried this as well - https://github.com/brndmg/kong-plugin-hello-world
We are facing this error in logs:
2017/09/19 09:47:15 [error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/kong.lua:154: hello-world plugin is in use but not enabled
stack traceback:
[C]: in function 'assert'
/usr/local/share/lua/5.1/kong.lua:154: in function 'init'
init_by_lua:3: in main chunk
The Kong version we are using is 0.11.0.
Can someone suggest what could we be missing?
Kong raises this error because you are asking it to run a plugin called hello-world, without providing the code for this plugin.
This error is trying to say that this plugin is configured to be running on an API/Consumer in the datastore (PostgreSQL or Cassandra), but not added to the Kong configuration custom_plugins settings.
To load a custom plugin, you need two things:
The plugin must be installed in the LUA_PATH (refer to the docs here)
The plugin name must be added to the custom_plugins setting for Kong to load it (from the LUA_PATH)
You can edit your configuration file to make Kong load the plugin:
custom_plugins = hello-world
or specify it via an environment variable:
export KONG_CUSTOM_PLUGINS=hello-world
If you are still seeing this error, it could mean that you are not starting Kong with the configuration file you are editing. Start Kong in verbose mode to see what configuration file it is reading and what is the values of custom_plugins:
$ kong start --vv
You can read more on how to install and custom plugins for 0.11 in the Plugins Development Guide section of the website.
I fixed this issue by adding things in custom_plugins and lua_package_path .
Here are the steps to enable and use custom plugin in kong Env.
1 - Add custom plugin name in --- custom_plugins = hello-world
2 - Install hello-world plugin by using following steps ---
If you have source code of your plugin then move into it and execute the command --- "luarocks make"
it will install your plugin.
now you have to execute a command "make install-dev" make sure your plugin have makefile like as --
Once you execute this command "make install-dev". it will create lua file at a location something like that -
/your-plugin-path/lua_modules/share/lua/5.1/kong/plugins/your-plugin-name/?.lua
just copy this path and add it into the kong configuration file in lua_package_path
Something like that --
lua_package_path=/your-plugin-path/lua_modules/share/lua/5.1/kong/plugins/your-plugin-name/?.lua
Now you done your job.
Just start kong -- kong start --vv
You will see that the plugin loaded into kong plugin env.
#Enjoy

Getting 404 File Not Found on Apache 2.4, FastCGI and Ubuntu 14.04

My first step was install HHVM following this guide: https://github.com/facebook/hhvm/wiki/Prebuilt-packages-on-Ubuntu-14.04
Then i run the script with the command: ´sudo /usr/share/hhvm/install_fastcgi.sh
Then i test if hhvm was installed with command ´php -v´ and the output is OK, says that HIPHOP VM is runing.
The problem arrives when i try to access to a PHP file, Apache always return 404 error. In the other hand html files and static files works good. I only receive 404 error with php files.
I search on Google and found many people with same issue but no solutions. Perhaps someone can help.

phantomjs command not working on Jenkins

phantomjs command works perfectly fine on mac local.
However, unable to execute phantomjs command from Jenkins.Build console looks like
+ phantomjs hello.js
/var/folders/vf/hcw165tj0sg3s3p6czn4fz8c00007c/T/hudson6003717517243923017.sh: line 2: phantomjs: command not found
Can you please help on how to configure phantonjs on Jenkins?
Able to resolve issue by resolving PATH in JENKINS. PATH in Jenkins now points to executable for PhantomJS.
I followed Web page Capture and save to image using phantomjs lib and able to save screenshot on my local.
However when executing PhantomJS command with Jenkins, following error is generated:
"_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL." and screen shot is not saved on Jenkins.
Can anyone please guide me?

Using Jenkins' Testlink plugin

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

Resources