This commit is contained in:
Sergey Zhemoytel 2024-07-02 22:14:28 +00:00
parent 1f8f51bf5c
commit 53c3f3127e

View file

@ -6,6 +6,8 @@
%else %else
%global goarch 386 %global goarch 386
%endif %endif
%define secscan 1
Name: terraform-provider-%{tfprovider} Name: terraform-provider-%{tfprovider}
Version: 0.122.0 Version: 0.122.0
@ -20,11 +22,21 @@ BuildRequires: git-core
BuildRequires: upx BuildRequires: upx
BuildRequires: terraform BuildRequires: terraform
%if %{secscan}
BuildRequires: clamav
BuildRequires: trivy
%endif
%description %description
%{summary} %{summary}
%prep %prep
%setup -q %setup -q
%if %{secscan}
clamscan -ir .
trivy fs --scanners vuln --format cosign-vuln .
%endif
%build %build
export GOPROXY=https://proxy.golang.org/cached-only export GOPROXY=https://proxy.golang.org/cached-only
@ -41,6 +53,13 @@ install -Dm0755 bin/%{name} %{buildroot}/%{_datadir}/terraform/plugins/tf.%{tfpr
%{_datadir}/terraform/plugins/tf.%{tfprovider}.online/mylocal/%{tfprovider}/%{version}/linux_%{goarch}/%{name} %{_datadir}/terraform/plugins/tf.%{tfprovider}.online/mylocal/%{tfprovider}/%{version}/linux_%{goarch}/%{name}
%check
export GOPROXY=https://proxy.golang.org/cached-only
#go test ./...
%if %{secscan}
clamscan -ir %{buildroot}
%endif