aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/ci.rake15
-rw-r--r--lib/tasks/compliance_check_sets.rb11
-rw-r--r--lib/tasks/erd.rake4
-rw-r--r--lib/tasks/imports.rake2
4 files changed, 23 insertions, 9 deletions
diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake
index 13d7b8d73..89f9aa9c8 100644
--- a/lib/tasks/ci.rake
+++ b/lib/tasks/ci.rake
@@ -31,19 +31,22 @@ namespace :ci do
sh "bundle exec bundle-audit check --update"
end
- task :spec => ["ci:assets","spec"]
-
task :assets do
sh "RAILS_ENV=test bundle exec rake assets:precompile"
end
- task :jest => "ci:assets" do
- sh "yarn --no-progress install" # Hack to force install jest after webpack
- sh "node_modules/.bin/jest" unless ["CHOUETTE_JEST_DISABLED"]
+ task :i18n_js_export do
+ sh "RAILS_ENV=test bundle exec rake i18n:js:export"
+ end
+
+ task :jest do
+ sh "node_modules/.bin/jest" unless ENV["CHOUETTE_JEST_DISABLED"]
end
desc "Deploy after CI"
task :deploy do
+ return if ENV["CHOUETTE_DEPLOY_DISABLED"]
+
if deploy_env
sh "cap #{deploy_env} deploy:migrations"
else
@@ -59,4 +62,4 @@ namespace :ci do
end
desc "Run continuous integration tasks (spec, ...)"
-task :ci => ["ci:setup", "ci:spec", "ci:jest", "cucumber", "ci:check_security", "ci:deploy", "ci:clean"]
+task :ci => ["ci:setup", "ci:assets", "ci:i18n_js_export", "spec", "ci:jest", "cucumber", "ci:check_security", "ci:deploy", "ci:clean"]
diff --git a/lib/tasks/compliance_check_sets.rb b/lib/tasks/compliance_check_sets.rb
new file mode 100644
index 000000000..c53c7f9ed
--- /dev/null
+++ b/lib/tasks/compliance_check_sets.rb
@@ -0,0 +1,11 @@
+namespace :compliance_check_sets do
+ desc "Notify parent check sets when children finish"
+ task notify_parent: :environment do
+ ParentNotifier.new(ComplianceCheckSet).notify_when_finished
+ end
+
+ desc "Mark old unfinished check sets as 'aborted'"
+ task abort_old: :environment do
+ ComplianceCheckSet.abort_old
+ end
+end
diff --git a/lib/tasks/erd.rake b/lib/tasks/erd.rake
index e2665374e..96bb7fe37 100644
--- a/lib/tasks/erd.rake
+++ b/lib/tasks/erd.rake
@@ -2,12 +2,12 @@ namespace :generate do
desc "Create model diagrams for Chouette"
task :model_diagram => :environment do
- sh "bundle exec rake erd only='Organisation,Referential,User,Workbench' filename='organisation' title='Organisation'"
+ sh "bundle exec rake erd only='Organisation,Referential,User,Workbench,Workgroup' filename='organisation' title='Organisation'"
sh "bundle exec rake erd only='Calendar,Referential,ReferentialMetadata,Chouette::Line,Chouette::Route,Chouette::JourneyPattern,Chouette::VehicleJourney,Chouette::VehicleJourneyAtStop,Chouette::TimeTable,Chouette::TimeTableDate,Chouette::TimeTablePeriod,Chouette::Footnote,Chouette::Network,Chouette::Company,Chouette::StopPoint,Chouette::StopArea' filename='offer_datas' title='Offer Datas'"
sh "bundle exec rake erd only='Organisation,StopAreaReferential,StopAreaReferentialSync,StopAreaReferentialSyncMessage,StopAreaReferentialMembership,LineReferential,LineReferentialSync,LineReferentialSyncMessage,LineReferentialMembership' filename='referentiels_externes' title='Référentiels externes'"
sh "bundle exec rake erd only='NetexImport,Import,WorkbenchImport,ImportResource,ImportMessage' filename='import' title='Import'"
sh "bundle exec rake erd only='ComplianceControlSet,ComplianceControlBlock,ComplianceControl,ComplianceCheckSet,ComplianceCheckBlock,ComplianceCheck,ComplianceCheckResource,ComplianceCheckMessage' filename='validation' title='Validation'"
- sh "bundle exec rake erd only='Organisation,Workbench,ReferentialSuite,Referential' filename='merge' title='Merge'"
+ sh "bundle exec rake erd only='Organisation,Workgroup,Workbench,ReferentialSuite,Referential' filename='merge' title='Merge'"
#sh "bundle exec rake erd only='VehicleJourney,VehicleJourneyExport' filename='export' title='Export'"
#sh "bundle exec rake erd only='' filename='integration' title='Integration'"
#sh "bundle exec rake erd only='' filename='publication' title='Publication'"
diff --git a/lib/tasks/imports.rake b/lib/tasks/imports.rake
index 9d0fc8726..02e32fd3d 100644
--- a/lib/tasks/imports.rake
+++ b/lib/tasks/imports.rake
@@ -1,7 +1,7 @@
namespace :import do
desc "Notify parent imports when children finish"
task notify_parent: :environment do
- ParentImportNotifier.notify_when_finished
+ ParentNotifier.new(Import).notify_when_finished
end
desc "Mark old unfinished Netex imports as 'aborted'"