compile Release Pack it up zip file

dotnet clean : dotnet Command cleanup solution for

dotnet build : dotnet Command rebuild for

dotnet publish .\Hy.MyDemo.sln -c release -o WebSite
cd WebSite
del /F/Q appsettings.json : There is no need for appsetiing
del /F/Q appsettings.Production.json
del /F/Q appsettings.Development.json

rd /s /q C:\publish\Rar
md C:\publish\Rar
cd C:\Program Files\WinRAR

WinRAR m -r -ep1 "C:\publish\Rar\website.zip" "C:\publish\WebSite" : Compression requires downloading winrar Tools

2 download ssh plug-in unit

Configure user name and password

Build operations Send to linux The server

killall /snap/dotnet-sdk/109/dotnet
cd GameWebSite/Rar
unzip -o -d ../ website.zip
cd ..
chomd 777 demo.sh
sh demo.sh

demo.sh The contents of the document are as follows :

#!/bin/bash
cd WebSite
dotnet Hy.Fantasy.Web.dll --urls http://0.0.0.0:5009 &

Can't linux Ordered students , May put Windows Change the name of the file , Copy it directly , Because of the newline problem sh File cannot execute .

Here are the basic commands to create a new file and write it

vim test.sh Create a new file And open

When you find the cursor and you can type Input

#!/bin/bash
cd WebSite
dotnet Hy.Fantasy.Web.dll --urls http://0.0.0.0:5009 &

The next step is to save , Click Esc Without the cursor Press shite key + : key The cursor appears on the last line Input wq Document Save and exit

Later students found that , function dotnet After the command, the mission never ended Report timeout ,

The error message is

ERROR: Exception when publishing, exception message [Exec timed out or was interrupted after 120,005 ms]
Build step 'Send files or execute commands over SSH' changed build result to UNSTABLE

But the site has started , At this time, we will

sh demo.sh The order changed to   sh demo.sh > /dev/null 2>&1 & Found that the build task was successful

Jenkins Deploy the packaging file And pass SSH Upload to linux More articles about servers

  1. jenkins+svn Full package and upload to linux Server

    Because the company uses svn Version management tools and deployed in windows Server , So the test ring uses jenkins Two environments need to be deployed , One is local windows The server ,jenkins from svn Download the code, package it and upload it to li ...

  2. linux Under the ssh Instrumental , Local upload to linux The server and Linux Save server files as local . Not sftp Tools .

    First , When you have only one ssh Tools can connect linux, But you want to put the files in linux and windows( Local ) Direct switching . In fact, we can : In this paper, the reference 1. Put the local file , Put it in ssh The remote linux Server : First of all ...

  3. Use Maven Package the project and upload it to Linux The server

    Maven pack : Item right click Run as-->Maven build...-->  Come out the interface below , Pay attention to the red part ,Goals Fill in package It means packing , Below Skip Tests It means to play ...

  4. take windows Upload the file below to Linux Server

    Copyright notice : This article is an original blog article , follow CC 4.0 by-sa Copyright agreement , For reprint, please attach the original source link and this statement . Link to this article :https://blog.csdn.net/lx_Frolf/article/deta ...

  5. Upload the Chinese name file to linux The file name on the server will be garbled later (openoffice)

    1. The Chinese name file will be saved in linux The file name on the server will be garbled , But we go through SSH You can rename a file on the server directly in Chinese , And it turns out to be right , This shows that the server can support Chinese . 2. And why the upload ...

  6. How to upload large local files to linux The server

    The first way :  SecureCRT Next   To upload a file, just go to shell Enter the command in the terminal emulator “rz”, You can select the file on the local disk from the pop-up dialog box , utilize Zmodem Upload to the current path of the server .   Download the file just in s ...

  7. How to upload local files to linux Server or from linux Host downloads files to local

    The first way : SecureCRT To upload a file, you just need to shell Enter the command in the terminal emulator “rz”, You can select the file on the local disk from the pop-up dialog box , utilize Zmodem Upload to the current path of the server . Download the file just in shell The terminal imitates ...

  8. adopt XShell Realization windows File upload to Linux Server

    .XShell Upload files to Linux Server I'm learning Linux In the process , We often need to upload local files to Linux On a host , Here is a simple record of the use of Xsheel Tool for file transfer 1: First, connect to a Linux host 2: ...

  9. Upload local files to Linux The server

    1. Download files from the server scp username@servername:/path/filename /var/www/local_dir( Local directory ) for example scp root@192.168.0.101: ...

  10. Upload folder to FTP The server , Traverse upload ,,, Folder cannot be uploaded directly to FTP Server ...

    <? $ftp_ip = "FTP"; $ftp_user = "user"; $ftp_pwd = "password"; $con ...

Random recommendation

  1. Java Program , Ask for the average score of students

    First step , The system prompts you to enter the number of students . The second step , Score the students one by one , And accumulate . The third step , For the average score , And the output . import java.util.Scanner; public class chengji { ...

  2. Perl in Pod The basic usage of .

    1. Pod grammar pod There are three types of Chinese paragraph , Ordinary paragraphs , Literal paragraph (Verbatim Paragraph) And command paragraphs . The distinction between the three is very simple , With =pod|head1|cut|over Wait for the paragraph at the beginning of the indicator ...

  3. Nginx Turn on gzip Compression

    stay Nginx After installation , We can turn it on Gzip Compression , here Nginx By default, only for text/html Type of file . The following command is on Gzip Instructions : gzip on; gzip_http_versi ...

  4. UIImage Stretch shows

    The next picture , It's designed to be a button background :  button.png, Size is :24x60 Now we use it as a button background , The size of the button is 150x50, Here's what happened without technical stretching : //  obtain view The size of the    ...

  5. hexo Blog easy to build tutorial

    What is? Hexo Hexo It's a fast one . Simple and efficient blog framework .Hexo Use Markdown( Or other rendering engines ) Analyze the article , In seconds , You can use beautiful themes to generate static web pages . Official website Hexo install install In the installation Hex ...

  6. Django And ORM operation ( polymerization grouping 、F Q)

    Django And ORM operation ( polymerization grouping .F Q) polymerization aggregate() yes QuerySet A terminating clause of , in other words , He returns a dictionary containing some key value pairs , You can't do a little more behind it (.) operation .   The name of the key ...

  7. jsp Execution process diagram

    from :https://blog.csdn.net/y277an/article/details/76561451 One .jsp Execution process diagram User access jsp When the page is ,jsp The process is shown in the figure below : Two . Preprocessing ...

  8. Java analysis property file ( And brother Jing said ,SQL The execution time limit is written in xml in , Expand , Without changing the source code )

    stay Java Some configuration parameters in the project are saved in Property In file , This ensures that the original code will not be modified Property file . It's simple , Is in the java The file reads the external properyt The configuration file PropertyPar ...

  9. c Language pointer notes

    One .int a[20]1. The array name represents the address of the first element of the array , Does not represent the address of the array 2. The address of the array name represents the address of the entire array .a and &a The data types represented are different a Address representing the first element of the array &a An array type in ...

  10. QPixmap Display size

    size picSize(600,400); // take pixmap Zoom to picSize The size is then saved in scaledPixmap in To scale : QPixmap scaledPixmap = pixmap. ...