From 76ebf5edf018105cf4af37e43c54ea06c7d7f1b9 Mon Sep 17 00:00:00 2001 From: Doug Dyreng Date: Thu, 28 Mar 2024 12:02:15 -0600 Subject: [PATCH 1/3] Fix Repo Name So Workflow Will Run --- .github/workflows/build-and-review-pr.yml | 14 +++++++------- .gitignore | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-and-review-pr.yml b/.github/workflows/build-and-review-pr.yml index e4b7b87..3f7ecdf 100644 --- a/.github/workflows/build-and-review-pr.yml +++ b/.github/workflows/build-and-review-pr.yml @@ -67,7 +67,7 @@ jobs: env: ORG: 'im-open' THIS_REPO: 'setup-deploy-keys' - INTERNAL_REPO_TO_CLONE: 'im-open/internal-repo-for-testing' + INTERNAL_REPO_TO_CLONE: 'im-open/internal-repo-for-testing-purple-team' INTERNAL_REPO_TO_CLONE_DIR: 'internal-repo-for-testing' # The private key which will be used to clone the internal & empty deploy-keys-testing repo. @@ -76,7 +76,7 @@ jobs: INTERNAL_REPO_TO_CLONE_KEY: ${{ secrets.SSH_KEY_TESTING_REPO }} SSH_DEPLOY_KEY_INFO: | [ - { "orgAndRepo": "im-open/internal-repo-for-testing", "envName" : "INTERNAL_REPO_TO_CLONE_KEY" } + { "orgAndRepo": "im-open/internal-repo-for-testing-purple-team", "envName" : "INTERNAL_REPO_TO_CLONE_KEY" } ] steps: @@ -200,9 +200,9 @@ jobs: if [ $count -ne 3 ] then - echo -e "\nExpected 3 insteadOf entries in .gitconfig but found $count" + echo -e "\nExpected 3 insteadOf entries in .gitconfig but found $count" exit 1 - else + else echo -e "\nThere were 3 insteadOf entries in the .gitconfig as expected." fi @@ -239,7 +239,7 @@ jobs: id: unparseable continue-on-error: true # This is needed because we expect the step to fail. We need it to "pass" in order for the test job to succeed. with: - deploy-key-info: '[ orgAndRepo=im-open/internal-repo-for-testing, envName=INTERNAL_REPO_TO_CLONE_KEY ]' + deploy-key-info: '[ orgAndRepo=im-open/internal-repo-for-testing-purple-team, envName=INTERNAL_REPO_TO_CLONE_KEY ]' - name: Then the outcome should be failure if: always() @@ -310,7 +310,7 @@ jobs: with: deploy-key-info: | [ - { "orgAndRepo": "im-open/internal-repo-for-testing", "envName" : "" } + { "orgAndRepo": "im-open/internal-repo-for-testing-purple-team", "envName" : "" } ] - name: Then the outcome should be failure @@ -335,7 +335,7 @@ jobs: with: deploy-key-info: | [ - { "orgAndRepo": "im-open/internal-repo-for-testing", "envName" : "UNPOPULATED_ENV_VARIABLE" } + { "orgAndRepo": "im-open/internal-repo-for-testing-purple-team", "envName" : "UNPOPULATED_ENV_VARIABLE" } ] - name: Then the outcome should be failure diff --git a/.gitignore b/.gitignore index b6f7100..21ff07b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules/ -/.vscode/launch.json \ No newline at end of file +/.vscode/launch.json +.DS_Store From bb481b5f48005f09fba01e908f67b9c9161d8e43 Mon Sep 17 00:00:00 2001 From: Doug Dyreng Date: Thu, 28 Mar 2024 12:09:41 -0600 Subject: [PATCH 2/3] Correction to actual repo name: -im-open/internal-repo-for-testing-purple-team --- .github/workflows/build-and-review-pr.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-review-pr.yml b/.github/workflows/build-and-review-pr.yml index 3f7ecdf..5abd954 100644 --- a/.github/workflows/build-and-review-pr.yml +++ b/.github/workflows/build-and-review-pr.yml @@ -67,7 +67,7 @@ jobs: env: ORG: 'im-open' THIS_REPO: 'setup-deploy-keys' - INTERNAL_REPO_TO_CLONE: 'im-open/internal-repo-for-testing-purple-team' + INTERNAL_REPO_TO_CLONE: 'im-open/internal-repo-for-testing-purple-actions' INTERNAL_REPO_TO_CLONE_DIR: 'internal-repo-for-testing' # The private key which will be used to clone the internal & empty deploy-keys-testing repo. @@ -76,7 +76,7 @@ jobs: INTERNAL_REPO_TO_CLONE_KEY: ${{ secrets.SSH_KEY_TESTING_REPO }} SSH_DEPLOY_KEY_INFO: | [ - { "orgAndRepo": "im-open/internal-repo-for-testing-purple-team", "envName" : "INTERNAL_REPO_TO_CLONE_KEY" } + { "orgAndRepo": "im-open/internal-repo-for-testing-purple-actions", "envName" : "INTERNAL_REPO_TO_CLONE_KEY" } ] steps: @@ -239,7 +239,7 @@ jobs: id: unparseable continue-on-error: true # This is needed because we expect the step to fail. We need it to "pass" in order for the test job to succeed. with: - deploy-key-info: '[ orgAndRepo=im-open/internal-repo-for-testing-purple-team, envName=INTERNAL_REPO_TO_CLONE_KEY ]' + deploy-key-info: '[ orgAndRepo=im-open/internal-repo-for-testing-purple-actions, envName=INTERNAL_REPO_TO_CLONE_KEY ]' - name: Then the outcome should be failure if: always() @@ -310,7 +310,7 @@ jobs: with: deploy-key-info: | [ - { "orgAndRepo": "im-open/internal-repo-for-testing-purple-team", "envName" : "" } + { "orgAndRepo": "im-open/internal-repo-for-testing-purple-actions", "envName" : "" } ] - name: Then the outcome should be failure @@ -335,7 +335,7 @@ jobs: with: deploy-key-info: | [ - { "orgAndRepo": "im-open/internal-repo-for-testing-purple-team", "envName" : "UNPOPULATED_ENV_VARIABLE" } + { "orgAndRepo": "im-open/internal-repo-for-testing-purple-actions", "envName" : "UNPOPULATED_ENV_VARIABLE" } ] - name: Then the outcome should be failure From af4d80c0a9fde6005574de0c6c4d3b513c570747 Mon Sep 17 00:00:00 2001 From: Doug Dyreng Date: Thu, 28 Mar 2024 12:14:12 -0600 Subject: [PATCH 3/3] Apparently the CLONE_DIR must be updated as well --- .github/workflows/build-and-review-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-review-pr.yml b/.github/workflows/build-and-review-pr.yml index 5abd954..b66a3bc 100644 --- a/.github/workflows/build-and-review-pr.yml +++ b/.github/workflows/build-and-review-pr.yml @@ -68,7 +68,7 @@ jobs: ORG: 'im-open' THIS_REPO: 'setup-deploy-keys' INTERNAL_REPO_TO_CLONE: 'im-open/internal-repo-for-testing-purple-actions' - INTERNAL_REPO_TO_CLONE_DIR: 'internal-repo-for-testing' + INTERNAL_REPO_TO_CLONE_DIR: 'internal-repo-for-testing-purple-actions' # The private key which will be used to clone the internal & empty deploy-keys-testing repo. # The repo does not contain anything sensitive, it is just marked as internal so the key can be tested here.