Commit 0ff1e9d8 authored by echel0n's avatar echel0n

Refactored release flow.

parent b9ea97eb
......@@ -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
......@@ -77,15 +77,6 @@ module.exports = function (grunt) {
grunt.log.write(stderr);
}
},
'git_merge': {
cmd: function (branch) {
return 'git merge --no-ff ' + branch;
},
stderr: false,
callback: function (err, stdout, stderr) {
grunt.log.write(stderr);
}
},
'git_last_tag': {
cmd: 'git for-each-ref refs/tags --sort=-taggerdate --count=1 --format=%(refname:short)',
stdout: false,
......@@ -205,7 +196,8 @@ module.exports = function (grunt) {
//'sync_trans',
'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'
......@@ -216,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);
......@@ -249,12 +240,13 @@ module.exports = function (grunt) {
'exec:git_commit:Release v' + newVersion,
'exec:git_last_tag', 'exec:git_list_changes', 'exec:git_tag:' + newVersion,
'exec:git:checkout:master',
'exec:git_merge:develop',
'exec:git_push:origin:develop',
'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);
......
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