Skip to content

Commit

Permalink
ci: add greenboot ci
Browse files Browse the repository at this point in the history
  • Loading branch information
yih-redhat committed Oct 17, 2023
1 parent 37d84a0 commit 0da4650
Show file tree
Hide file tree
Showing 8 changed files with 151 additions and 190 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
run: |
echo "User '${{ github.event.sender.login }}' has permission '${{ fromJson(steps.user_permission.outputs.data).permission }}' allowed values: 'admin', 'write'"
echo "allowed_user=true" >> $GITHUB_OUTPUT
- name: Get information for pull request
uses: octokit/[email protected]
id: pr-api
Expand All @@ -40,6 +41,7 @@ jobs:
outputs:
allowed_user: ${{ steps.check_user_perm.outputs.allowed_user }}
sha: ${{ fromJson(steps.pr-api.outputs.data).head.sha }}
base_ref: ${{ fromJson(steps.pr-api.outputs.data).base.ref }}

comment-info:
needs: pr-info
Expand Down Expand Up @@ -91,9 +93,10 @@ jobs:

pre-greenboot-rs-39:
needs: pr-info
if: ${{ needs.pr-info.outputs.allowed_user == 'true' }} &&
if: ${{ needs.pr-info.outputs.base_ref == 'greenboot-rs' &&
needs.pr-info.outputs.allowed_user == 'true' &&
(startsWith(github.event.comment.body, '/greenboot-rs-test-all') ||
startsWith(github.event.comment.body, '/greenboot-rs-test-39'))}}
startsWith(github.event.comment.body, '/greenboot-rs-test-39')) }}
runs-on: ubuntu-latest
env:
STATUS_NAME: greenboot-rs-39
Expand All @@ -112,9 +115,10 @@ jobs:

greenboot-rs-39:
needs: [pr-info, comment-info, pre-greenboot-rs-39]
if: ${{ needs.pr-info.outputs.allowed_user == 'true' }} &&
if: ${{ needs.pr-info.outputs.base_ref == 'greenboot-rs' &&
needs.pr-info.outputs.allowed_user == 'true' &&
(startsWith(github.event.comment.body, '/greenboot-rs-test-all') ||
startsWith(github.event.comment.body, '/greenboot-rs-test-39'))}}
startsWith(github.event.comment.body, '/greenboot-rs-test-39')) }}
runs-on: [kite, x86_64, gcp, fedora-39, large]
env:
STATUS_NAME: greenboot-rs-39
Expand All @@ -139,21 +143,13 @@ jobs:
ref: ${{ needs.pr-info.outputs.sha }}
fetch-depth: 0

- name: Checkout greenboot-rs code
uses: actions/checkout@v3
with:
repository: say-paul/greenboot
ref: greenboot-rs-continued
path: greenboot

- name: Build greenboot PRM pakcages
run: make rpm
working-directory: greenboot

- name: Prepare greenboot
run: |
sudo mkdir -p /var/www/html/source
sudo cp ./greenboot/rpmbuild/RPMS/x86_64/* /var/www/html/source/ 2>/dev/null || :
sudo cp ./rpmbuild/RPMS/x86_64/* /var/www/html/source/ 2>/dev/null || :
sudo createrepo_c /var/www/html/source
sudo restorecon -Rv /var/www/html/source
sudo ls -al /var/www/html/source
Expand Down Expand Up @@ -198,26 +194,12 @@ jobs:
make rpm
sudo cp rpmbuild/RPMS/x86_64/* /var/www/html/source/
sudo ls -al /var/www/html/source/
sudo createrepo_c /var/www/html/source
sudo restorecon -Rv /var/www/html/source
sudo tee "/etc/yum.repos.d/source.repo" > /dev/null << EOF
[source]
name = source
baseurl = file:///var/www/html/source/
enabled = 1
gpgcheck = 0
priority = 5
EOF
sudo dnf info osbuild osbuild-composer
sudo dnf install -y ./rpmbuild/RPMS/x86_64/osbuild-composer-*
working-directory: ./osbuild-composer

- name: Run greenboot-rs.sh test
run: ./greenboot-rs.sh
working-directory: greenboot-test
working-directory: tests
timeout-minutes: 100

- name: Set result status
Expand Down
140 changes: 0 additions & 140 deletions greenboot-test/setup.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 0da4650

Please sign in to comment.