diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 07a109bd..31222545 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -95,7 +95,7 @@ jobs: $sourceFolder = Join-Path $env:GITHUB_WORKSPACE "out" | Join-Path -ChildPath "*" $outFolder = Join-Path $env:GITHUB_WORKSPACE "out" | Join-Path -ChildPath "continuous-clearing" New-Item -ItemType Directory -Force -Path $outFolder - $fileName = "continuous-clearing-v6.0.1.zip" + $fileName = "continuous-clearing-v6.0.2.zip" Write-Host "Filename: '$fileName'" Write-Host "sourceFolder: '$sourceFolder'" Write-Host "Outfolder: '$outFolder'" @@ -139,8 +139,8 @@ jobs: - name: Create Nuget Packages id: createNupkg run: | - nuget pack CA.nuspec -Version 6.0.1 - Write-Host "::set-output name=nupkg-LicenseClearingTool::continuous-clearing.6.0.1.nupkg" + nuget pack CA.nuspec -Version 6.0.2 + Write-Host "::set-output name=nupkg-LicenseClearingTool::continuous-clearing.6.0.2.nupkg" - name: Archive NuGet Packages uses: actions/upload-artifact@v2 @@ -153,9 +153,9 @@ jobs: id: builddocker #if: ${{ false }} # disable for now run: | - docker build . --file Dockerfile --tag ${{ github.repository }}:continuous-clearing-v6.0.1 - docker save ${{ github.repository }}:continuous-clearing-v6.0.1 -o continuous-clearing-v6.0.1.tar - Write-Host "::set-output name=docker-LicenseClearingTool::continuous-clearing-v6.0.1.tar" + docker build . --file Dockerfile --tag ${{ github.repository }}:continuous-clearing-v6.0.2 + docker save ${{ github.repository }}:continuous-clearing-v6.0.2 -o continuous-clearing-v6.0.2.tar + Write-Host "::set-output name=docker-LicenseClearingTool::continuous-clearing-v6.0.2.tar" - name: Archive docker image #if: ${{ false }} # disable for now @@ -196,8 +196,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: v6.0.1 - release_name: Release v6.0.1 + tag_name: v6.0.2 + release_name: Release v6.0.2 body: | ${{ github.event.head_commit.message }} draft: true diff --git a/CA.nuspec b/CA.nuspec index 453956ce..a2ef50a7 100644 --- a/CA.nuspec +++ b/CA.nuspec @@ -4,7 +4,7 @@ continuous-clearing - 6.0.1 + 6.0.2 Siemens AG continuous-clearing contributors https://github.com/siemens/continuous-clearing diff --git a/src/ArtifactoryUploader/ArtifactoryValidator.cs b/src/ArtifactoryUploader/ArtifactoryValidator.cs index 11af4690..b0027997 100644 --- a/src/ArtifactoryUploader/ArtifactoryValidator.cs +++ b/src/ArtifactoryUploader/ArtifactoryValidator.cs @@ -13,6 +13,7 @@ using System.Net.Http; using System.Reflection; using System.Threading.Tasks; +using System.Net; namespace LCT.ArtifactoryUploader { @@ -27,18 +28,15 @@ public ArtifactoryValidator(NpmJfrogApiCommunication jfrogApiCommunication) JfrogApiCommunication = jfrogApiCommunication; } - public async Task ValidateArtifactoryCredentials(CommonAppSettings appSettings) - { - HttpResponseMessage responseMessage = await JfrogApiCommunication.GetApiKey(); - string response = await responseMessage.Content.ReadAsStringAsync(); - JfrogKey apiKey = JsonConvert.DeserializeObject(response); + public async Task ValidateArtifactoryCredentials(CommonAppSettings appSettings) + { + HttpResponseMessage responseMessage = await JfrogApiCommunication.GetApiKey(); - bool isValid = apiKey.ApiKey == appSettings.ArtifactoryUploadApiKey; - if (!isValid) - { - Logger.Error("Artifactory Token entered is invalid!"); - throw new InvalidDataException($"Invalid Artifactory Token"); - } + if (responseMessage.StatusCode != HttpStatusCode.OK) + { + Logger.Error("Artifactory Token entered is invalid!"); + throw new InvalidDataException($"Invalid Artifactory Token"); + } } } } diff --git a/src/LCT.Common/appSettings.json b/src/LCT.Common/appSettings.json index 19d7ad22..e4bdde8d 100644 --- a/src/LCT.Common/appSettings.json +++ b/src/LCT.Common/appSettings.json @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- { - "CaVersion": "6.0.1", + "CaVersion": "6.0.2", "TimeOut": 200, "ProjectType": "", "SW360ProjectName": "",