-
Notifications
You must be signed in to change notification settings - Fork 218
Al2023 CI tests #1637
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
base: main
Are you sure you want to change the base?
Al2023 CI tests #1637
Conversation
Signed-off-by: Tadiwa Magwenzi <[email protected]>
Signed-off-by: Tadiwa Magwenzi <[email protected]>
S3_BUCKET_NAME: ${{ vars.S3_BUCKET_NAME }} | ||
S3_REGION: ${{ vars.S3_REGION }} | ||
|
||
permissions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: can we move these above the env
section?
cd $GITHUB_WORKSPACE | ||
cd package | ||
python3 generate_spec.py amzn2023 | ||
ls -la amzn2023-packaging.spec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this here?
|
||
- name: Generate Amazon Linux 2023 spec file | ||
run: | | ||
cd $GITHUB_WORKSPACE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can merge the cd
commands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, there should be quotes surrounding usage of environment variables
run: | | ||
cd $GITHUB_WORKSPACE | ||
|
||
echo " Extracting version from spec file..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this many echo statements?
|
||
cp package/amzn2023-packaging.spec ~/rpmbuild/SPECS/ | ||
|
||
cp LICENSE ~/rpmbuild/SOURCES/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These can all be merged together
cp THIRD_PARTY_LICENSES ~/rpmbuild/SOURCES/ | ||
echo "RPM Sources created" | ||
|
||
echo " Creating source tarball..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This dance here is confusing - it's not obvious where our cwd is at any given point
run: | | ||
# https://github.com/geerlingguy/docker-rockylinux9-ansible/issues/6 | ||
echo "y" | dnf install sudo | ||
chmod 0400 /etc/shadow || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why || true
?
- name: Avoid PAM issues by installing sudo interactively | ||
run: | | ||
# https://github.com/geerlingguy/docker-rockylinux9-ansible/issues/6 | ||
echo "y" | dnf install sudo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dnf install -y
run: | | ||
echo " Building binary RPM for version: $VERSION" | ||
|
||
sudo mock -r amazonlinux-2023-x86_64 --clean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to run clean before the initial build?
Signed-off-by: Tadiwa Magwenzi <[email protected]>
Signed-off-by: Tadiwa Magwenzi <[email protected]>
Signed-off-by: Tadiwa Magwenzi <[email protected]>
.github/workflows/al2023_build.yml
Outdated
name: AL2023 RPM Build Tests | ||
|
||
on: | ||
pull_request: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we remove pull_request_target
?
.github/workflows/al2023_build.yml
Outdated
run: | | ||
mkdir -p /mnt/s3-test | ||
|
||
TEST_PREFIX="github-actions-tmp/run-${{ github.run_id }}/rpm-test/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not make this part of the Github environment at the top?
Signed-off-by: Tadiwa Magwenzi <[email protected]>
Can you send an actions link to where it's passed in the most recent commit? |
|
||
- name: Generate Amazon Linux 2023 spec file | ||
run: | | ||
python3 package/generate_spec.py amzn2023 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we print the spec to the Github actions step summary?
Signed-off-by: Tadiwa Magwenzi <[email protected]>
Signed-off-by: Tadiwa Magwenzi <[email protected]>
What changed and why?
This PR adds a new GitHub Actions workflow that automatically tests RPM package builds for Amazon Linux 2023. The workflow creates both source and binary RPMs using mock in a clean AL2023 container environment, then validates the installation and basic functionality of the mount-s3 package. It includes end-to-end testing by actually mounting an S3 bucket and performing file operations to ensure the RPM works correctly. This ensures that RPM packages built for Amazon Linux 2023 are properly tested in CI before release, catching any packaging or compatibility issues early.
Does this change impact existing behavior?
Added more tests, for al2023 build compatibility
Does this change need a changelog entry? Does it require a version change?
No, just CI tests for al2023 intergration
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).