I've gone through the ReportPortal docs and it states which appender should be used to send logs to report portal.
I guess what I'm missing here is how to configure where is ReportPortal configured in the first place (i.e., what's the host name & credentials that should be used, etc)
Thanks
first of all you need to male test framework integration
http://reportportal.io/docs/Test-Framework-Integration
choose one relevant to you.
And main config for those integrations stays in reportportal.properties file
http://reportportal.io/docs/JVM-based-clients-configuration
Related
As per the document shown here.
I need to provide Additional classpath and configuration file. I am not getting from where I can get the configuration file. If anyone can help me.
You must create it using any text editor. Use the sample configuration.xml found on the plugin wiki as a template. Configure the host names, ports, usernames and passwords to match your environments.
I am using Folder plugin and AD groups to control access to folder. This morning a team can't access their project anymore and later I found the AD group assignment in Assign Roles has been changed to wrong groups. Is there a way to find out which id did it? We only have a few admin ids.
Jenkins does not appear to keep an audit trail by default, as stated in this post on cloudbees.com, the folks that develop Jenkins.
The relevant lines:
Many Jenkins users look for a recommend a strategy for keeping an audit trail. This article is supposed to be a gap filler until more comprehensive compliance capabilities in JE/JOC are developed.
There are two open source plugins that enable you to track “WHO did WHAT?” in Jenkins:
...
The first plugin listed is Audit Trail Plugin which looks to provide exactly what you are seeking.
The description from the plugins page:
Keep a log of who performed particular Jenkins operations, such as configuring jobs.
This plugin adds an Audit Trail section in the main Jenkins configuration page. Here you can configure log location and settings (file size and number of rotating log files), and a URI pattern for requests to be logged. The default options select most actions with significant effect such as creating/configuring/deleting jobs and views or delete/save-forever/start a build. The log is written to disk as configured and recent entries can also be viewed in the Manage / System Log section.
I spent a few minutes looking through Jenkins various xml and log files, but could not find a log that contained something useful (username and/or timestamp). In this case it seems user auditing isn't built into Jenkins as of yet. Unfortunately it appears that you might not be able to determine who made those changes after the fact.
I have an ASP.NET MVC web application deployed to Azure. I'm reading my setting using the GetEnvironmentVariable(...) method.
The problem is that I can't find a way to define this environment variable in Azure Portal. Where can I do that?
I don't want to have this stuff in a file. Data that will be there are credentials.
I assume you are using Azure App Service (formerly known as Azure Websites).
To define your own environment variable, click to your site → All Settings → Application settings:
Add an app setting in the "App settings" section:
You can verify the value from the debug console.
Going to https://{your site name}.scm.azurewebsites.net/DebugConsole:
In the new version 2021 go to the resource -> Configuration.
Then click on "New application settings".
Then add "ASPNETCORE_ENVIRONMENT" as key and click on OK then Save.
Note that you must have the appsettings.(environment).json file for .Net Core.
I came across this question when facing the same problem myself. Well, just to give a clearer answer which I found at blog.elmah.io.
All you need to do is:
Include the new appsetting.{env}.json in the publishOptions in file project.json.
Go to Azure Portal and open the web application.
Select application settings.
Add an entry for ASPNETCORE_ENVIRONMENT and set it to whatever you want.
That's it.
I know OP specified in the portal, but command line is more repeatable. To do it using Azure CLI:
az webapp config appsettings set -n $webappname -g $resourceGroupName --settings ConnectionStrings__Default=$connectionString
To set an environment variable ConnectionStrings__Default to the variable $connectionString
(2019 version) Navigate to your AppService in the Azure cloud portal then Configuration.
Actually this solves my problem (which I found yesterday - and it's on Scott Hanselman's blog also):
Best practices for private config data and connection strings in configuration in ASP.NET and Azure
TLDR;
Put settings in a separate file that doesn't go to the repository and are not being deployed to the server. Next define missing variables in app settings like Xiaomin Wu showed.
In these modern times, when publishing from Visual Studio 2019, on the publish page there is a link called "Manage Azure App Service settings". In there you can create and define environment variables that get set when you publish. Very easy if you know where to look!
I am creating files with a custom version number during the build that I want to be publicly available through http.
Assuming I am building the project "MyTestApp", I want the version number text file I created to be available at a location like http://jenkins.company/job/MyTestApp/revision.txt
Any idea how to achieve this?
David, this depends on what you mean by "publicly available". If your Jenkins instance is secured (jenkins.company/configureSecurity/), then access to artifacts requires that your http session be authenticated. If all users who need access have accounts on the Jenkins server, then you just need to use the post-build action "archive the artifacts", and your text file would be available here:
jenkins.company/job/MyTestApp/jobnumber/artifact/revision.txt
Or here:
jenkins.company/job/MyTestApp/lastSuccessfulBuild/artifact/revision.txt
See this screenshot: http://note.io/17oiykI
If you need unauthenticated access, you could publish your artifacts to another web server on the same or a different host. Or you could upload them to an Amazon S3 bucket.
I have a JEE6 project based on Glassfish 3.1.1 that is moving beyond the "one developer prototype" stage to being developed by a team.
Each member of the team will have their own local glassfish server. I don't want each of them to have to go through all the manual steps of setting up the JDBC connection pool, JMS services, jdbc security realm, etc via the admin console, as I did when first developing the prototype. It is error prone, and plus if I want to change something I have to tell everyone what to do. I want it to be done as part of the ant build, so that it is a one-clicker, and then if I have to change something I can just tell them to do a clean to blow away the domain and then run it again. So there would be an ant task to "config-glassfish" that would somehow configure the domain for them.
Despite extensive searching, I can't seem to find any step-by-step guide of how best to accomplish this. Anyone have a link?
Would it be best to attempt to capture the fully configured domain and store that in our src repository?
Or should I instead have ant issue "asadmin" commands to create and configure the domain?
You can do all of this with the sun-appserv-admin ant task. You can find more information here: http://docs.oracle.com/cd/E19316-01/820-4336/beaev/index.html
We struggle with this kind of thing at my work too, but only with a few developers. One thing I really like is that Glassfish has the concept of a resources.xml which will cover a lot of the config. I use this to pass around connection pool configs and JMS queues and it works really well, but it might not cover all your config needs. The contents of the file are pretty much snippets from the domain.xml, and I haven't figured out everything it can do yet. http://docs.oracle.com/cd/E19798-01/821-1751/ggoeh/index.html http://javahowto.blogspot.com/2011/02/sample-glassfish-resourcesxml.html
I haven't tried other ideas since the resources.xml solves my major pain points, but you could take your domain.xml and work through any issues brought up by copying it to another developer's domain, then do variable replacement on the part of the file that need it. That way you could have ant create the domain, then overwrite the domain.xml with the newly filled out one.
Maybe there is a way you could use asadmin backup-domain
One other idea would be Chef. http://wiki.opscode.com/display/chef/Home
I ended up just putting the domain.xml into the src repository, making an ant task to copy it over to the glassfish directory, and instructing other developers that when running that ant task, they should make sure glassfish is not running.
This worked for my case...