-
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
0 parents
commit 4824654
Showing
5 changed files
with
281 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,9 @@ | ||
.idea | ||
._* | ||
.DS_Store | ||
RPMS | ||
SRPMS | ||
DEPS | ||
BUILD | ||
BUILDROOT | ||
|
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,114 @@ | ||
#!/usr/bin/env groovy | ||
pipeline { | ||
options { | ||
buildDiscarder(logRotator(numToKeepStr: '10')) | ||
disableConcurrentBuilds() | ||
} | ||
agent { | ||
label 'rpm' | ||
} | ||
stages { | ||
stage('Prepare') { | ||
steps { | ||
sh 'docker pull ${DOCKER_RPMBUILD_EL6}' | ||
sh 'docker pull ${DOCKER_CI_TOOLS}' | ||
} | ||
} | ||
stage('Build') { | ||
steps { | ||
sh '''CWD=`pwd` | ||
PACKAGE=prettyping | ||
BUILD_SPEC_ARGS= | ||
mkdir -p RPMS && chmod -R 777 RPMS | ||
mkdir -p SRPMS && chmod -R 777 SRPMS | ||
CMD="docker run --rm \\ | ||
--name rpmbuild-$BUILD_TAG \\ | ||
-v $CWD/RPMS:/home/rpmbuilder/rpmbuild/RPMS \\ | ||
-v $CWD/SRPMS:/home/rpmbuilder/rpmbuild/SRPMS \\ | ||
-v $CWD/SPECS:/home/rpmbuilder/rpmbuild/SPECS \\ | ||
-v $CWD/SOURCES:/home/rpmbuilder/rpmbuild/SOURCES \\ | ||
${DOCKER_RPMBUILD_EL6} \\ | ||
/bin/build-spec $BUILD_SPEC_ARGS -- /home/rpmbuilder/rpmbuild/SPECS/$PACKAGE.spec" | ||
$CMD | ||
exit $?''' | ||
} | ||
} | ||
stage('Sign') { | ||
steps { | ||
sh '''rm -rf sign | ||
mkdir -p sign | ||
exit 0''' | ||
dir(path: 'sign') { | ||
git(url: "${RPM_SIGN_GIT_REPO}", credentialsId: "${RPM_SIGN_CREDENTIALS_ID}") | ||
sh 'chmod 600 .gnupg/*' | ||
} | ||
|
||
sh '''CWD=`pwd` | ||
for RPMFILE in RPMS/*/*.rpm | ||
do | ||
CMD="docker run --rm \\ | ||
--name rpmbuild-$BUILD_TAG \\ | ||
-v $CWD/RPMS:/data/RPMS \\ | ||
-v $CWD/sign:/data/sign \\ | ||
-v $CWD/sign/.rpmmacros:/root/.rpmmacros \\ | ||
-v $CWD/sign/.gnupg:/root/.gnupg \\ | ||
${DOCKER_CI_TOOLS} \\ | ||
/data/sign/addsign.exp /data/$RPMFILE" | ||
$CMD | ||
# exit if bad return code | ||
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi | ||
done | ||
# source rpms | ||
for RPMFILE in SRPMS/*.src.rpm | ||
do | ||
CMD="docker run --rm \\ | ||
--name rpmbuild-$BUILD_TAG \\ | ||
-v $CWD/SRPMS:/data/SRPMS \\ | ||
-v $CWD/sign:/data/sign \\ | ||
-v $CWD/sign/.rpmmacros:/root/.rpmmacros \\ | ||
-v $CWD/sign/.gnupg:/root/.gnupg \\ | ||
${DOCKER_CI_TOOLS} \\ | ||
/data/sign/addsign.exp /data/$RPMFILE" | ||
$CMD | ||
# exit if bad return code | ||
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi | ||
done | ||
''' | ||
} | ||
} | ||
stage('Publish') { | ||
steps { | ||
dir(path: 'RPMS') { | ||
archiveArtifacts(artifacts: '**/*/*.rpm', caseSensitive: true, onlyIfSuccessful: true) | ||
} | ||
|
||
dir(path: 'SRPMS') { | ||
archiveArtifacts(artifacts: '**/*.src.rpm', caseSensitive: true, onlyIfSuccessful: true, allowEmptyArchive: true) | ||
} | ||
} | ||
} | ||
} | ||
triggers { | ||
bitbucketPush() | ||
} | ||
post { | ||
success { | ||
juxtapose event: 'success' | ||
sh 'figlet "SUCCESS"' | ||
} | ||
failure { | ||
juxtapose event: 'failure' | ||
sh 'figlet "FAILURE"' | ||
} | ||
} | ||
} |
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,114 @@ | ||
#!/usr/bin/env groovy | ||
pipeline { | ||
options { | ||
buildDiscarder(logRotator(numToKeepStr: '10')) | ||
disableConcurrentBuilds() | ||
} | ||
agent { | ||
label 'rpm' | ||
} | ||
stages { | ||
stage('Prepare') { | ||
steps { | ||
sh 'docker pull ${DOCKER_RPMBUILD_EL7}' | ||
sh 'docker pull ${DOCKER_CI_TOOLS}' | ||
} | ||
} | ||
stage('Build') { | ||
steps { | ||
sh '''CWD=`pwd` | ||
PACKAGE=prettyping | ||
BUILD_SPEC_ARGS= | ||
mkdir -p RPMS && chmod -R 777 RPMS | ||
mkdir -p SRPMS && chmod -R 777 SRPMS | ||
CMD="docker run --rm \\ | ||
--name rpmbuild-$BUILD_TAG \\ | ||
-v $CWD/RPMS:/home/rpmbuilder/rpmbuild/RPMS \\ | ||
-v $CWD/SRPMS:/home/rpmbuilder/rpmbuild/SRPMS \\ | ||
-v $CWD/SPECS:/home/rpmbuilder/rpmbuild/SPECS \\ | ||
-v $CWD/SOURCES:/home/rpmbuilder/rpmbuild/SOURCES \\ | ||
${DOCKER_RPMBUILD_EL7} \\ | ||
/bin/build-spec $BUILD_SPEC_ARGS -- /home/rpmbuilder/rpmbuild/SPECS/$PACKAGE.spec" | ||
$CMD | ||
exit $?''' | ||
} | ||
} | ||
stage('Sign') { | ||
steps { | ||
sh '''rm -rf sign | ||
mkdir -p sign | ||
exit 0''' | ||
dir(path: 'sign') { | ||
git(url: "${RPM_SIGN_GIT_REPO}", credentialsId: "${RPM_SIGN_CREDENTIALS_ID}") | ||
sh 'chmod 600 .gnupg/*' | ||
} | ||
|
||
sh '''CWD=`pwd` | ||
for RPMFILE in RPMS/*/*.rpm | ||
do | ||
CMD="docker run --rm \\ | ||
--name rpmbuild-$BUILD_TAG \\ | ||
-v $CWD/RPMS:/data/RPMS \\ | ||
-v $CWD/sign:/data/sign \\ | ||
-v $CWD/sign/.rpmmacros:/root/.rpmmacros \\ | ||
-v $CWD/sign/.gnupg:/root/.gnupg \\ | ||
${DOCKER_CI_TOOLS} \\ | ||
/data/sign/addsign.exp /data/$RPMFILE" | ||
$CMD | ||
# exit if bad return code | ||
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi | ||
done | ||
# source rpms | ||
for RPMFILE in SRPMS/*.src.rpm | ||
do | ||
CMD="docker run --rm \\ | ||
--name rpmbuild-$BUILD_TAG \\ | ||
-v $CWD/SRPMS:/data/SRPMS \\ | ||
-v $CWD/sign:/data/sign \\ | ||
-v $CWD/sign/.rpmmacros:/root/.rpmmacros \\ | ||
-v $CWD/sign/.gnupg:/root/.gnupg \\ | ||
${DOCKER_CI_TOOLS} \\ | ||
/data/sign/addsign.exp /data/$RPMFILE" | ||
$CMD | ||
# exit if bad return code | ||
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi | ||
done | ||
''' | ||
} | ||
} | ||
stage('Publish') { | ||
steps { | ||
dir(path: 'RPMS') { | ||
archiveArtifacts(artifacts: '**/*/*.rpm', caseSensitive: true, onlyIfSuccessful: true) | ||
} | ||
|
||
dir(path: 'SRPMS') { | ||
archiveArtifacts(artifacts: '**/*.src.rpm', caseSensitive: true, onlyIfSuccessful: true, allowEmptyArchive: true) | ||
} | ||
} | ||
} | ||
} | ||
triggers { | ||
bitbucketPush() | ||
} | ||
post { | ||
success { | ||
juxtapose event: 'success' | ||
sh 'figlet "SUCCESS"' | ||
} | ||
failure { | ||
juxtapose event: 'failure' | ||
sh 'figlet "FAILURE"' | ||
} | ||
} | ||
} |
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,4 @@ | ||
# [prettyping](https://github.com/denilsonsa/prettyping) | ||
|
||
Builds for Centos 6/7 hosted on [yum.jc21.com](https://yum.jc21.com) | ||
|
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,40 @@ | ||
%global debug_package %{nil} | ||
|
||
Name: prettyping | ||
Version: 1.0.1 | ||
Release: 1%{?dist} | ||
Summary: prettyping is a wrapper around the standard ping tool, making the output prettier, more colorful, more compact, and easier to read. | ||
License: MIT | ||
URL: https://github.com/denilsonsa/%{name} | ||
BuildArch: noarch | ||
Requires: bash >= 3.0 | ||
|
||
%description | ||
prettyping is a wrapper around the standard ping tool with the objective of making | ||
the output prettier, more colorful, more compact, and easier to read. prettyping | ||
runs the standard ping in the background and parses its output, showing the ping | ||
responses in a graphical way at the terminal (by using colors and Unicode characters). | ||
prettyping is written in bash and awk, and is reported to work on many different | ||
systems (Linux, Mac OS X, BSD…), as well as running on different versions of awk | ||
(gawk, mawk, nawk, busybox awk). | ||
|
||
%prep | ||
wget https://github.com/denilsonsa/%{name}/archive/v%{version}.tar.gz | ||
tar xzf v%{version}.tar.gz | ||
|
||
%build | ||
cd %{name}-%{version} | ||
sed 's,/usr/bin/env bash,/bin/bash,g' -i prettyping | ||
|
||
%install | ||
mkdir -p %{buildroot}/usr/bin | ||
install -m755 %{name}-%{version}/%{name} %{buildroot}/usr/bin | ||
|
||
%files | ||
%{_bindir}/%{name} | ||
%doc %{name}-%{version}/README.md | ||
|
||
%changelog | ||
* Fri Aug 31 2018 Jamie Curnow <[email protected]> - 1.0.1-1 | ||
- Initial spec | ||
|