Commit 1e6dfa43 authored by echel0n's avatar echel0n

Merge branch 'develop'

parents f680cc76 a411278c
......@@ -12,7 +12,7 @@ variables:
services:
- docker:dind
sentry_release:
sentry_release_master:
stage: release
image:
name: getsentry/sentry-cli
......@@ -27,12 +27,46 @@ sentry_release:
- sentry-cli releases finalize $(cat sickrage/version.txt)
- sentry-cli releases deploys $(cat sickrage/version.txt) new -e $CI_COMMIT_REF_NAME
only:
- mnaster
- develop
- /^[0-9.]$/
except:
- tags
- branches
- triggers
deploy_docker:
sentry_release_develop:
stage: release
image:
name: getsentry/sentry-cli
entrypoint: [""]
script:
- export SENTRY_URL=$SENTRY_URL
- export SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN
- export SENTRY_ORG=$SENTRY_ORG
- export SENTRY_PROJECT=$SENTRY_PROJECT
- sentry-cli releases new --project $SENTRY_PROJECT $(cat sickrage/version.txt)
- sentry-cli releases set-commits --auto $(cat sickrage/version.txt)
- sentry-cli releases finalize $(cat sickrage/version.txt)
- sentry-cli releases deploys $(cat sickrage/version.txt) new -e $CI_COMMIT_REF_NAME
only:
- /^[0-9.]+dev[0-9]$/
except:
- branches
- triggers
deploy_docker_master:
stage: deploy
variables:
UPSTREAM_BRANCH: $CI_COMMIT_REF_NAME
UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA
trigger:
project: sickrage/sickrage-docker
branch: master
only:
- /^[0-9.]$/
except:
- branches
- triggers
deploy_docker_develop:
stage: deploy
variables:
UPSTREAM_BRANCH: $CI_COMMIT_REF_NAME
......@@ -41,11 +75,10 @@ deploy_docker:
project: sickrage/sickrage-docker
branch: master
only:
- master
- develop
- /^[0-9.]+dev[0-9]$/
except:
- tags
- merge_requests
- branches
- triggers
deploy_synology:
stage: deploy
......@@ -56,7 +89,7 @@ deploy_synology:
project: sickrage/sickrage-synology
branch: master
only:
- master
- /^[0-9.]$/
except:
- tags
- merge_requests
\ No newline at end of file
- branches
- triggers
\ No newline at end of file
......@@ -48,17 +48,6 @@ module.exports = function (grunt) {
'pypi_upload': {cmd: 'twine upload dist/*'},
'pypi_cleanup': {cmd: 'python setup.py clean'},
// Docker Commands
'build_docker_image': {
cmd: 'docker build --build-arg SOURCE_COMMIT=' + shell.exec("git rev-parse HEAD", {'silent': true}) + ' -t sickrage/sickrage:py3-alpha .'
},
'push_docker_image': {
cmd: [
'docker login -u ' + process.env.DOCKER_REGISTRY_USERNAME + ' -p ' + process.env.DOCKER_REGISTRY_PASSWORD,
'docker push sickrage/sickrage:py3-alpha',
].join('&&')
},
// Git Commands
'git': {
cmd: function (cmd, branch) {
......@@ -117,51 +106,10 @@ module.exports = function (grunt) {
}
},
'git_tag': {
cmd: function (sign) {
sign = sign !== "true" ? '' : '-s ';
return 'git tag ' + sign + grunt.config('new_version') + ' -m "' + grunt.config('commits') + '"';
},
stdout: false
},
'git_flow_bugfix_start': {
cmd: function (version) {
return 'git flow bugfix start ' + version;
},
stderr: false,
maxBuffer: 500 * 1024,
callback: function (err, stdout, stderr) {
grunt.log.write(stderr);
}
},
'git_flow_bugfix_finish': {
cmd: function (version, message) {
return 'git flow bugfix finish ' + version;
return 'git tag ' + version + ' -m "' + grunt.config('commits') + '"';
},
stderr: false,
maxBuffer: 500 * 1024,
callback: function (err, stdout, stderr) {
grunt.log.write(stderr);
}
},
'git_flow_release_start': {
cmd: function (version) {
return 'git flow release start ' + version;
},
stderr: false,
maxBuffer: 500 * 1024,
callback: function (err, stdout, stderr) {
grunt.log.write(stderr);
}
},
'git_flow_release_finish': {
cmd: function (version, message) {
return 'git flow release finish ' + version + ' -m "' + message + '"';
},
stderr: false,
maxBuffer: 500 * 1024,
callback: function (err, stdout, stderr) {
grunt.log.write(stderr);
}
stdout: false
}
}
});
......@@ -211,7 +159,7 @@ module.exports = function (grunt) {
}
});
grunt.registerTask('bump_version_file', function (new_version) {
grunt.registerTask('bump_version', function (new_version) {
const vFile = 'sickrage/version.txt';
grunt.file.write(vFile, new_version)
});
......@@ -246,9 +194,10 @@ module.exports = function (grunt) {
'changelog',
'webpack:dev',
//'sync_trans',
'bump_version_file:' + newVersion,
'bump_version:' + newVersion,
'exec:git_commit:Pre-Release v' + newVersion,
'exec:git_push:origin:develop',
'exec:git_last_tag', 'exec:git_list_changes', 'exec:git_tag:' + newVersion,
'exec:git_push:origin:develop:tags',
'exec:pypi_create',
'exec:pypi_upload',
'exec:pypi_cleanup'
......@@ -259,7 +208,6 @@ module.exports = function (grunt) {
grunt.registerTask('release', function () {
grunt.task.run(['exec:git:checkout:develop']);
grunt.task.run(['pre-release']);
const vFile = 'sickrage/version.txt';
const version = grunt.file.read(vFile);
......@@ -285,18 +233,20 @@ module.exports = function (grunt) {
const newVersion = vArray.vMajor + '.' + vArray.vMinor + '.' + vArray.vPatch;
const tasks = [
'exec:git_flow_release_start:' + newVersion,
'changelog',
'webpack:prod',
//'sync_trans',
'bump_version_file:' + newVersion,
'bump_version:' + newVersion,
'exec:git_commit:Release v' + newVersion,
'exec:git_flow_release_finish:' + newVersion + ':Release v' + newVersion,
'exec:git_push:origin:develop',
'exec:git_last_tag', 'exec:git_list_changes', 'exec:git_tag:' + newVersion,
'exec:git:checkout:master',
'exec:git:merge:--no-ff:develop',
'exec:git_push:origin:develop:tags',
'exec:git_push:origin:master:tags',
'exec:pypi_create',
'exec:pypi_upload',
'exec:pypi_cleanup'
'exec:pypi_cleanup',
'exec:git:checkout:develop'
];
grunt.task.run(tasks);
......
# Changelog
- * 0ff1e9d82 - 2019-07-13: Refactored release flow.
- * b9ea97eb3 - 2019-07-13: Changed close to remove for database sessions being access from web handlers, helps resolve QueuePool overflow issues.
- * bc7c35998 - 2019-07-12: Updated gruntfile.
- * 65f317874 - 2019-07-12: Release v9.4.124
- * c878cc06a - 2019-07-12: Pre-Release v9.4.124.dev2
- * 1ad0be62d - 2019-07-12: Pre-Release v9.4.124.dev1
- * 3923c2d09 - 2019-07-12: Release v9.4.122
......
......@@ -203,6 +203,6 @@ class BaseHandler(RequestHandler, ABC):
def on_finish(self):
if self.db_session:
self.db_session.commit()
self.db_session.close()
self.db_session.remove()
super(BaseHandler, self).on_finish()
9.4.124
\ No newline at end of file
9.4.125
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment