0

I have an application in Agular 4.3 and I using Jenkins to do continuous delivery. My problem is, on "deploy" step Jenkins generate a .war file, but generate an url with de name of build file. ex. www.example.com/wrong I don't know how build my application to the host url.

My Jenkins file step

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"'
                }
            }
        }
    }

My package.json file

    {
  "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"

I tried take off displayname and "logos" of config: bh

hudjoubert
  • 143
  • 2
  • 10

1 Answers1

0

If I had correctly understood your problem.

Look into the following question which looks like a duplicate to your problem. how-to-define-context-path-in-wildfly

Sorry if I misunderstood your question

eWizard
  • 91
  • 2