JOB_NAME = os.environ.get('JOB_NAME')
GIT_COMMITTER_EMAIL = os.environ.get('GIT_COMMITTER_EMAIL')
-DPUT_OPTIONS = {
+DPUT_OPTIONS_DEFAULT = {
'fqdn': 'alexandria.profitbricks.localdomain',
'method': 'scp',
'login': 'reprepro',
'allow_unsigned_uploads': 1,
'post_upload_command': 'ssh reprepro@alexandria.profitbricks.localdomain /srv/profitbricks-repository/bin/pb_processincoming',
}
+DPUT_OPTIONS_DEV = {
+ 'fqdn': 'alexandria.profitbricks.localdomain',
+ 'method': 'scp',
+ 'login': 'reprepro',
+ 'incoming': '/srv/profitbricks-dev-repository/incoming/profitbricks',
+ 'allow_unsigned_uploads': 1,
+ 'post_upload_command': 'ssh reprepro@alexandria.profitbricks.localdomain /srv/profitbricks-dev-repository/bin/pb_processincoming',
+ }
DPUT_CF = os.path.join(GIT_TARGET_WORKSPACE, 'dput.cf')
NO_UPLOAD = os.environ.get('NO_UPLOAD')
)
exit_error()
- if options.distribution in ('testing', 'staging', 'unstable', 'pre-staging','experimental') or GIT_BRANCH_NAME.startswith('release') or GIT_BRANCH_NAME.startswith('hotfix'):
+ DPUT_OPTIONS = DPUT_OPTIONS_DEFAULT
+
+ if options.distribution in ('testing', 'staging', 'unstable', 'pre-staging','experimental') or GIT_BRANCH_NAME.startswith('release/') or GIT_BRANCH_NAME.startswith('hotfix/'):
daily_date = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
- if GIT_BRANCH_NAME.startswith('release') or GIT_BRANCH_NAME.startswith('hotfix'):
+ if GIT_BRANCH_NAME.startswith('release/') or GIT_BRANCH_NAME.startswith('hotfix/'):
version = '%s~rc%s' %(version, daily_date)
- elif options.distribution.startswith('feature') or options.distribution == 'experimental':
+ elif GIT_BRANCH_NAME.startswith('feature/') or GIT_BRANCH_NAME.startswith('poc/') or GIT_BRANCH_NAME.startswith('bugfix/') or options.distribution == 'experimental':
version = '%s~alpha%s' %(version, daily_date)
+ # these uploads should go to a different repo:
+ DPUT_OPTIONS = DPUT_OPTIONS_DEV
else:
version = '%s~develop%s' %(version, daily_date)
pb_suite='experimental'
elif options.distribution in ('unstable' , 'pre-staging'):
pb_suite='pre-staging'
- elif GIT_BRANCH_NAME.startswith('release') or GIT_BRANCH_NAME.startswith('hotfix') or options.distribution in ('stable', 'stable-proposed-updates', 'production', 'production-proposed-updates'):
+ elif GIT_BRANCH_NAME.startswith('release/') or GIT_BRANCH_NAME.startswith('hotfix/') or options.distribution in ('stable', 'stable-proposed-updates', 'production', 'production-proposed-updates'):
pb_suite='production-proposed-updates'
gbp = git_buildpackage.GitBuildPackage(