-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from ARGOeu/devel
Prepare to release v0.5.2-1
- Loading branch information
Showing
8 changed files
with
336 additions
and
13 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,151 @@ | ||
pipeline { | ||
agent any | ||
options { | ||
checkoutToSubdirectory('argo-ams-library') | ||
} | ||
environment { | ||
PROJECT_DIR="argo-ams-library" | ||
GIT_COMMIT=sh(script: "cd ${WORKSPACE}/$PROJECT_DIR && git log -1 --format=\"%H\"",returnStdout: true).trim() | ||
GIT_COMMIT_HASH=sh(script: "cd ${WORKSPACE}/$PROJECT_DIR && git log -1 --format=\"%H\" | cut -c1-7",returnStdout: true).trim() | ||
GIT_COMMIT_DATE=sh(script: "date -d \"\$(cd ${WORKSPACE}/$PROJECT_DIR && git show -s --format=%ci ${GIT_COMMIT_HASH})\" \"+%Y%m%d%H%M%S\"",returnStdout: true).trim() | ||
|
||
} | ||
stages { | ||
stage ('Test'){ | ||
parallel { | ||
stage ('Test Centos 6') { | ||
agent { | ||
docker { | ||
image 'argo.registry:5000/epel-6-ams' | ||
args '-u jenkins:jenkins' | ||
} | ||
} | ||
steps { | ||
echo 'Building Rpm...' | ||
sh ''' | ||
cd ${WORKSPACE}/$PROJECT_DIR | ||
coverage run -m unittest2 discover -v | ||
scl enable python27 rh-python36 'tox' | ||
scl enable rh-python36 'coverage xml --omit=*usr* --omit=*.tox*' | ||
''' | ||
cobertura coberturaReportFile: '**/coverage.xml' | ||
} | ||
} | ||
stage ('Test Centos 7') { | ||
agent { | ||
docker { | ||
image 'argo.registry:5000/epel-7-ams' | ||
args '-u jenkins:jenkins' | ||
} | ||
} | ||
steps { | ||
echo 'Building Rpm...' | ||
sh ''' | ||
cd ${WORKSPACE}/$PROJECT_DIR | ||
coverage run -m unittest2 discover -v | ||
scl enable python27 rh-python36 'tox' | ||
scl enable rh-python36 'coverage xml --omit=*usr* --omit=*.tox*' | ||
''' | ||
cobertura coberturaReportFile: '**/coverage.xml' | ||
} | ||
} | ||
} | ||
} | ||
stage ('Build'){ | ||
parallel { | ||
stage ('Build Centos 6') { | ||
agent { | ||
docker { | ||
image 'argo.registry:5000/epel-6-ams' | ||
args '-u jenkins:jenkins' | ||
} | ||
} | ||
steps { | ||
echo 'Building Rpm...' | ||
withCredentials(bindings: [sshUserPrivateKey(credentialsId: 'jenkins-rpm-repo', usernameVariable: 'REPOUSER', \ | ||
keyFileVariable: 'REPOKEY')]) { | ||
sh "/home/jenkins/build-rpm.sh -w ${WORKSPACE} -b ${BRANCH_NAME} -d centos6 -p ${PROJECT_DIR} -s ${REPOKEY}" | ||
} | ||
archiveArtifacts artifacts: '**/*.rpm', fingerprint: true | ||
} | ||
post { | ||
always { | ||
cleanWs() | ||
} | ||
} | ||
} | ||
stage ('Build Centos 7') { | ||
agent { | ||
docker { | ||
image 'argo.registry:5000/epel-7-ams' | ||
args '-u jenkins:jenkins' | ||
} | ||
} | ||
steps { | ||
echo 'Building Rpm...' | ||
withCredentials(bindings: [sshUserPrivateKey(credentialsId: 'jenkins-rpm-repo', usernameVariable: 'REPOUSER', \ | ||
keyFileVariable: 'REPOKEY')]) { | ||
sh "/home/jenkins/build-rpm.sh -w ${WORKSPACE} -b ${BRANCH_NAME} -d centos7 -p ${PROJECT_DIR} -s ${REPOKEY}" | ||
} | ||
archiveArtifacts artifacts: '**/*.rpm', fingerprint: true | ||
} | ||
post { | ||
always { | ||
cleanWs() | ||
} | ||
} | ||
} | ||
} | ||
} | ||
stage ('Upload to PyPI'){ | ||
when { | ||
branch 'master' | ||
} | ||
agent { | ||
docker { | ||
image 'argo.registry:5000/python3' | ||
} | ||
} | ||
steps { | ||
echo 'Build python package' | ||
withCredentials(bindings: [usernamePassword(credentialsId: 'pypi-token', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { | ||
sh ''' | ||
cd ${WORKSPACE}/$PROJECT_DIR | ||
pipenv install --dev | ||
pipenv run python setup.py sdist bdist_wheel | ||
pipenv run python -m twine upload -u $USERNAME -p $PASSWORD dist/* | ||
''' | ||
} | ||
} | ||
post { | ||
always { | ||
cleanWs() | ||
} | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
cleanWs() | ||
} | ||
success { | ||
script{ | ||
if ( env.BRANCH_NAME == 'devel' ) { | ||
build job: '/ARGO/argodoc/devel', propagate: false | ||
} else if ( env.BRANCH_NAME == 'master' ) { | ||
build job: '/ARGO/argodoc/master', propagate: false | ||
} | ||
if ( env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'devel' ) { | ||
slackSend( message: ":rocket: New version for <$BUILD_URL|$PROJECT_DIR>:$BRANCH_NAME Job: $JOB_NAME !") | ||
} | ||
} | ||
} | ||
failure { | ||
script{ | ||
if ( env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'devel' ) { | ||
slackSend( message: ":rain_cloud: Build Failed for <$BUILD_URL|$PROJECT_DIR>:$BRANCH_NAME Job: $JOB_NAME") | ||
} | ||
} | ||
} | ||
} | ||
} |
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,14 @@ | ||
[[source]] | ||
name = "pypi" | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
|
||
[dev-packages] | ||
setuptools = "*" | ||
twine = "*" | ||
wheel = "*" | ||
|
||
[packages] | ||
|
||
[requires] | ||
python_version = "*" |
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
|
||
Name: argo-ams-library | ||
Summary: %{sum} | ||
Version: 0.5.1 | ||
Version: 0.5.2 | ||
Release: 1%{?dist} | ||
|
||
Group: Development/Libraries | ||
|
@@ -95,6 +95,9 @@ rm -rf %{buildroot} | |
|
||
|
||
%changelog | ||
* Wed Jul 8 2020 Daniel Vrcic <[email protected]> - 0.5.2-1%{?dist} | ||
- ARGO-2479 Modify subscription offset method fails | ||
- ARGO-2360 Fix ack_sub retry loop | ||
* Mon Feb 10 2020 Daniel Vrcic <[email protected]> - 0.5.1-1%{?dist} | ||
- ARGO-2182 ams-lib does not retry on topic publish | ||
* Wed Dec 4 2019 Daniel Vrcic <[email protected]> - 0.5.0-1%{?dist} | ||
|
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
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
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
Oops, something went wrong.