Skip to content

Commit

Permalink
Merge pull request #29 from jimklimov/zproject-markup-20181210
Browse files Browse the repository at this point in the history
Zproject markup 20181210
  • Loading branch information
jimklimov authored Dec 11, 2018
2 parents f87ab05 + 7e9c9c8 commit d46b87f
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 46 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This is a skeleton created by zproject.
# You can add hand-written code here.
### Note: Customized after generation; take care upon regens

save.xml
# Object files
*.o
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ env:
- CI_TIME=false
- CI_TRACE=false
- CI_CONFIG_QUIET=true
- CI_REQUIRE_GOOD_GITIGNORE=false
- CI_REQUIRE_GOOD_GITIGNORE=true
- CI_REQUIRE_GOOD_CLANG_FORMAT=true
- CI_TEST_DISTCHECK=true
# tokens to deploy releases on OBS and create/delete temporary branch on Github.
# 1) Create a token on https://github.com/settings/tokens/new with "public_repo"
# capability and encrypt it with travis encrypt --org -r <org>/<repo> GH_TOKEN="<token>"
Expand Down
32 changes: 31 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,26 @@ pipeline {
triggers {
pollSCM 'H/2 * * * *'
}

// Jenkins tends to reschedule jobs that have not yet completed if they took
// too long, maybe this happens in combination with polling. Either way, if
// the server gets into this situation, the snowball of same builds grows as
// the build system lags more and more. Let the devs avoid it in a few ways.
options {
disableConcurrentBuilds()
// Jenkins community suggested that instead of a default checkout, we can do
// an explicit step for that. It is expected that either way Jenkins "should"
// record that a particular commit is being processed, but the explicit ways
// might work better. In either case it honors SCM settings like refrepo if
// set up in the Pipeline or MultiBranchPipeline job.
skipDefaultCheckout()
}
// Note: your Jenkins setup may benefit from similar setup on side of agents:
// PATH="/usr/lib64/ccache:/usr/lib/ccache:/usr/bin:/bin:${PATH}"
stages {
stage ('pre-clean') {
steps {
milestone ordinal: 20, label: "${env.JOB_NAME}@${env.BRANCH_NAME}"
dir("tmp") {
sh 'if [ -s Makefile ]; then make -k distclean || true ; fi'
sh 'chmod -R u+w .'
Expand All @@ -145,10 +160,19 @@ pipeline {
sh 'rm -f ccache.log cppcheck.xml'
}
}
stage ('git') {
steps {
retry(3) {
checkout scm
}
milestone ordinal: 30, label: "${env.JOB_NAME}@${env.BRANCH_NAME}"
}
}
stage ('prepare') {
steps {
sh './autogen.sh'
stash (name: 'prepped', includes: '**/*', excludes: '**/cppcheck.xml')
milestone ordinal: 40, label: "${env.JOB_NAME}@${env.BRANCH_NAME}"
}
}
stage ('compile') {
Expand Down Expand Up @@ -530,7 +554,13 @@ pipeline {
def GIT_URL = sh(returnStdout: true, script: """git remote -v | egrep '^origin' | awk '{print \$2}' | head -1""").trim()
def GIT_COMMIT = sh(returnStdout: true, script: 'git rev-parse --verify HEAD').trim()
def DIST_ARCHIVE = ""
if ( params.DO_DIST_DOCS ) { DIST_ARCHIVE = env.BUILD_URL + "artifact/__dist.tar.gz" }
def msg = "Would deploy ${GIT_URL} ${GIT_COMMIT} because tested branch '${env.BRANCH_NAME}' matches filter '${myDEPLOY_BRANCH_PATTERN}'"
if ( params.DO_DIST_DOCS ) {
DIST_ARCHIVE = env.BUILD_URL + "artifact/__dist.tar.gz"
msg += ", using dist archive '${DIST_ARCHIVE}' to speed up deployment"
}
echo msg
milestone ordinal: 100, label: "${env.JOB_NAME}@${env.BRANCH_NAME}"
build job: "${myDEPLOY_JOB_NAME}", parameters: [
string(name: 'DEPLOY_GIT_URL', value: "${GIT_URL}"),
string(name: 'DEPLOY_GIT_BRANCH', value: env.BRANCH_NAME),
Expand Down
22 changes: 15 additions & 7 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -448,14 +448,18 @@ default|default-Werror|default-with-docs|valgrind|clang-format-check)
make check-gitignore
echo "==="

if [ "$CI_TEST_DISTCHECK" = false ]; then
make check
else
(
export DISTCHECK_CONFIGURE_FLAGS="--enable-drafts=yes ${CONFIG_OPTS[@]}"
$CI_TIME make VERBOSE=1 DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS" distcheck

echo "=== Are GitIgnores good after 'make distcheck' with drafts?"
make check-gitignore
echo "==="
export DISTCHECK_CONFIGURE_FLAGS="--enable-drafts=yes ${CONFIG_OPTS[@]}" && \
$CI_TIME make VERBOSE=1 DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS" distcheck || exit $?
)
fi

echo "=== Are GitIgnores good after 'make (dist)check' with drafts?"
make check-gitignore
echo "==="

# Build and check this project without DRAFT APIs
echo ""
Expand All @@ -468,14 +472,18 @@ default|default-Werror|default-with-docs|valgrind|clang-format-check)
$CI_TIME ./autogen.sh 2> /dev/null
$CI_TIME ./configure --enable-drafts=no "${CONFIG_OPTS[@]}"
$CI_TIME make VERBOSE=1 all || exit $?
if [ "$CI_TEST_DISTCHECK" = false ]; then
make check
else
(
export DISTCHECK_CONFIGURE_FLAGS="--enable-drafts=no ${CONFIG_OPTS[@]}" && \
$CI_TIME make VERBOSE=1 DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS" distcheck || exit $?
)
fi
) || exit 1
[ -z "$CI_TIME" ] || echo "`date`: Builds completed without fatal errors!"

echo "=== Are GitIgnores good after 'make distcheck' without drafts?"
echo "=== Are GitIgnores good after 'make (dist)check' without drafts?"
make check-gitignore
echo "==="

Expand Down
8 changes: 4 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -532,15 +532,15 @@ AS_IF([test x"${search_log4cplus}" = xyes], [
log4cplus_synthetic_libs="-llog4cplus"
if test -n "${with_log4cplus}" && test x"${with_log4cplus}" != xyes && test x"${with_log4cplus}" != xno; then
if test -r "${with_log4cplus}/include/log4cplus/logger.h"; then
if test -r "${with_log4cplus}/include/log4cplus/clogger.h"; then
log4cplus_synthetic_cflags="-I${with_log4cplus}/include"
log4cplus_synthetic_libs="-L${with_log4cplus}/lib -llog4cplus"
else
AC_MSG_ERROR([Header file ${with_log4cplus}/include/log4cplus/logger.h was not found. Please check log4cplus prefix])
AC_MSG_ERROR([Header file ${with_log4cplus}/include/log4cplus/clogger.h was not found. Please check log4cplus prefix])
fi
else
AC_CHECK_HEADER([log4cplus/logger.h], [],
AC_MSG_ERROR([Header file log4cplus/logger.h was not found in default search paths])
AC_CHECK_HEADER([log4cplus/clogger.h], [],
AC_MSG_ERROR([Header file log4cplus/clogger.h was not found in default search paths])
)
fi
Expand Down
80 changes: 47 additions & 33 deletions project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,92 +16,106 @@
<!-- option name = "clangformat_require_good" value = "1" / -->
<option name = "clangformat_allow_failures" value = "1" />
<option name = "use_pkg_deps_prereqs_source" value = "0" />
<option name = "require_gitignore" value = "1" />
</target>
<target name = "jenkins" >
<option name = "agent_label" value = "devel-image &amp;&amp; x86_64" />
<option name = "triggers_pollSCM" value = "H/2 * * * *" />
<option name = "test_cppcheck" value = "1" />
<option name = "build_docs" value = "1" />
<option name = "dist_docs" value = "1" />

<!-- Try to avoid avalanche rebuilds of same code on our CI -->
<option name = "use_earlymilestone" value = "1" />
<option name = "use_deploymilestone" value = "1" />
<option name = "use_build_nonconcurrent" value = "1" />
<option name = "use_checkout_explicit" value = "1" />
</target>

<include filename = "license.xml" />
<version major = "1" minor = "0" patch = "0" />

<use project = "czmq"
repository="https://github.com/42ity/czmq.git"
repository = "https://github.com/42ity/czmq.git"
release = "v3.0.2-FTY-master"
min_major = "3" min_minor = "0" min_patch = "2" >

<use project = "libzmq"
repository="https://github.com/42ity/libzmq.git"
repository = "https://github.com/42ity/libzmq.git"
release = "4.2.0-FTY-master" >

<use project = "libsodium" prefix = "sodium"
repository = "https://github.com/42ity/libsodium.git"
release = "1.0.5-FTY-master"
test = "sodium_init" />
test = "sodium_init"
/>
</use>
</use>

<use project = "malamute" min_major = "1" test = "mlm_server_test"
repository="https://github.com/42ity/malamute.git"
repository = "https://github.com/42ity/malamute.git"
release = "1.0-FTY-master"
/>

<use project = "fty-common-logging" libname = "libfty_common_logging" header="fty-log/fty_logger.h"
<!-- Note: pure C projects should use fty-log/fty_logger.h, C++ use fty_log.h -->
<use project = "fty-common-logging" libname = "libfty_common_logging"
header = "fty-log/fty_logger.h"
repository = "https://github.com/42ity/fty-common-logging.git"
release = "master"
test = "fty_common_logging_selftest" >

<use project = "log4cplus" header = "log4cplus/logger.h" test = "appender_test"
<!-- Note: pure C projects should use clogger.h, C++ use logger.h -->
<use project = "log4cplus"
header = "log4cplus/clogger.h"
test = "appender_test"
repository = "https://github.com/42ity/log4cplus.git"
release = "1.1.2-FTY-master"
/>
</use>

<use project = "fty-proto" libname = "libfty_proto" header="ftyproto.h" prefix="fty_proto"
min_major = "1" min_minor = "0" min_patch = "0"
repository = "https://github.com/42ity/fty-proto.git"
release = "master"
test = "fty_proto_test" >
<use project = "fty-proto" libname = "libfty_proto" header = "ftyproto.h" prefix = "fty_proto"
min_major = "1" min_minor = "0" min_patch = "0"
repository = "https://github.com/42ity/fty-proto.git"
release = "master"
test = "fty_proto_test" >

<use project = "czmq"
repository="https://github.com/42ity/czmq.git"
release = "v3.0.2-FTY-master"
min_major = "3" min_minor = "0" min_patch = "2" >
repository = "https://github.com/42ity/czmq.git"
release = "v3.0.2-FTY-master"
min_major = "3" min_minor = "0" min_patch = "2" >

<use project = "libzmq"
repository="https://github.com/42ity/libzmq.git"
release = "4.2.0-FTY-master" >
repository = "https://github.com/42ity/libzmq.git"
release = "4.2.0-FTY-master" >

<use project = "libsodium" prefix = "sodium"
repository = "https://github.com/42ity/libsodium.git"
release = "1.0.5-FTY-master"
test = "sodium_init" />
repository = "https://github.com/42ity/libsodium.git"
release = "1.0.5-FTY-master"
test = "sodium_init"
/>
</use>
</use>

<use project = "malamute" min_major = "1" test = "mlm_server_test"
repository="https://github.com/42ity/malamute.git"
release = "1.0-FTY-master"
/>
repository = "https://github.com/42ity/malamute.git"
release = "1.0-FTY-master"
/>

<use project = "fty-common-logging" libname = "libfty_common_logging" header="fty_log.h"
repository = "https://github.com/42ity/fty-common-logging.git"
release = "master"
test = "fty_common_logging_selftest" >
<use project = "fty-common-logging" libname = "libfty_common_logging" header = "fty_log.h"
repository = "https://github.com/42ity/fty-common-logging.git"
release = "master"
test = "fty_common_logging_selftest" >

<use project = "log4cplus" header = "log4cplus/logger.h" test = "appender_test"
repository = "https://github.com/42ity/log4cplus.git"
release = "1.1.2-FTY-master"
/>
repository = "https://github.com/42ity/log4cplus.git"
release = "1.1.2-FTY-master"
/>
</use>
</use>

<class name="cmstats" private="1" >Computing the stats on metrics</class>
<class name="cmsteps" private="1" >Helper class for list of steps</class>
<class name="fty_mc_server" state="stable" >Computation server implementation</class>
<class name = "cmstats" private = "1" >Computing the stats on metrics</class>
<class name = "cmsteps" private = "1" >Helper class for list of steps</class>
<class name = "fty_mc_server" state = "stable" >Computation server implementation</class>

<main name="fty-metric-compute" service="1" />
<main name = "fty-metric-compute" service = "1" />
</project>

0 comments on commit d46b87f

Please sign in to comment.