forked from crc-org/crc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Testing Farm test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: {} | ||
|
||
# The concurrency key is used to prevent multiple workflows from running at the same time | ||
#concurrency: | ||
# group: my-concurrency-group | ||
# cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
# This is required for the ability to create Issue comment | ||
pull-requests: write | ||
# This is required for the ability to create/update the Pull request status | ||
statuses: write | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
# Let's schedule tests only on user request. NOT automatically. | ||
# Only repository owner or member can schedule tests | ||
#if: | | ||
# github.event.issue.pull_request | ||
# && contains(github.event.comment.body, '[test]') | ||
# && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) | ||
steps: | ||
- name: Schedule test on Testing Farm | ||
uses: sclorg/testing-farm-as-github-action@v2 | ||
with: | ||
api_key: ${{ secrets.TF_API_KEY }} | ||
compose: Fedora-40 | ||
arch: x86_64 | ||
git_ref: ${{ github.ref_name }} | ||
secrets: "PULL_SECRET=${{ secrets.PULL_SECRET }}" | ||
tmt_plan_regex: smoke_plan | ||
#variables: "SOME_DUMMY_VARIABLE =FOO_BAR_VARIABLE;OS_VARIABLE=DUMMY_OS" | ||
#tmt_plan_regex: "tf-test" | ||
#tmt_path: "test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
summary: Install CRC | ||
|
||
description: | | ||
Install CRC | ||
|
||
discover: | ||
how: fmf | ||
test: | ||
- /testing-farm/script | ||
|
||
provision: | ||
hardware: | ||
virtualization: | ||
is-virtualized: false | ||
is-supported: true | ||
compatible: | ||
distro: fedora40 | ||
|
||
execute: | ||
how: tmt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#source prepare.sh | ||
set -x | ||
set -e | ||
CRC_SCM="https://github.com/code-ready/crc.git" | ||
LIBVIRT_DRIVER_SCM="https://github.com/code-ready/machine-driver-libvirt.git" | ||
ADMINHELPER_SCM="https://github.com/code-ready/admin-helper.git" | ||
git clone $CRC_SCM | ||
|
||
git clone $LIBVIRT_DRIVER_SCM | ||
pushd machine-driver-libvirt | ||
mdl_version_line=$(cat pkg/libvirt/constants.go | grep DriverVersion) | ||
mdl_version=${mdl_version_line##*=} | ||
mdl_version=$(echo $mdl_version | xargs) | ||
go build -v -o crc-driver-libvirt-local ./cmd/machine-driver-libvirt | ||
popd | ||
|
||
git clone $ADMINHELPER_SCM | ||
admin_version_line=$(cat admin-helper/crc-admin-helper.spec.in | grep Version:) | ||
admin_version=${admin_version_line##*:} | ||
admin_version=$(echo $admin_version | xargs) | ||
make -C admin-helper out/linux-amd64/crc-admin-helper VERSION=$admin_version | ||
|
||
pushd crc | ||
mkdir -p custom_embedded | ||
cp ./../machine-driver-libvirt/crc-driver-libvirt-local custom_embedded/crc-driver-libvirt-amd64 | ||
cp ./../admin-helper/out/linux-amd64/crc-admin-helper custom_embedded/crc-admin-helper-linux-amd64 | ||
# Match admin-helper version with latest from master head | ||
sed -i "s/crcAdminHelperVersion.*=.*/crcAdminHelperVersion = \"${admin_version}\"\n/g" pkg/crc/version/version.go | ||
# Match machine-driver-libvirt version with latest from master head | ||
sed -i "s/MachineDriverVersion =.*/MachineDriverVersion = \"${mdl_version}\"/g" pkg/crc/machine/libvirt/constants.go | ||
make linux-release CUSTOM_EMBED=true EMBED_DOWNLOAD_DIR=custom_embedded | ||
popd | ||
|
||
# Download crc installer, first parmater is the install url | ||
#curl --insecure -LO -C - ${1} | ||
#sudo tar xvf crc-linux-amd64.tar.xz --strip-components 1 -C /usr/local/bin/ | ||
#crc version | ||
#rm crc-linux-amd64.tar.xz | ||
ls crc/release | ||
|
||
tar xvf crc/release/crc-linux-amd64.tar.xz --strip-components 1 -C /usr/local/bin/ | ||
crc version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
summary: Run an arbitrary script | ||
|
||
description: | | ||
Runs an arbitrary script specified by the SCRIPT environment variable. | ||
|
||
If not script given, `cat /etc/os-release` is used. | ||
|
||
test: | | ||
source prepare.sh | ||
./build.sh | ||
./test.sh | ||
|
||
# set the duration to 1h in case of more demanding commands | ||
duration: 60m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!bin/bash | ||
set -x | ||
cat /etc/fedora-release | ||
dnf install -y git libvirt libvirt-libs libvirt-devel gcc make | ||
#libvirt-glib pkg-config | ||
rpm -qa "*libvirt*" | ||
curl --insecure -LO -C - https://go.dev/dl/go1.22.5.linux-amd64.tar.gz | ||
tar -C /usr/local -xzf go1.22.5.linux-amd64.tar.gz | ||
export PATH=$PATH:/usr/local/go/bin | ||
export CGO_ENABLED="1" | ||
echo "${PULL_SECRET}" > ~/crc-pull-secret | ||
cat ~/crc-pull-secret | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
set -x | ||
set -e | ||
pushd crc | ||
make e2e PULL_SECRET_FILE=--pull-secret-file=~/crc-pull-secret | ||
make integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
summary: Basic smoke test | ||
execute: | ||
how: tmt | ||
script: | | ||
set +x | ||
echo "${PULL_SECRET}" > ~/crc-pull-secret | ||
cat ~/crc-pull-secret |