zoukankan      html  css  js  c++  java
  • .NetCore 利用Jenkins在 Windows平台下打包发布Angular项目

    准备环境

    安装Jenkins

    首先装node,版本根据实际环境而定(node安装包中包含了npm)

    安装一般都配置好了环境变量,检查下如果没有就配置下

    Jenkins中安装NPM插件

    GIt获取代码

    执行Windows批处理命令

    替换下ng里面的发布配置文件确定不同环境下具有不同的配置

    如果第一次需要还原下包  npm install 

    copy D:WebKFUIConfigenvironment.prod.ts  "%WORKSPACE%srcenvironments" 
    npm run build 

    接下来拷贝好发布目录到指定目录(IIS指定的目录)

    cd D:
    cd D:WebKFUI
    rd /s /q  D:WebKFUI
    xcopy "%WORKSPACE%distEduManagerUI"  D:WebKFUI /s /e

     发布访问 http://192.168.0.233:20020 

    会调用oidc-client组件

    1 http://192.168.0.233:20000/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3Dedu.user%26redirect_uri%3Dhttp%253A%252F%252F192.168.0.233%253A20020%252F%2523%252Fcallback%2523%26response_type%3Did_token%2520token%26scope%3Dopenid%2520profile%2520offline_access%2520userservicesapi%26state%3D472af2234ea746979abf58f6ab021eb2%26nonce%3D89892a52643246fcbdba00c2d4fe12a9

    会转到登录界面登录后进入 Angular callback 

    http://192.168.0.233:20020/#/callback#id_token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImI4YzBlZjc3ZTJjODExNmMxY2YyY2Y3ZjIyNWY0NjVlIiwidHlwIjoiSldUIn0.eyJuYmYiOjE1MzEyOTI1NjQsImV4cCI6MTUzMTI5Mjg2NCwiaXNzIjoiaHR0cDovLzE5Mi4xNjguMC4yMzM6MjAwMDAiLCJhdWQiOiJlZHUudXNlciIsIm5vbmNlIjoiODk4OTJhNTI2NDMyNDZmY2JkYmEwMGMyZDRmZTEyYTkiLCJpYXQiOjE1MzEyOTI1NjQsImF0X2hhc2giOiJ5QzFpcV81bjZQUEFRaG45a2gzVU5nIiwic2lkIjoiNDBmNzIwNDRiZjA1YjMxY2Y2N2ZjMTExND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b7x-rKw6lPVG_OnJl2z6cbphlvapN8JaFvreZSk7XrUiThPloFc3_0-Vur2c0nsR8YloL26RiHNuF84nNQVz1Uc1bxLloR2JQU3oQP8jgSa5NFIhNgwpqUHWhLVepjNiPs1tFNYLo2Iw9MI2lVAoVyIyERNfEiGPXBhLGbDrfkTHZVBSHqkosWWcUD2FX33ChW8b0sJqXOvZN7yPV7aA&token_type=Bearer&expires_in=3600&scope=openid%20profile%20userservicesapi%20offline_access&state=472af2234ea746979abf58f6ab021eb2&session_state=FUx2KxYW5dXEHAMViGbuWYspUCrcyaUkrFtmpu61mJY.49919d0245d79092954fbf43ba32d714

    由callback处理后进入主页面

  • 相关阅读:
    Lucas 定理
    C语言II博客作业04
    C语言II博客作业03
    C语言II博客作业02
    C语言II博客作业01
    学期总结
    First project
    C语言I博客作业08
    C语言I博客作业07
    C语言I博客作业06
  • 原文地址:https://www.cnblogs.com/liyouming/p/9294042.html
Copyright © 2011-2022 走看看