From 9904af7d42500986d7efdbb3480cb8ce682002ee Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 20 Sep 2024 12:21:09 -0700 Subject: [PATCH 1/3] Added bucket as a secret --- .github/workflows/CI.yml | 1 + .github/workflows/integration-tests.yml | 1 + src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e2c4dac09..ee96951a9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -247,6 +247,7 @@ jobs: AZURE_STORAGE_CONNECTION_STRING_GHES_WINDOWS: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING_GHES_WINDOWS }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_BUCKET_NAME: ${{ secrets.AWS_BUCKET_NAME }} LD_LIBRARY_PATH: '$LD_LIBRARY_PATH:${{ github.workspace }}/src/OctoshiftCLI.IntegrationTests/bin/Debug/net6.0/runtimes/ubuntu.18.04-x64/native' run: dotnet test src/OctoshiftCLI.IntegrationTests/OctoshiftCLI.IntegrationTests.csproj --filter "${{ matrix.source-vcs }}ToGithub" --logger:"junit;LogFilePath=integration-tests.xml" /p:VersionPrefix=9.9 diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 0ad03f27e..37408bc8f 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -172,6 +172,7 @@ jobs: AZURE_STORAGE_CONNECTION_STRING_GHES_WINDOWS: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING_GHES_WINDOWS }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_BUCKET_NAME: ${{ secrets.AWS_BUCKET_NAME }} GEI_DEBUG_MODE: 'true' LD_LIBRARY_PATH: '$LD_LIBRARY_PATH:${{ github.workspace }}/src/OctoshiftCLI.IntegrationTests/bin/Debug/net6.0/runtimes/ubuntu.18.04-x64/native' run: dotnet test src/OctoshiftCLI.IntegrationTests/OctoshiftCLI.IntegrationTests.csproj --filter "${{ matrix.source-vcs }}ToGithub" --logger:"junit;LogFilePath=integration-tests.xml" /p:VersionPrefix=9.9 diff --git a/src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs b/src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs index fbbb9e1e1..b6987c7c1 100644 --- a/src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs +++ b/src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs @@ -16,7 +16,6 @@ public sealed class BbsToGithub : IDisposable { private const string SSH_KEY_FILE = "ssh_key.pem"; - private const string AWS_BUCKET_NAME = "octoshift-migration-archives"; private const string AWS_REGION = "us-east-1"; private readonly ITestOutputHelper _output; @@ -115,6 +114,7 @@ await retryPolicy.Retry(async () => { _tokens.Add("AWS_ACCESS_KEY_ID", Environment.GetEnvironmentVariable("AWS_ACCESS_KEY_ID")); _tokens.Add("AWS_SECRET_ACCESS_KEY", Environment.GetEnvironmentVariable("AWS_SECRET_ACCESS_KEY")); + var aws_bucket_name = Environment.GetEnvironmentVariable("AWS_BUCKET_NAME") archiveUploadOptions = $" --aws-bucket-name {AWS_BUCKET_NAME} --aws-region {AWS_REGION}"; } From b53904fbe58fae3dc642d24bf4283f8b8ee0731b Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 20 Sep 2024 12:22:52 -0700 Subject: [PATCH 2/3] typo --- src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs b/src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs index b6987c7c1..64bacf7b7 100644 --- a/src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs +++ b/src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs @@ -114,8 +114,8 @@ await retryPolicy.Retry(async () => { _tokens.Add("AWS_ACCESS_KEY_ID", Environment.GetEnvironmentVariable("AWS_ACCESS_KEY_ID")); _tokens.Add("AWS_SECRET_ACCESS_KEY", Environment.GetEnvironmentVariable("AWS_SECRET_ACCESS_KEY")); - var aws_bucket_name = Environment.GetEnvironmentVariable("AWS_BUCKET_NAME") - archiveUploadOptions = $" --aws-bucket-name {AWS_BUCKET_NAME} --aws-region {AWS_REGION}"; + var awsBucketName = Environment.GetEnvironmentVariable("AWS_BUCKET_NAME") + archiveUploadOptions = $" --aws-bucket-name {awsBucketName} --aws-region {AWS_REGION}"; } await _targetHelper.RunBbsCliMigration( From d7ebc0f5f43cc6fd6f2d3bd67f625959448242d4 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 20 Sep 2024 15:55:22 -0700 Subject: [PATCH 3/3] Updates from editor --- src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs b/src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs index 64bacf7b7..df125fb21 100644 --- a/src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs +++ b/src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs @@ -114,7 +114,7 @@ await retryPolicy.Retry(async () => { _tokens.Add("AWS_ACCESS_KEY_ID", Environment.GetEnvironmentVariable("AWS_ACCESS_KEY_ID")); _tokens.Add("AWS_SECRET_ACCESS_KEY", Environment.GetEnvironmentVariable("AWS_SECRET_ACCESS_KEY")); - var awsBucketName = Environment.GetEnvironmentVariable("AWS_BUCKET_NAME") + var awsBucketName = Environment.GetEnvironmentVariable("AWS_BUCKET_NAME"); archiveUploadOptions = $" --aws-bucket-name {awsBucketName} --aws-region {AWS_REGION}"; }