Skip to content

Commit

Permalink
Cheat and copy prebuilt binary from github
Browse files Browse the repository at this point in the history
  • Loading branch information
jc21 committed Sep 12, 2022
1 parent 3b592eb commit 9424a40
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pipeline {
stages {
stage('Build') {
steps {
sh './build 7 haskell'
sh './build 7'
}
}
stage('Sign') {
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile.centos8
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pipeline {
stages {
stage('Build') {
steps {
sh './build 8 haskell'
sh './build 8'
}
}
stage('Sign') {
Expand Down
19 changes: 5 additions & 14 deletions SPECS/hadolint.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,21 @@ Release: 1
Summary: A smarter Dockerfile linter
License: GPL 3.0
URL: https://github.com/%{gh_user}/%{name}
Source: https://github.com/%{gh_user}/%{name}/archive/v%{version}.tar.gz
BuildRequires: glibc-static gmp-devel gmp-c++
#ncurses-libs
#
Source: https://github.com/%{gh_user}/%{name}/releases/download/v%{version}/hadolint-Linux-x86_64

%description
A smarter Dockerfile linter that helps you build best practice Docker images.
The linter is parsing the Dockerfile into an AST and performs rules on top of
the AST. It is standing on the shoulders of ShellCheck to lint the Bash code
inside RUN instructions.

%prep
%setup -q -n %{name}-%{version}

%build
LANG=en_US.UTF-8 stack build

%install
install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
stack install --local-bin-path $RPM_BUILD_ROOT%{_bindir}
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_bindir}
install -Dm0755 %{SOURCE0} %{buildroot}%{_bindir}/%{name}

%files
%license LICENSE
%doc README.md docs/*.md
%defattr(-,root,root,-)
%{_bindir}/%{name}

%changelog
Expand Down
3 changes: 2 additions & 1 deletion build
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ for SPECFILE in SPECS/*.spec; do
# Folder setup
echo -e "${BLUE}${YELLOW}Folder setup${RESET}"
rm -rf RPMS/* SRPMS/*
mkdir -p {RPMS,SRPMS,DEPS,SPECS,SOURCES}
mkdir -p {RPMS,SRPMS,DEPS,SPECS,SOURCES,BUILD}
chmod -R 777 {RPMS,SRPMS}

# Pull latest builder image
Expand Down Expand Up @@ -87,6 +87,7 @@ for SPECFILE in SPECS/*.spec; do
RPMBUILD=/home/rpmbuilder/rpmbuild
docker run --rm \
--name "rpmbuild-${BUILD_TAG:-centos${CENTOS_VERSION}-${PACKAGE}}" \
-v "${CWD}/BUILD:${RPMBUILD}/BUILD" \
-v "${CWD}/DEPS:${RPMBUILD}/DEPS" \
-v "${CWD}/RPMS:${RPMBUILD}/RPMS" \
-v "${CWD}/SRPMS:${RPMBUILD}/SRPMS" \
Expand Down

0 comments on commit 9424a40

Please sign in to comment.