我在Agular 4.3中有一个应用程序,我使用Jenkins进行持续交付。我的问题是,在“部署”步骤中,Jenkins生成一个.war文件,但生成一个名为build file的url。 恩。 www.example.com/wrong 我不知道如何将我的应用程序构建到主机URL。
我的詹金斯档案步骤
stage('Deploying') {
when{
branch 'producao'
}
steps {
script{
pkg = readJSON file: 'package.json'
}
dir("/opt/wildfly-10.1.0.Final/bin/") {
withCredentials([usernamePassword(credentialsId: 'fd1c7ee7-914f-414e-a280-5dae1e1da9ca', passwordVariable: 'password', usernameVariable: 'username')]) {
sh 'sh jboss-cli.sh --connect controller=172.25.0.23:9990 --user=ealogos --password=ealogos2018 --command="deploy $WORKSPACE/' + pkg.displayName + '.war --force"'
}
}
}
}
我的package.json文件
{
"name": "logos",
"displayName": "logos",
"config": {
"bh": "logos"
},
"version": "1.0.1",
"license": "MIT",
"scripts": {
"ng": "./node_modules/.bin/ng",
"start": "./node_modules/.bin/ng server --open",
"build:windows": "./node_modules/.bin/ng build --bh /%npm_package_config_bh%/ --op ./dist/%npm_package_config_bh%/ && cp .htaccess ./dist/%npm_package_config_bh%/ ",
"build:linux": "./node_modules/.bin/ng build --bh /%npm_package_config_bh%/ --op ./dist/$npm_package_config_bh/ && cp .htaccess ./dist/$npm_package_config_bh/ ",
"test": "./node_modules/.bin/ng test -w",
"lint": "./node_modules/.bin/ng lint",
"e2e": "./node_modules/.bin/ng e2e"
我尝试取下config:bh
的displayname和“logos”答案 0 :(得分:0)