Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CI workflows: continuous-integration.yml (#3815)
### **PR Description** This PR addresses the issue of the failing [continuous-integration](https://github.com/department-of-veterans-affairs/abd-vro/blob/5fd9d352ea2e5f8d2a341669cafd1cb18b6bdd5e/.github/workflows/continuous-integration.yml#L1-L74) workflow in the `abd-vro-internal` repository. #### **Background** The continuous-integration workflow has been failing for months, and there is no record of a successful run in the `abd-vro-internal` repository. ([See workflow run history](https://github.com/department-of-veterans-affairs/abd-vro-internal/actions/workflows/continuous-integration.yml)). ![image](https://github.com/user-attachments/assets/c9540c9b-83df-41f4-876e-bddfec4ef8e8) #### **Root Cause** The likely cause of the failures is the absence of the `ACCESS_TOKEN_CHECKOUT_INTERNAL_REPO` secret in `abd-vro-internal`. ([See missing secret in repository settings](https://github.com/department-of-veterans-affairs/abd-vro-internal/settings/secrets/actions)). This variable is used in the workflow and is needed for checking out dependencies from the internal repository. ([See usage in workflow](https://github.com/department-of-veterans-affairs/abd-vro/blob/b046987e9c6cf8babef566cef31d87161ef51219/.github/workflows/ee-ep-merge-end-to-end.yml#L13-L27)). #### **Rationale** The `abd-vro-internal` CI workflow fails consistently due to this misconfiguration and doesn’t provide additional insights beyond what is already available in the `abd-vro` repository. Running the same workflow in both repositories introduces risks of: - **Misconfigurations:** Variables or settings missing in one repository. - **De-synchronization:** Potential for the two workflows to become out of sync over time. - **Redundancy:** Duplicate workflows without added value. Since the CI workflow passes successfully in `abd-vro` and only fails in `abd-vro-internal` due to Git-related issues, the `abd-vro-internal` runs do not offer meaningful insight or benefit. #### **Solution** This PR limits the execution of the CI workflow to the `abd-vro` repository by adding a conditional check: ```yaml if: github.repository == 'department-of-veterans-affairs/abd-vro' ``` This ensures that CI runs are limited to the `abd-vro` repository, where the workflow is properly configured, avoiding redundant failures in `abd-vro-internal`. #### **How to Test** 1. Verify that the CI workflow in `abd-vro` executes successfully. 2. Confirm that the CI workflow does not run in the `abd-vro-internal` repository. Errata: ``` Checkout abd-vro-dev-secrets repo Determining the default branch Retrieving the default branch name Not Found - https://docs.github.com/rest/repos/repos#get-a-repository Waiting 10 seconds before trying again Retrieving the default branch name Not Found - https://docs.github.com/rest/repos/repos#get-a-repository Waiting 10 seconds before trying again Retrieving the default branch name Error: Not Found - https://docs.github.com/rest/repos/repos#get-a-repository ``` ``` * What went wrong: A problem occurred configuring root project 'abd_vro'. > Could not resolve all artifacts for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.3.3. Required by: root project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.3.3 > Dependency requires at least JVM runtime version 17. This build uses a Java 11 JVM. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.7.14. Required by: root project : > project :gradle-plugins > org.springdoc.openapi-gradle-plugin:org.springdoc.openapi-gradle-plugin.gradle.plugin:1.8.0 > org.springdoc:springdoc-openapi-gradle-plugin:1.8.0 > Dependency requires at least JVM runtime version 17. This build uses a Java 11 JVM. * Try: > Run this build using a Java 17 or newer JVM. > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. BUILD FAILED in 1m Error: Process completed with exit code 1. ```
- Loading branch information