first commit
This commit is contained in:
commit
8e220f9112
|
@ -0,0 +1 @@
|
|||
*.pyc
|
|
@ -0,0 +1,29 @@
|
|||
@Library('eo-jenkins-lib@master') import eo.Utils
|
||||
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('Packaging') {
|
||||
steps {
|
||||
script {
|
||||
if (env.JOB_NAME == 'passerelle-reunion-unicite' && env.GIT_BRANCH == 'origin/master') {
|
||||
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d stretch passerelle-reunion-unicite'
|
||||
} else if (env.GIT_BRANCH.startsWith('hotfix/')) {
|
||||
sh "sudo -H -u eobuilder /usr/local/bin/eobuilder -d stretch --branch ${env.GIT_BRANCH} --hotfix passerelle-reunion-unicite"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
utils = new Utils()
|
||||
utils.mail_notify(currentBuild, env, 'ci+jenkins-passerelle-reunion-unicite@entrouvert.org')
|
||||
}
|
||||
}
|
||||
success {
|
||||
cleanWs()
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
passerelle-reunion-unicite (0-0) unstable; urgency=low
|
||||
|
||||
* initial packaging.
|
||||
|
||||
-- Emmanuel Cazenave <ecazenave@entrouvert.com> Wed, 16 Oct 2019 07:44:31 +0200
|
|
@ -0,0 +1 @@
|
|||
9
|
|
@ -0,0 +1,12 @@
|
|||
Source: passerelle-reunion-unicite
|
||||
Maintainer: Nicolas Clain <nicolas.clain@cr-reunion.fr>
|
||||
Section: python
|
||||
Priority: optional
|
||||
Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.7), debhelper (>= 9), python-django
|
||||
Standards-Version: 3.9.1
|
||||
|
||||
Package: python-passerelle-reunion-unicite
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, ${python:Depends}
|
||||
Description: Passerelle connector to passerelle
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@ --with python2
|
|
@ -0,0 +1 @@
|
|||
3.0 (quilt)
|
|
@ -0,0 +1,12 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
from passerelle.base.models import BaseResource
|
||||
|
||||
|
||||
class UnicityReunionConnector(BaseResource):
|
||||
|
||||
category = 'Divers'
|
||||
|
||||
class Meta:
|
||||
verbose_name = u'Connecteur unicity réunion'
|
|
@ -0,0 +1,48 @@
|
|||
#! /usr/bin/env python
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
from distutils.command.sdist import sdist
|
||||
|
||||
|
||||
class eo_sdist(sdist):
|
||||
def run(self):
|
||||
if os.path.exists('VERSION'):
|
||||
os.remove('VERSION')
|
||||
version = get_version()
|
||||
version_file = open('VERSION', 'w')
|
||||
version_file.write(version)
|
||||
version_file.close()
|
||||
sdist.run(self)
|
||||
if os.path.exists('VERSION'):
|
||||
os.remove('VERSION')
|
||||
|
||||
|
||||
def get_version():
|
||||
if os.path.exists('VERSION'):
|
||||
version_file = open('VERSION', 'r')
|
||||
version = version_file.read()
|
||||
version_file.close()
|
||||
return version
|
||||
if os.path.exists('.git'):
|
||||
p = subprocess.Popen(['git', 'describe', '--dirty', '--match=v*'], stdout=subprocess.PIPE)
|
||||
result = p.communicate()[0]
|
||||
if p.returncode == 0:
|
||||
version = result.split()[0][1:]
|
||||
version = version.replace('-', '.')
|
||||
return version
|
||||
return '0'
|
||||
|
||||
|
||||
setup(
|
||||
name='passerelle-reunion-unicite',
|
||||
version=get_version(),
|
||||
author='CR Reunion',
|
||||
author_email='nicolas.clain@cr-reunion.fr',
|
||||
packages=find_packages(),
|
||||
cmdclass={
|
||||
'sdist': eo_sdist,
|
||||
}
|
||||
)
|
Reference in New Issue