AppSettings.ApiUrl
This commit is contained in:
parent
a4d3a9899f
commit
10c823dca8
4
ClientHub/.vscode/settings.json
vendored
4
ClientHub/.vscode/settings.json
vendored
@ -1,5 +1,9 @@
|
|||||||
{
|
{
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
|
"Blazor",
|
||||||
|
"Dispo",
|
||||||
|
"Hsts",
|
||||||
|
"Serilog",
|
||||||
"tooltype"
|
"tooltype"
|
||||||
]
|
]
|
||||||
}
|
}
|
2
ClientHub/.vscode/tasks.json
vendored
2
ClientHub/.vscode/tasks.json
vendored
@ -44,7 +44,7 @@
|
|||||||
"args": [
|
"args": [
|
||||||
"watch",
|
"watch",
|
||||||
"--launch-profile",
|
"--launch-profile",
|
||||||
"https",
|
"http",
|
||||||
"run",
|
"run",
|
||||||
"--project",
|
"--project",
|
||||||
"${workspaceFolder}/OI.Metrology.ClientHub.csproj",
|
"${workspaceFolder}/OI.Metrology.ClientHub.csproj",
|
||||||
|
@ -7,6 +7,7 @@ public partial class AwaitingDisposition
|
|||||||
{
|
{
|
||||||
|
|
||||||
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
||||||
|
[Inject] protected Models.AppSettings? AppSettings { get; set; }
|
||||||
|
|
||||||
protected override Task OnAfterRenderAsync(bool firstRender)
|
protected override Task OnAfterRenderAsync(bool firstRender)
|
||||||
{
|
{
|
||||||
@ -14,7 +15,9 @@ public partial class AwaitingDisposition
|
|||||||
{
|
{
|
||||||
if (JSRuntime is null)
|
if (JSRuntime is null)
|
||||||
throw new NullReferenceException(nameof(JSRuntime));
|
throw new NullReferenceException(nameof(JSRuntime));
|
||||||
return JSRuntime.InvokeVoidAsync("initAwaitingDisposition").AsTask();
|
if (AppSettings is null)
|
||||||
|
throw new NullReferenceException(nameof(AppSettings));
|
||||||
|
return JSRuntime.InvokeVoidAsync("initAwaitingDisposition", AppSettings.ApiUrl).AsTask();
|
||||||
}
|
}
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ public partial class Export
|
|||||||
{
|
{
|
||||||
|
|
||||||
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
||||||
|
[Inject] protected Models.AppSettings? AppSettings { get; set; }
|
||||||
[Parameter] public Metrology.Shared.ViewModels.Export? Model { get; set; }
|
[Parameter] public Metrology.Shared.ViewModels.Export? Model { get; set; }
|
||||||
|
|
||||||
public Export()
|
public Export()
|
||||||
@ -25,7 +26,9 @@ public partial class Export
|
|||||||
{
|
{
|
||||||
if (JSRuntime is null)
|
if (JSRuntime is null)
|
||||||
throw new NullReferenceException(nameof(JSRuntime));
|
throw new NullReferenceException(nameof(JSRuntime));
|
||||||
return JSRuntime.InvokeVoidAsync("initExport", DateTime.Now.AddMonths(-1), DateTime.Now).AsTask();
|
if (AppSettings is null)
|
||||||
|
throw new NullReferenceException(nameof(AppSettings));
|
||||||
|
return JSRuntime.InvokeVoidAsync("initExport", AppSettings.ApiUrl, DateTime.Now.AddMonths(-1), DateTime.Now).AsTask();
|
||||||
}
|
}
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ public partial class RunHeaders
|
|||||||
{
|
{
|
||||||
|
|
||||||
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
||||||
|
[Inject] protected Models.AppSettings? AppSettings { get; set; }
|
||||||
|
|
||||||
protected override Task OnAfterRenderAsync(bool firstRender)
|
protected override Task OnAfterRenderAsync(bool firstRender)
|
||||||
{
|
{
|
||||||
@ -14,7 +15,9 @@ public partial class RunHeaders
|
|||||||
{
|
{
|
||||||
if (JSRuntime is null)
|
if (JSRuntime is null)
|
||||||
throw new NullReferenceException(nameof(JSRuntime));
|
throw new NullReferenceException(nameof(JSRuntime));
|
||||||
return JSRuntime.InvokeVoidAsync("initRunHeaders").AsTask();
|
if (AppSettings is null)
|
||||||
|
throw new NullReferenceException(nameof(AppSettings));
|
||||||
|
return JSRuntime.InvokeVoidAsync("initRunHeaders", AppSettings.ApiUrl).AsTask();
|
||||||
}
|
}
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ public partial class RunInfo
|
|||||||
[Parameter] public Metrology.Shared.ViewModels.RunInfo? Model { get; set; }
|
[Parameter] public Metrology.Shared.ViewModels.RunInfo? Model { get; set; }
|
||||||
|
|
||||||
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
||||||
|
[Inject] protected Models.AppSettings? AppSettings { get; set; }
|
||||||
|
|
||||||
protected override Task OnAfterRenderAsync(bool firstRender)
|
protected override Task OnAfterRenderAsync(bool firstRender)
|
||||||
{
|
{
|
||||||
@ -16,10 +17,12 @@ public partial class RunInfo
|
|||||||
{
|
{
|
||||||
if (JSRuntime is null)
|
if (JSRuntime is null)
|
||||||
throw new NullReferenceException(nameof(JSRuntime));
|
throw new NullReferenceException(nameof(JSRuntime));
|
||||||
|
if (AppSettings is null)
|
||||||
|
throw new NullReferenceException(nameof(AppSettings));
|
||||||
int initialToolTypeID = Model is not null ? Model.ToolTypeID : 0;
|
int initialToolTypeID = Model is not null ? Model.ToolTypeID : 0;
|
||||||
int initialHeaderId = Model is not null ? Model.HeaderID : 0;
|
int initialHeaderId = Model is not null ? Model.HeaderID : 0;
|
||||||
string initialHeaderAttachmentId = Model is not null ? Model.HeaderAttachmentID.ToString() : string.Empty;
|
string initialHeaderAttachmentId = Model is not null ? Model.HeaderAttachmentID.ToString() : string.Empty;
|
||||||
return JSRuntime.InvokeVoidAsync("initRunInfo", initialToolTypeID, initialHeaderId, initialHeaderAttachmentId).AsTask();
|
return JSRuntime.InvokeVoidAsync("initRunInfo", AppSettings.ApiUrl, initialToolTypeID, initialHeaderId, initialHeaderAttachmentId).AsTask();
|
||||||
}
|
}
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"ApiUrl": "https://localhost:7130",
|
"xApiUrl": "https://localhost:7130",
|
||||||
|
"ApiUrl": "http://messa010ec.ec.local:50301",
|
||||||
"DetailedErrors": true,
|
"DetailedErrors": true,
|
||||||
"IsDevelopment": true,
|
"IsDevelopment": true,
|
||||||
"IsStaging": false,
|
"IsStaging": false,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
var _apiUrl = null;
|
||||||
var _initialHeaderAttachmentId = null;
|
var _initialHeaderAttachmentId = null;
|
||||||
var _initialHeaderId = null;
|
var _initialHeaderId = null;
|
||||||
var _toolType = null;
|
var _toolType = null;
|
||||||
@ -25,7 +26,8 @@ function loadRunInfoAwaitingDisposition() {
|
|||||||
window.location.href = targetURL;
|
window.location.href = targetURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
function initAwaitingDisposition() {
|
function initAwaitingDisposition(apiUrl) {
|
||||||
|
_apiUrl = apiUrl;
|
||||||
$("#grid").igGrid({
|
$("#grid").igGrid({
|
||||||
autoGenerateColumns: false,
|
autoGenerateColumns: false,
|
||||||
width: "70%",
|
width: "70%",
|
||||||
@ -45,7 +47,7 @@ function initAwaitingDisposition() {
|
|||||||
{ key: "InsertDate", dataType: "date", width: "10%", format: "dateTime" },
|
{ key: "InsertDate", dataType: "date", width: "10%", format: "dateTime" },
|
||||||
{ key: "Expiration", dataType: "date", width: "10%", format: "dateTime" }
|
{ key: "Expiration", dataType: "date", width: "10%", format: "dateTime" }
|
||||||
],
|
],
|
||||||
dataSource: "https://localhost:7130/api/awaitingdispo/",
|
dataSource: _apiUrl + "/api/awaitingdispo/",
|
||||||
responseDataKey: "Results",
|
responseDataKey: "Results",
|
||||||
tabIndex: 1,
|
tabIndex: 1,
|
||||||
features: [
|
features: [
|
||||||
@ -61,11 +63,12 @@ function initAwaitingDisposition() {
|
|||||||
$("#grid").on("dblclick", "tr", loadRunInfoAwaitingDisposition);
|
$("#grid").on("dblclick", "tr", loadRunInfoAwaitingDisposition);
|
||||||
};
|
};
|
||||||
|
|
||||||
function initExport(startTimeValue, endTimeValue) {
|
function initExport(apiUrl, startTimeValue, endTimeValue) {
|
||||||
|
_apiUrl = apiUrl;
|
||||||
var endTime = new Date(endTimeValue);
|
var endTime = new Date(endTimeValue);
|
||||||
var startTime = new Date(startTimeValue);
|
var startTime = new Date(startTimeValue);
|
||||||
$("#ToolType").igCombo({
|
$("#ToolType").igCombo({
|
||||||
dataSource: 'https://localhost:7130/api/tooltypes',
|
dataSource: _apiUrl + '/api/tooltypes',
|
||||||
responseDataKey: "Results",
|
responseDataKey: "Results",
|
||||||
textKey: "ToolTypeName",
|
textKey: "ToolTypeName",
|
||||||
valueKey: "ID",
|
valueKey: "ID",
|
||||||
@ -104,7 +107,7 @@ function loadHeaderGridRunHeaders() {
|
|||||||
if (gridCreated)
|
if (gridCreated)
|
||||||
$("#HeaderGrid").igGrid("destroy");
|
$("#HeaderGrid").igGrid("destroy");
|
||||||
clearFieldsGridRunHeaders();
|
clearFieldsGridRunHeaders();
|
||||||
var headerURL = "https://localhost:7130/api/tooltypes/" + toolTypeID + "/headertitles";
|
var headerURL = _apiUrl + "/api/tooltypes/" + toolTypeID + "/headertitles";
|
||||||
$("#HeaderGrid").igGrid({
|
$("#HeaderGrid").igGrid({
|
||||||
autoGenerateColumns: false,
|
autoGenerateColumns: false,
|
||||||
primaryKey: "ID",
|
primaryKey: "ID",
|
||||||
@ -134,7 +137,7 @@ function clearFieldsGridRunHeaders() {
|
|||||||
function headerSelectionChangedRunHeaders(evt, ui) {
|
function headerSelectionChangedRunHeaders(evt, ui) {
|
||||||
var toolTypeID = $("#ToolType").igCombo("value");
|
var toolTypeID = $("#ToolType").igCombo("value");
|
||||||
clearFieldsGridRunHeaders();
|
clearFieldsGridRunHeaders();
|
||||||
var url = "https://localhost:7130/api/tooltypes/" + toolTypeID + "/headers/" + ui.row.id + "/fields";
|
var url = _apiUrl + "/api/tooltypes/" + toolTypeID + "/headers/" + ui.row.id + "/fields";
|
||||||
$("#FieldsGrid").igGrid({
|
$("#FieldsGrid").igGrid({
|
||||||
autoGenerateColumns: false,
|
autoGenerateColumns: false,
|
||||||
primaryKey: "Column",
|
primaryKey: "Column",
|
||||||
@ -153,9 +156,10 @@ function headerSelectionChangedRunHeaders(evt, ui) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function initRunHeaders() {
|
function initRunHeaders(apiUrl) {
|
||||||
|
_apiUrl = apiUrl;
|
||||||
$("#ToolType").igCombo({
|
$("#ToolType").igCombo({
|
||||||
dataSource: 'https://localhost:7130/api/tooltypes',
|
dataSource: _apiUrl + '/api/tooltypes',
|
||||||
responseDataKey: "Results",
|
responseDataKey: "Results",
|
||||||
textKey: "ToolTypeName",
|
textKey: "ToolTypeName",
|
||||||
valueKey: "ID",
|
valueKey: "ID",
|
||||||
@ -181,7 +185,7 @@ function loadHeaderGridRunInfo() {
|
|||||||
$("#HeaderGrid").igGrid("destroy");
|
$("#HeaderGrid").igGrid("destroy");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: "https://localhost:7130/api/tooltypes/" + toolTypeID + "?sortby=grid",
|
url: _apiUrl + "/api/tooltypes/" + toolTypeID + "?sortby=grid",
|
||||||
success: function (r) {
|
success: function (r) {
|
||||||
if ((r.Results == null) || (r.Results.ToolType == null) || (r.Results.Metadata == null))
|
if ((r.Results == null) || (r.Results.ToolType == null) || (r.Results.Metadata == null))
|
||||||
ShowErrorMessage("Invalid tool type: " + toolTypeID);
|
ShowErrorMessage("Invalid tool type: " + toolTypeID);
|
||||||
@ -263,7 +267,7 @@ function detailSelectionChangedRunInfo(evt, ui) {
|
|||||||
if (ui.row.index >= 0) {
|
if (ui.row.index >= 0) {
|
||||||
var rowData = ui.owner.grid.dataSource.dataView()[ui.row.index];
|
var rowData = ui.owner.grid.dataSource.dataView()[ui.row.index];
|
||||||
var toolTypeID = $("#ToolTypeID").text();
|
var toolTypeID = $("#ToolTypeID").text();
|
||||||
var attachmentUrlBase = 'https://localhost:7130/api/tooltypes/' + toolTypeID;
|
var attachmentUrlBase = _apiUrl + '/api/tooltypes/' + toolTypeID;
|
||||||
var attachmentId = rowData.AttachmentID;
|
var attachmentId = rowData.AttachmentID;
|
||||||
if ((attachmentId == null) || (attachmentId === ''))
|
if ((attachmentId == null) || (attachmentId === ''))
|
||||||
return;
|
return;
|
||||||
@ -276,7 +280,7 @@ function detailSelectionChangedRunInfo(evt, ui) {
|
|||||||
function loadHeaderAttachmentRunInfo() {
|
function loadHeaderAttachmentRunInfo() {
|
||||||
var toolTypeID = $("#ToolTypeID").text();
|
var toolTypeID = $("#ToolTypeID").text();
|
||||||
var attachmentId = $("#HeaderAttachmentId").text();
|
var attachmentId = $("#HeaderAttachmentId").text();
|
||||||
var attachmentUrlBase = 'https://localhost:7130/api/tooltypes/' + toolTypeID;
|
var attachmentUrlBase = _apiUrl + '/api/tooltypes/' + toolTypeID;
|
||||||
if ((attachmentId == null) || (attachmentId === '') || (_toolType.DisplayHeaderAttachment == null) || (_toolType.DisplayHeaderAttachment === '')) {
|
if ((attachmentId == null) || (attachmentId === '') || (_toolType.DisplayHeaderAttachment == null) || (_toolType.DisplayHeaderAttachment === '')) {
|
||||||
$("#HeaderAttachmentFrame").prop("src", "");
|
$("#HeaderAttachmentFrame").prop("src", "");
|
||||||
} else {
|
} else {
|
||||||
@ -290,7 +294,7 @@ function markAsReviewedRunInfo() {
|
|||||||
var headerId = $("#HeaderId").text();
|
var headerId = $("#HeaderId").text();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "https://localhost:7130/api/awaitingdispo/markasreviewed?tooltypeid=" + toolTypeId + "&headerid=" + headerId,
|
url: _apiUrl + "/api/awaitingdispo/markasreviewed?tooltypeid=" + toolTypeId + "&headerid=" + headerId,
|
||||||
success: function () {
|
success: function () {
|
||||||
},
|
},
|
||||||
error: function (e, ajaxOptions, ex) {
|
error: function (e, ajaxOptions, ex) {
|
||||||
@ -308,7 +312,7 @@ function loadDetailsRunInfo() {
|
|||||||
$("#DetailsGrid").igGrid("destroy");
|
$("#DetailsGrid").igGrid("destroy");
|
||||||
var headerId = $("#HeaderId").text();
|
var headerId = $("#HeaderId").text();
|
||||||
var toolTypeID = $("#ToolTypeID").text();
|
var toolTypeID = $("#ToolTypeID").text();
|
||||||
var detailsURL = "https://localhost:7130/api/tooltypes/" + toolTypeID + "/headers/" + headerId + "/data";
|
var detailsURL = _apiUrl + "/api/tooltypes/" + toolTypeID + "/headers/" + headerId + "/data";
|
||||||
var gridColumns = [
|
var gridColumns = [
|
||||||
{ key: "AttachmentID", dataType: "string", hidden: true },
|
{ key: "AttachmentID", dataType: "string", hidden: true },
|
||||||
{ key: "Title", dataType: "string", hidden: true },
|
{ key: "Title", dataType: "string", hidden: true },
|
||||||
@ -372,7 +376,7 @@ function requestHeaderDataRunInfo() {
|
|||||||
$("#HeaderAttachmentId").text(_initialHeaderAttachmentId);
|
$("#HeaderAttachmentId").text(_initialHeaderAttachmentId);
|
||||||
_initialHeaderId = -1;
|
_initialHeaderId = -1;
|
||||||
}
|
}
|
||||||
var headerURL = "https://localhost:7130/api/tooltypes/" + _toolType.ID + "/headers?" + $.param(parms);
|
var headerURL = _apiUrl + "/api/tooltypes/" + _toolType.ID + "/headers?" + $.param(parms);
|
||||||
var gridColumns = [
|
var gridColumns = [
|
||||||
{ key: "ID", dataType: "number", hidden: true },
|
{ key: "ID", dataType: "number", hidden: true },
|
||||||
{ key: "AttachmentID", dataType: "string", hidden: true },
|
{ key: "AttachmentID", dataType: "string", hidden: true },
|
||||||
@ -428,7 +432,7 @@ function reviewButtonRunInfo() {
|
|||||||
$("#ReviewButton").prop("disabled", true);
|
$("#ReviewButton").prop("disabled", true);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "https://localhost:7130/api/awaitingdispo/markasawaiting?tooltypeid=" + toolTypeId + "&headerid=" + headerId,
|
url: _apiUrl + "/api/awaitingdispo/markasawaiting?tooltypeid=" + toolTypeId + "&headerid=" + headerId,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
DisplayWSMessage("info", "Marked as awaiting disposition", e);
|
DisplayWSMessage("info", "Marked as awaiting disposition", e);
|
||||||
$("#ReviewButton").prop("disabled", false);
|
$("#ReviewButton").prop("disabled", false);
|
||||||
@ -446,7 +450,7 @@ function oiExportButtonRunInfo() {
|
|||||||
$("#OIExportButton").prop("disabled", true);
|
$("#OIExportButton").prop("disabled", true);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "https://localhost:7130/api/tooltypes/" + toolTypeID + "/headers/" + headerId + "/oiexport",
|
url: _apiUrl + "/api/tooltypes/" + toolTypeID + "/headers/" + headerId + "/oiexport",
|
||||||
success: function (r) {
|
success: function (r) {
|
||||||
$("#OIExportResult").text("Exported!");
|
$("#OIExportResult").text("Exported!");
|
||||||
},
|
},
|
||||||
@ -482,11 +486,12 @@ function setInitialDateTimesRunInfo() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function initRunInfo(initialToolTypeID, initialHeaderId, initialHeaderAttachmentId) {
|
function initRunInfo(apiUrl, initialToolTypeID, initialHeaderId, initialHeaderAttachmentId) {
|
||||||
|
_apiUrl = apiUrl;
|
||||||
_initialHeaderId = initialHeaderId;
|
_initialHeaderId = initialHeaderId;
|
||||||
_initialHeaderAttachmentId = initialHeaderAttachmentId;
|
_initialHeaderAttachmentId = initialHeaderAttachmentId;
|
||||||
$("#ToolType").igCombo({
|
$("#ToolType").igCombo({
|
||||||
dataSource: 'https://localhost:7130/api/tooltypes',
|
dataSource: _apiUrl + '/api/tooltypes',
|
||||||
responseDataKey: "Results",
|
responseDataKey: "Results",
|
||||||
textKey: "ToolTypeName",
|
textKey: "ToolTypeName",
|
||||||
valueKey: "ID",
|
valueKey: "ID",
|
||||||
|
@ -20,19 +20,45 @@ pool:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
echo $(Build.BuildId)
|
set coreVersion=net7.0
|
||||||
echo $(Build.Reason)
|
echo %coreVersion%
|
||||||
echo $(Build.Repository.Id)
|
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
|
||||||
echo $(Build.Repository.Name)
|
echo $(CoreVersion)
|
||||||
echo $(Build.SourceVersion)
|
displayName: CoreVersion
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set configuration=Debug
|
||||||
|
echo %configuration%
|
||||||
|
echo ##vso[task.setvariable variable=Configuration;]%configuration%
|
||||||
|
echo ($Configuration)
|
||||||
|
displayName: Configuration
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set nugetSource=https://messa017.infineon.com/v3/index.json
|
||||||
|
echo %nugetSource%
|
||||||
|
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
|
||||||
|
echo $(NugetSource)
|
||||||
|
displayName: NugetSource
|
||||||
|
|
||||||
|
- script: |
|
||||||
set gitCommit=$(Build.SourceVersion)
|
set gitCommit=$(Build.SourceVersion)
|
||||||
set gitCommitSeven=%gitCommit:~0,7%
|
set gitCommitSeven=%gitCommit:~0,7%
|
||||||
echo %gitCommitSeven%
|
echo %gitCommitSeven%
|
||||||
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
|
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
|
||||||
echo $(GitCommitSeven)
|
echo $(GitCommitSeven)
|
||||||
displayName: Echo
|
displayName: GitCommitSeven
|
||||||
|
|
||||||
- script: "echo $(GitCommitSeven)"
|
- script: |
|
||||||
|
echo $(Build.BuildId)
|
||||||
|
echo $(Build.Reason)
|
||||||
|
echo $(Build.Repository.Id)
|
||||||
|
echo $(Build.Repository.Name)
|
||||||
|
echo $(Build.SourceVersion)
|
||||||
|
echo $(CoreVersion)
|
||||||
|
echo $(Configuration)
|
||||||
|
echo $(NugetSource)
|
||||||
|
echo $(GitCommitSeven)
|
||||||
|
REM echo $(pipelinePassword)
|
||||||
displayName: "Echo Check"
|
displayName: "Echo Check"
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
||||||
@ -47,11 +73,11 @@ steps:
|
|||||||
workingDirectory: Server
|
workingDirectory: Server
|
||||||
displayName: "Safe storage of app secrets - Server"
|
displayName: "Safe storage of app secrets - Server"
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration Release --source "https://messa017.infineon.com/v3/index.json"'
|
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
||||||
workingDirectory: Server
|
workingDirectory: Server
|
||||||
displayName: "Core Build - Server"
|
displayName: "Core Build - Server"
|
||||||
|
|
||||||
- script: "dotnet test --configuration Release"
|
- script: "dotnet test --configuration $(Configuration)"
|
||||||
workingDirectory: Tests
|
workingDirectory: Tests
|
||||||
displayName: "Core Test"
|
displayName: "Core Test"
|
||||||
enabled: false
|
enabled: false
|
||||||
@ -66,7 +92,7 @@ steps:
|
|||||||
displayName: "Report Generator"
|
displayName: "Report Generator"
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" publish --configuration Release --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Server --source "https://messa017.infineon.com/v3/index.json"'
|
- script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Server --source $(NugetSource)'
|
||||||
workingDirectory: Server
|
workingDirectory: Server
|
||||||
displayName: "Core Publish"
|
displayName: "Core Publish"
|
||||||
|
|
||||||
@ -74,20 +100,18 @@ steps:
|
|||||||
displayName: "Copy Files"
|
displayName: "Copy Files"
|
||||||
inputs:
|
inputs:
|
||||||
SourceFolder: '$(Build.ArtifactStagingDirectory)\Server'
|
SourceFolder: '$(Build.ArtifactStagingDirectory)\Server'
|
||||||
TargetFolder: 'D:\net7.0\$(Build.Repository.Name)\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-Release\Server'
|
TargetFolder: 'D:\$(CoreVersion)\$(Build.Repository.Name)\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)\Server'
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: "Publish Artifact: drop"
|
displayName: "Publish Artifact: drop"
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
"C:\program files\dotnet\dotnet.exe" clean --configuration Debug
|
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
||||||
"C:\program files\dotnet\dotnet.exe" clean --configuration Release
|
|
||||||
workingDirectory: Tests
|
workingDirectory: Tests
|
||||||
displayName: "Core Clean - Tests"
|
displayName: "Core Clean - Tests"
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
"C:\program files\dotnet\dotnet.exe" clean --configuration Debug
|
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
||||||
"C:\program files\dotnet\dotnet.exe" clean --configuration Release
|
|
||||||
workingDirectory: Server
|
workingDirectory: Server
|
||||||
displayName: "Core Clean - Server"
|
displayName: "Core Clean - Server"
|
||||||
|
117
azure-pipelines-server.yml
Normal file
117
azure-pipelines-server.yml
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- "Server/*"
|
||||||
|
- "Shared/*"
|
||||||
|
- "Tests/*"
|
||||||
|
exclude:
|
||||||
|
- "**/*.yaml"
|
||||||
|
- "**/*.yml"
|
||||||
|
- "Archive/*"
|
||||||
|
- "Client/*"
|
||||||
|
- "ClientHub/*"
|
||||||
|
|
||||||
|
pool:
|
||||||
|
name: Mesa-IIS
|
||||||
|
demands: OI-Metrology-Server
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- script: |
|
||||||
|
set coreVersion=net7.0
|
||||||
|
echo %coreVersion%
|
||||||
|
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
|
||||||
|
echo $(CoreVersion)
|
||||||
|
displayName: CoreVersion
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set configuration=Release
|
||||||
|
echo %configuration%
|
||||||
|
echo ##vso[task.setvariable variable=Configuration;]%configuration%
|
||||||
|
echo ($Configuration)
|
||||||
|
displayName: Configuration
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set nugetSource=https://messa08ec.ec.local/v3/index.json
|
||||||
|
echo %nugetSource%
|
||||||
|
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
|
||||||
|
echo $(NugetSource)
|
||||||
|
displayName: NugetSource
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set gitCommit=$(Build.SourceVersion)
|
||||||
|
set gitCommitSeven=%gitCommit:~0,7%
|
||||||
|
echo %gitCommitSeven%
|
||||||
|
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
|
||||||
|
echo $(GitCommitSeven)
|
||||||
|
displayName: GitCommitSeven
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
echo $(Build.BuildId)
|
||||||
|
echo $(Build.Reason)
|
||||||
|
echo $(Build.Repository.Id)
|
||||||
|
echo $(Build.Repository.Name)
|
||||||
|
echo $(Build.SourceVersion)
|
||||||
|
echo $(CoreVersion)
|
||||||
|
echo $(Configuration)
|
||||||
|
echo $(NugetSource)
|
||||||
|
echo $(GitCommitSeven)
|
||||||
|
REM echo $(pipelinePassword)
|
||||||
|
displayName: "Echo Check"
|
||||||
|
|
||||||
|
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
||||||
|
displayName: "Nuget Clear"
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
"C:\program files\dotnet\dotnet.exe" user-secrets init
|
||||||
|
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
|
||||||
|
"C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommitSeven" "$(GitCommitSeven)"
|
||||||
|
"C:\program files\dotnet\dotnet.exe" user-secrets list
|
||||||
|
workingDirectory: Server
|
||||||
|
displayName: "Safe storage of app secrets - Server"
|
||||||
|
|
||||||
|
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
||||||
|
workingDirectory: Server
|
||||||
|
displayName: "Core Build - Server"
|
||||||
|
|
||||||
|
- script: "dotnet test --configuration $(Configuration)"
|
||||||
|
workingDirectory: Tests
|
||||||
|
displayName: "Core Test"
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
|
||||||
|
workingDirectory: Server
|
||||||
|
displayName: "Tool Restore"
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
- script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:.vscode/TestResults/*/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
|
||||||
|
workingDirectory: Server
|
||||||
|
displayName: "Report Generator"
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
- script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Server --source $(NugetSource)'
|
||||||
|
workingDirectory: Server
|
||||||
|
displayName: "Core Publish"
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: "Copy Files"
|
||||||
|
inputs:
|
||||||
|
SourceFolder: '$(Build.ArtifactStagingDirectory)\Server'
|
||||||
|
TargetFolder: 'D:\$(CoreVersion)\$(Build.Repository.Name)\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)\Server'
|
||||||
|
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
displayName: "Publish Artifact: drop"
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
||||||
|
workingDirectory: Tests
|
||||||
|
displayName: "Core Clean - Tests"
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
||||||
|
workingDirectory: Server
|
||||||
|
displayName: "Core Clean - Server"
|
Loading…
x
Reference in New Issue
Block a user