Skip to content

Commit

Permalink
initial support for using Jenkins CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Oct 13, 2015
1 parent 9f1e589 commit ce85593
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service_name: travis-ci
service_name: jenkins-ci
31 changes: 0 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,38 +1,7 @@
*.ami
*.la
*.lo
*.m4
*.pot
package/*.bz2
stamp-h*
aclocal.m4
autodocs-cc.ami
autodocs-cc-base.ami
autodocs-cc-off.ami
autodocs-ycp.ami
autom4te.cache
config.cache
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
configure.ac
/coverage/
/doc/
install-sh
libtool
ltconfig
ltmain.sh
Makefile
/Makefile.am
Makefile.am.common
Makefile.in
missing
mkinstalldirs
pluglib-bindings.ami
/nbproject/
test-driver
.yardoc/
13 changes: 13 additions & 0 deletions .spell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This is the repository specific custom dictionary
#
# Write the words in alphabetical order, one word per line.
# If an unknown word is generic put it into the global dictionary
# in yast-rake in lib/tasks/spell.yml file.

---
ignore:
- "doc/**/*"
- "coverage/**/*"
dictionary:
- SLE
- SMT
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
YaST - Registration Module
========================

[![Travis Build](https://travis-ci.org/yast/yast-registration.svg?branch=master)](https://travis-ci.org/yast/yast-registration)
[![Build Status](http://ci.opensuse.org/buildStatus/icon?job=yast-registration-github-ci)](http://ci.opensuse.org/view/Yast/job/yast-registration-github-ci/)
[![Coverage Status](https://img.shields.io/coveralls/yast/yast-registration.svg)](https://coveralls.io/r/yast/yast-registration?branch=master)
[![Code Climate](https://codeclimate.com/github/yast/yast-registration/badges/gpa.svg)](https://codeclimate.com/github/yast/yast-registration)
[![Inline docs](http://inch-ci.org/github/yast/yast-registration.svg?branch=master)](http://inch-ci.org/github/yast/yast-registration)
Expand All @@ -13,6 +13,6 @@ This is a YaST module for registering a SUSE Linux Enterprise (SLE) product to
The module is a part of SLE product installation or upgrade workflow.

A registered system will receive security updates and the functionality of the
system can be extented via online extensions or modules.
system can be extended via online extensions or modules.

See the wiki pages (https://github.com/yast/yast-registration/wiki) for more details.
28 changes: 27 additions & 1 deletion package/yast2-registration.spec
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ BuildRequires: rubygem(suse-connect) >= 0.2.0
BuildRequires: yast2-slp >= 3.1.2
BuildRequires: yast2-packager >= 3.1.26

# Install extra packages for running additional tests at the Jenkins CI builds.
# run manually: osc build --define "run_ci_tests 1"
# from sources: rake osc:build['--define "run_ci_tests 1"']
%if 0%{?run_ci_tests}
BuildRequires: rubygem(yast-rake-ci)
%endif


BuildArch: noarch

Summary: YaST2 - Registration Module
Expand All @@ -66,7 +74,25 @@ Authors:
%build

%check
rake test:unit
%if 0%{?run_ci_tests}
LC_ALL=en_US.UTF-8 \
COVERALLS_REPO_TOKEN='%{coveralls_repo_token}' \
CI_PULL_REQUEST='%{ci_pull_request}' \
JENKINS_URL='%{jenkins_url}' \
BUILD_URL='%{build_url}' \
GIT_BRANCH='%{git_branch}' \
GIT_COMMIT='%{git_commit}' \
GIT_ID='%{git_commit}' \
GIT_AUTHOR_NAME='%{git_author_name}' \
GIT_AUTHOR_EMAIL='%{git_author_email}' \
GIT_COMMITTER_NAME='%{git_commiter_name}' \
GIT_COMMITTER_EMAIL='%{git_commiter_email}' \
GIT_MESSAGE='%{git_message}' \
COVERAGE=1 CI=1 \
rake --verbose --trace check:ci
%else
rake test:unit
%endif

%install
rake install DESTDIR="%{buildroot}"
Expand Down
2 changes: 1 addition & 1 deletion test/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require "simplecov"

# use coveralls for on-line code coverage reporting at Travis CI
if ENV["TRAVIS"]
if ENV["TRAVIS"] || ENV["COVERALLS_REPO_TOKEN"]
require "coveralls"

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
Expand Down

0 comments on commit ce85593

Please sign in to comment.