Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Fix git build info for checklist Workflow #9646

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MichelZ
Copy link
Contributor

@MichelZ MichelZ commented Dec 11, 2024

Fixes #9592

Summary of Changes

This pull request introduces a change to the scripts/git_build_info.js file to enhance the build process by configuring the Git safe directory.

Build process improvement:

  • scripts/git_build_info.js: Added a try block to set the Git safe directory to /external to avoid errors when running git commands outside of a git repository. This ensures the build process can proceed smoothly even in different environments.

Screenshots (if necessary)

References

Additional context

Execution of the Workflow "Build InGamePanels Chechlist Fix" is failing:
https://github.com/flybywiresim/aircraft/actions/runs/11999917978/job/33448395480#step:6:34

The issue is: "Git failed Error: Command failed: git rev-parse --abbrev-ref HEAD"

Executing the command manually in the container reveals the issue:

michelz@BEASTLI:/mnt/g/MIZE/dev/GitHub/flybywiresim-aircraft$ ./scripts/dev-env/run.sh git show-ref -s HEAD
fatal: detected dubious ownership in repository at '/external'
To add an exception for this directory, call:

        git config --global --add safe.directory /external

which is then fixed when using the mentioned command:

michelz@BEASTLI:/mnt/g/MIZE/dev/GitHub/flybywiresim-aircraft$ ./scripts/dev-env/run.sh git config --global --add safe.directory /external && git show-ref -s HEAD
33c4a62f9e8074ad140848c399072f46dd880c69

Testing instructions

  • Execute the commands in the Workflow template, e.g.:
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
./scripts/dev-env/run.sh ./scripts/build_ingamepanels_checklist_fix.sh --no-tty -j 4
./scripts/dev-env/run.sh node ./scripts/fragment-ingamepanels-checklist-fix.js

This will fail in master and will succeed in this PR branch

How to download the PR for QA

Every new commit to this PR will cause new A32NX and A380X artifacts to be created, built, and uploaded.

  1. Make sure you are signed in to GitHub
  2. Click on the Checks tab on the PR
  3. On the left side, find and click on the PR Build tab
  4. Click on either flybywire-aircraft-a320-neo, flybywire-aircraft-a380-842 (4K) or flybywire-aircraft-a380-842 (8K) download link at the bottom of the page

@MichelZ MichelZ changed the title Fix git build info for checklist Workflow chore: Fix git build info for checklist Workflow Dec 11, 2024
@MichelZ MichelZ changed the title chore: Fix git build info for checklist Workflow ci: Fix git build info for checklist Workflow Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🟡 Code Review: Ready for Review
Development

Successfully merging this pull request may close these issues.

Checklist Workflow Failing
1 participant