CI CD для служебного файла в приложении angular 6 с использованием Azure DevOps с VSTS - PullRequest
0 голосов
/ 18 декабря 2018

У меня запущено приложение angular 6 в производственной среде.Но у меня есть небольшая проблема здесь.Я реализовал серверную часть для моего углового приложения, используя angular service , и это выглядит так :

import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import { HttpClient } from '@angular/common/http';

@Injectable({
  providedIn: 'root'
})
export class CampaignService {

  constructor(private _http :HttpClient) { }

//   CampaignsInfo(){
//     return this._http.get('http://localhost:64674/api/GetCampaignsInfo');
//   }

//   MetricsInfo(){
  
//     return this._http.get('http://localhost:64674/api/LandingPageMetrics');
//   }
  
//  BeneficiaryGroupInfo(){
//    return this._http.get('http://localhost:64674/api/GetBeneficiaryGroupInfo');
//  }

//  BeneficiaryBatchInfo(Id){
//    return this._http.post('http://localhost:64674/api/GetBeneficiaryBatchInfo', Id);
//  }
 

//   QuestionnaireInfo(Id){
//     return this._http.post('http://localhost:64674/api/GetQuestionnaires', Id);
//   }
 
//   CampaignBeneficiaresInfo(Id){
//     return this._http.post('http://localhost:64674/api/GetCampaignBeneficiares' , Id);
//   }

//   CampaignTreemapDataInfo(Id){
//    return this._http.post('http://localhost:64674/api/GetTreemapData' , Id);
//  }


  //Prod Public


  CampaignsInfo(){
    return this._http.get('http://xx.xxx.xx.xxx/portal/api/GetCampaignsInfo');
  }

  MetricsInfo(){
  
    return this._http.get('http://xx.xxx.xx.xxx/portal/api/LandingPageMetrics');
  }

  
 BeneficiaryGroupInfo(){
   return this._http.get('http://xx.xxx.xx.xxx/portal/api/GetBeneficiaryGroupInfo');
 }

 BeneficiaryBatchInfo(Id){
   return this._http.post('http://xx.xxx.xx.xxx/portal/api/GetBeneficiaryBatchInfo', Id);
 }
 

  QuestionnaireInfo(Id){
    return this._http.post('http://xx.xxx.xx.xxx/portal/api/GetQuestionnaires', Id);
  }
 
  CampaignBeneficiaresInfo(Id){
    return this._http.post('http://xx.xxx.xx.xxx/portal/api/GetCampaignBeneficiares' , Id);
  }

  CampaignTreemapDataInfo(Id){
   return this._http.post('http://xx.xxx.xx.xxx/portal/api/GetTreemapData' , Id);
 }


  
}

Каждый раз, когда мне приходится комментировать локальный хост после разработки и снимать комментарии с моих рабочих URL-адресов в моем сервисе, это действительно расстраивает.Есть ли способ автоматизировать этот процесс в VSTS (версия Git)?Буду признателен за любую оказанную помощь.Я знаю, что спрашиваю слишком много, но я уже несколько дней бьюсь над этим.

...