How to trigger email-notification after every build with attaching a html file in jenkins? - jenkins-plugins

I am new to Jenkins and i have configured email trigger but not understanding how to provide the path of the url to export the html file with the email trigger.
Below is the url of the html file
http://x.x.x.x:8080/view/WSM/job/WSM_Systemtest/lastSuccessfulBuild/artifact/logs/WSM_Systemtest_Build_231/testmap/231_WSM_Systemtest_testmap.html
Note: url changes after every build as the build name and number will change.
Please help

You will need to download the file to the workspace and then you can put the filename in the attachments field in the job config

Related

How to add a new html page to my react outlook add-in

I created a new outlook add-in using the react-taskpane option in the yeoman generator.
I need to insert a new html page to prompt it when there's no signed user is present.
This is the file structure:
I didn't change the manifest file. But, I included the following in the webpackconfig.js file:
new HtmlWebpackPlugin({
filename: "Handler.html",
template: "./src/AppCommon/Auth/Handler.html",
chunks: ["Handler"],
}),
When I run npm run build Handler.html gets included in the dist folder.
How can I prompt that page in a separate window? (The logic to check whether the user is logged in or not is not needed).
I used this line for that:
window.location.href = app.hostUrl + "/src/AppCommon/Auth/Handler.html";
And I'm getting this error:
Cannot GET /src/AppCommon/Auth/Handler.html
How can I define the path correctly?? Thank you in advance
First of all, if you want a separate window, don't use window.location.href. Use the Office.UI.displayDialogAsync method. For more details, see the official documentation: Use the Office dialog API in Office Add-ins
Secondly, I don't think you should have the /src in the URL, especially if you are in production mode and serving the file from /dist.

How can I call ReactJS chunk files via sharepoint master page without webpack configuration

I developed an application with ReactJS and got chunk files with npm run build. But how can I call these files via sharepoint master page. I just add the main chunk files to master page and loaded it but it never called the component and it doesn't render.
I uploaded the below files to the SiteAssets folder in SharePoint. I just the call main.553276c9.chunk.js via master page.
0.45984e43.chunk.js
0.45984e43.chunk.js.LICENSE.txt
0.45984e43.chunk.js.map
3.e5ccfe13.chunk.js
3.e5ccfe13.chunk.js.LICENSE.txt
3.e5ccfe13.chunk.js.map
4.bdcd656e.chunk.js
4.bdcd656e.chunk.js.map
5.41ddc0b8.chunk.js
5.41ddc0b8.chunk.js.map
6.cc7d4939.chunk.js
6.cc7d4939.chunk.js.map
main.553276c9.chunk.js
main.553276c9.chunk.js.map
runtime-main.85cbbfa2.js
runtime-main.85cbbfa2.js.map
Most build systems that generate files like this should also generate an index.html file that should load and run your app. You should upload that html file, along with all js files, and run your app from that.
If you're using Create React App with react-scripts the index.html should be in build/index.html.
According the documentation runtime-main.85cbbfa2.js is file to include.
runtime-main.[hash].js
This is a small chunk of webpack runtime logic which is used to load and run your application. The contents of this will be embedded in your build/index.html file by default to save an additional network request. You can opt out of this by specifying INLINE_RUNTIME_CHUNK=false as documented in our advanced configuration, which will load this chunk instead of embedding it in your index.html.
Just note that that filename will change when the code changes. The build process will update your HTML file, with that new filename. So you definately want to be in the habit of uploading that.

How can I download zip file using angularjs

I am using angularjs.I am getting zip file URL from the server.
I am using below code to download my file.
Example 1
Filename comes from the angular controller.
From the above code I will be able to download the file but in the download folder.How can I download that file in specified location ?
just open that link in new tab it will automatically be download.
window.open(wholeURLToDownload);

How to add a version number to war file in web application development?

I am a beginar of m2e application development by using eclipse(kepler) and my server is jboss 7.1.1 final.I have two war files,one is for client and second is for server .I have an url pattern such as "myproject.com".Now my question is I want to access the data which is present in server war file even I made a changes i.e added the version number to war file for example "Server.war" to "Server0.0.1-SNAPSHOT.war" by using pom.xml file of my project.Would you please explain me what are the changes I need to do in my pom.xml file.
Thanks in advance,
Prasad
I am assuming that you want to keep the same web context despite the war file's name or whatever... In Jboss AS7 you can set the war's context root using the jboss-web.xml deployment descriptor. Just create the file into your_war/WEB-INF folder with this content,
<jboss-web>
<context-root>Server.war</context-root>
</jboss-web>
With maven you can package/install the war using a custom name and concat the version number if you want.
Set a custom name using <finalName> tag inside the build section, for example:
<finalName>ServerAnotherName-${project.version}</finalName>
Removing the tag, the default name will be ${project.artifactId}-${project.version}

move_uploaded_file in php not working on heroku

I am uploading images using move_uploaded_file function in php code, but it does not saving the images in a images folder of my app on heroku.
following is the code:
if(move_uploaded_file($bannerfile['tmp_name'],$bannerfilepath)){
...
}
filename and path are correct but images are not saving.
First thing you should do is to check your folder permission, assign a proper permission to the folder which you want the image to be uploaded, (read + write permission).
If it fails, tries to debug your data and make sure the data is correct.
And also, what is the max file size and post_max_size in your php.ini? If the file is bigger, then PHP will stop this and the data will be empty.

Resources