Skip to content

Commit

Permalink
Merge pull request #311 from ARGOeu/devel
Browse files Browse the repository at this point in the history
AMS Release 1.0.7
  • Loading branch information
themiszamani authored Sep 23, 2020
2 parents 55b5507 + c413f53 commit 5ce0f29
Show file tree
Hide file tree
Showing 1,187 changed files with 23,702 additions and 518,472 deletions.
411 changes: 0 additions & 411 deletions Gopkg.lock

This file was deleted.

37 changes: 0 additions & 37 deletions Gopkg.toml

This file was deleted.

112 changes: 112 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
pipeline {
agent {
docker {
image 'argo.registry:5000/epel-7-mgo1.14'
args '-u jenkins:jenkins'
}
}
options {
checkoutToSubdirectory('argo-messaging')
newContainerPerStage()
}
environment {
PROJECT_DIR="argo-messaging"
GH_USER = 'newgrnetci'
GH_EMAIL = '<[email protected]>'
GOPATH="${WORKSPACE}/go"
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('Build') {
steps {
echo 'Build...'
sh """
mkdir -p ${WORKSPACE}/go/src/github.com/ARGOeu
ln -sf ${WORKSPACE}/${PROJECT_DIR} ${WORKSPACE}/go/src/github.com/ARGOeu/${PROJECT_DIR}
rm -rf ${WORKSPACE}/go/src/github.com/ARGOeu/${PROJECT_DIR}/${PROJECT_DIR}
cd ${WORKSPACE}/go/src/github.com/ARGOeu/${PROJECT_DIR}
go build
"""
}
}
stage('Test') {
steps {
echo 'Test & Coverage...'
sh """
cd ${WORKSPACE}/go/src/github.com/ARGOeu/${PROJECT_DIR}
gocov test -p 1 \$(go list ./... | grep -v /vendor/) | gocov-xml > ${WORKSPACE}/coverage.xml
go test -p 1 \$(go list ./... | grep -v /vendor/) -v=1 | go-junit-report > ${WORKSPACE}/junit.xml
"""
junit '**/junit.xml'
cobertura coberturaReportFile: '**/coverage.xml'

}
}
stage('Package') {
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 ('Deploy Docs') {
agent {
docker {
image 'node:buster'
}
}
steps {
echo 'Publish argo-messaging docs...'
sh '''
cd $WORKSPACE/$PROJECT_DIR
cd website
npm install
'''
sshagent (credentials: ['jenkins-master']) {
sh '''
cd $WORKSPACE/$PROJECT_DIR/website
mkdir ~/.ssh && ssh-keyscan -H github.com > ~/.ssh/known_hosts
git config --global user.email ${GH_EMAIL}
git config --global user.name ${GH_USER}
GIT_USER=${GH_USER} USE_SSH=true npm run deploy
'''
}
}
}
}
post{
always {
cleanWs()
}
success {
script{
if ( env.BRANCH_NAME == 'devel' ) {
build job: '/ARGO-utils/argo-swagger-docs', propagate: false
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")
}
}
}
}
}
4 changes: 3 additions & 1 deletion argo-messaging.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Name: argo-messaging
Summary: ARGO Messaging API for broker network
Version: 1.0.6
Version: 1.0.7
Release: 1%{?dist}
License: ASL 2.0
Buildroot: %{_tmppath}/%{name}-buildroot
Expand Down Expand Up @@ -63,6 +63,8 @@ go clean
%attr(0644,root,root) /usr/lib/systemd/system/argo-messaging.service

%changelog
* Wed Aug 05 2020 Agelos Tsalapatis <[email protected]> 1.0.7-1%{?dist}
- AMS release 1.0.7
* Wed Jan 08 2020 Agelos Tsalapatis <[email protected]> 1.0.6-1%{?dist}
- ARGO-1984 Prohibit duplicate project references in user profiles
- ARGO-1947 AMS subscriptions should be allowed to have slow start as their retry policy
Expand Down
Loading

0 comments on commit 5ce0f29

Please sign in to comment.