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

Let sumaform tests pass with the s390 provider #1057

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/sumaform-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ jobs:
with:
repository: uyuni-project/sumaform
path: sumaform
- name: Download Feilong terraform provider asset
if: steps.tf_files.outputs.added_modified
uses: robinraju/[email protected]
with:
repository: Bischoff/terraform-provider-feilong
tag: v0.0.4
fileName: terraform-provider-feilong_0.0.4_linux_amd64.tar.gz
extract: true
- name: Validate files
if: steps.tf_files.outputs.added_modified
env:
Expand All @@ -44,7 +52,14 @@ jobs:
TF_VAR_RHLIKE_CLIENT_REPO: ""
TF_VAR_DEBLIKE_CLIENT_REPO: ""
TF_VAR_OPENSUSE_CLIENT_REPO: ""
TF_VAR_ZVM_ADMIN_TOKEN: ""
run: |
# Install feilong provider
srcdir=/home/runner/work/susemanager-ci/susemanager-ci/
dstdir=/usr/share/terraform/plugins/registry.terraform.io/bischoff/feilong/0.0.4/linux_amd64/
sudo mkdir -p $dstdir
sudo ln -s $srcdir/terraform-provider-feilong $dstdir

# Remove libvirt and feilong provider settings
sed -i \
-e '/provider *"/,/^[ \/#]*\}\s*$/d' \
Expand All @@ -54,6 +69,12 @@ jobs:
-e '/feilong =/d' \
${{steps.tf_files.outputs.added_modified}}

# Also exclude s390 minions from terraform plan
sed -i \
-e '/^module ".*s390.*" {$/,/^}$/d' \
-e '/.*s390.*_configuration *= module.*s390.*\.configuration/d' \
${{steps.tf_files.outputs.added_modified}}

# Setup sumaform with the 'null' backend
cd sumaform
ln -sfn ../backend_modules/null modules/backend
Expand Down