diff --git a/JenkinsBuildProd b/JenkinsBuildProd new file mode 100644 index 0000000..dd73139 --- /dev/null +++ b/JenkinsBuildProd @@ -0,0 +1,13 @@ +node('Natrium'){ + stage('get new version to repo') { + checkout scm + } + + stage('Install dependencies') { + sh 'npm install' + } + + stage('build project') { + sh 'npm run build-prod:lithium' + } +} \ No newline at end of file diff --git a/JenkinsBuildTest b/JenkinsBuildTest new file mode 100644 index 0000000..e53e726 --- /dev/null +++ b/JenkinsBuildTest @@ -0,0 +1,13 @@ +node('Lithium'){ + stage('get new version to repo') { + checkout scm + } + + stage('Install dependencies') { + sh 'npm install' + } + + stage('build project') { + sh 'npm run build-test:lithium' + } +} diff --git a/package.json b/package.json index 588d736..6ef3831 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,8 @@ "ng": "ng", "start": "ng serve --proxy-config proxy.confi.json", "build": "ng build", + "build-test:lithium": "ng build --output-path=/var/www/html/selfdelivery-pitsburg-test.mydatahosting.ru", + "build-prod:lithium": "ng build --output-path=/var/www/html/selfdelivery-pitsburg.mydatahosting.ru", "watch": "ng build --watch --configuration development", "test": "ng test" }, diff --git a/proxy.confi.json b/proxy.confi.json new file mode 100644 index 0000000..e82a161 --- /dev/null +++ b/proxy.confi.json @@ -0,0 +1,11 @@ +{ + "/api": { + "target": "http://selfdelivery-pitsburg-test.mydatahosting.ru/api", + "secure": false, + "pathRewrite": { + "^/api": "" + }, + "changeOrigin": true, + "logLevel": "debug" + } +}