Build - frontend stage is skipped in Pipeline - s4sdk

I am trying to execute the front-end stage in pipeline. But it is skipped in the pipeline. I added below code in pipeline_config.yml file.
executeNpm:
dockerImage: 's4sdk/docker-node-chromium'
Can someone please help?
Thanks,
Sankeerth

The issue might be that your project does not have a package.json file. The whole front-end part (build and test) of the pipeline is skipped, if this is not the case. If you have created your project using one of your Maven archetypes (which is the recommended way), you're probably missing package.json and the frontend application itself. An example for an application which includes a frontend is the CostCenter Controller in our example projects. The frontend application is under the path application/src/main/resources/static in that project.
Side note: It should not be necessary to configure the Docker image used for running the front-end tests, unless you have special requirements which are not met by our default image.
Hope this helps,
Florian

Related

Is there a way to run cypress test to test web application deployed on AWS in different environments?

I can give the URL in cy.visit to point to deployed application, but I am not clear on the setup, as I don't have CI/CD yet. The goal is to be able to run this test on a button click, not having to checkout workspace and build the application.
I can give the URL in cy.visit to point to deployed application, but I am not clear on the setup, as I don't have CI/CD yet. The goal is to be able to run this test on a button click, not having to checkout workspace and build the application.
Yes, you could test your application directly on a staging/preproduction environment on AWS without A CI/CD.
However, I would not recommend using Cypress against a production environment because for E2E testing to be efficient, you will probably create/delete/edit many things, which may not be suited for a prod env.
Finally, it depends on what you try to achieve with your tests. In general, you will use Cypress to ensure your product works as expected after adding a new feature, for example. You always want to test against the latest version of your code.
On the setup, the E2E tests can be packaged in the project and run manually until you have a CI to execute them automatically.
https://docs.cypress.io/guides/guides/command-line#cypress-run

Rest api to get sonarqube info from bamboo build or vice versa

Is there any way I can get any sonarqube api which can provide the build number of bamboo or any bamboo api which can give sonarqube info.This would really help.
I have so far tried both side but i am surprised both the system are quite clueless about each other. Why it is not possible that a build which ran sonarqube as as one of it's job doesn't have any information about that. Also neither in sonar it tell which build has actually triggered that sonar execution
(Not sure I understand what exactly you are looking for, perhaps this ...? )
I don't believe you can relate a specific Activity (SonarQube analysis) to a specific build (Bamboo), just project to job.
You must have SonarQube Server configured in Bamboo
When executing your job, you can add these sonar.links optional parameters to the analysis step:
sonar.links.homepage Project home page.
sonar.links.ci Continuous integration.
and
sonar.links.scm Project source repository.
sonar.links.issue Issue tracker.
Maybe also specify sonar.host.url=$SONAR_HOST_URL (where SONAR_HOST_URL is the global setting in Bamboo) in the analysis step parameters.
Those populate the Project Overview page sidebar:
That should provide the links from SonarQube back to the other systems of interest.
If you have properly configured Bamboo, you should see a link in Bamboo to the SonarQube project, post execution.

Node (maven) to deploy the application to several environments

On Jelastic, I created a node for building an application (maven), there are several identical environments (NGINX + Spring Boot), the difference is in binding to its database and configured SSL.
The task is to ensure that after building the application (* .jar), deploy at the same time go to these several environments, how to implement it?
When editing a project, it is possible to specify only one environment, multi-selection is not provided.
it`s allowed to specify just one environment
We suggest creating a few environments using one Repository branch, and run updates by API https://docs.jelastic.com/api/#!/api/environment.Vcs-method-Update pushing whole code to VCS.
It's possible to use CloudScripting technology for attaching custom logic to onAfterBuildProject event and deploying the project to additional environments after build is complete. Please check this JPS as an example of the code syntax. Most likely you will need to use DeployProject API method.

How to use a certain sonar server in sonar-maven-plugin

I've successfully built up a SonarQube server, and I wrote several custom rules to review the code. Now, I can use the server and custom rule with Jenkins and with Maven only when the code is on the same server.
My question is when I develop maven project on another computer, and I want to use maven build or maven install, how can I still use the certain SonarQube server? Simply add plugins in the pom.xml can't use the SonarQube server I established, and the custom rules I developed are also not taken into effect.
As stated in the docs, you only need to make sure the address of your SonarQube server is available to the analysis. Beyond that, you should provide the token of a user with analysis permissions (and 'create project' permissions if the project doesn't already exist) and analyze away.
Of course, this pre-supposes that your SQ server is visible on your network.

Building JAR files in a Heroku app

I have a web app running on Heroku from which I need to build and make available a JAR file when a user of the app requests it. I also need to run ProGuard on the generated JAR file. Is it possible to do this on Heroku?
We're working on exposing Heroku build infrastructure as services and what you describe is a use case that we want to support. You might be able to get something working by using or reverse-engineering heroku-push: https://github.com/ddollar/heroku-push
Here's the server-side bit that actually builds code: https://github.com/ddollar/anvil
Ryan Brainard has built a Java wrapper for Anvil: https://github.com/ryanbrainard/janvil

Resources