Rakefiles / CI: various fixes towards new integration / artifact publishing workflow
* Set upstream repository only for "master integration build"
* Publish artifacts from "master integration build"
--- a/ci/steps.groovy Thu Nov 14 21:20:37 2019 +0000
+++ b/ci/steps.groovy Thu Dec 19 00:20:28 2019 +0000
@@ -147,12 +147,14 @@
push()
}
}
+
+ publish("devel")
}
/*
* Publish built artifacts to download server
*/
-def publish(dir) {
+def publish(dir = "private-builds") {
Calendar current = Calendar.getInstance()
Calendar scheduled = current.clone()
@@ -165,6 +167,7 @@
build(job: 'stx_jv_publish',
parameters: [
string(name: 'job', value: env.JOB_NAME),
+ string(name: 'bld', value: env.BUILD_NUMBER),
string(name: 'srv', value: env.STX_PUBLISH_SERVER),
string(name: 'dir', value: "${env.STX_PUBLISH_DIRECTORY}/${dir}")
],
--- a/specs/repositories.rbspec Thu Nov 14 21:20:37 2019 +0000
+++ b/specs/repositories.rbspec Thu Dec 19 00:20:28 2019 +0000
@@ -15,17 +15,21 @@
# Auto-configure jv-branch:public and jv-branch:private
# repositories based on the URL of rakefiles.
#
- origin_forest_url = HG::Repository.new(BUILD_DIR / '..').paths['default'].slice(0.. - 'stx-goodies-builder-rake'.size - 2)
+ origin = HG::Repository.new(BUILD_DIR / '..')
+ branch = origin.branch()
+ origin_forest_url = origin.paths['default'].slice(0.. - 'stx-goodies-builder-rake'.size - 2)
cloned_from_bitbucket = origin_forest_url =~ /bitbucket.org/
- cloned_from_swing = (origin_forest_url =~ /swing\.fit\.cvut\.cz/) || (origin_forest_url =~ /192\.168\.12\.1/)
+ cloned_from_integration = ((origin_forest_url =~ /nereid/) || (origin_forest_url =~ /192.168.27.250/)) && branch == 'default'
repository :'jv-branch:public' do
type :hg
separator '-'
canonical "https://bitbucket.org/janvrany"
- if (not cloned_from_bitbucket) and (not cloned_from_swing)
+
+ if (cloned_from_integration)
upstream "https://swing.fit.cvut.cz/hg"
end
+
origin origin_forest_url
end