Skip to content

Commit

Permalink
Run bundler in deployment mode before running scripts on the server
Browse files Browse the repository at this point in the history
  • Loading branch information
rwstauner committed May 8, 2024
1 parent 7bfe513 commit 6c5d0fa
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/build/*
/.bundle
data/*.json
data/*.csv
data/*.txt
Expand All @@ -8,3 +9,4 @@ continuous_reporting/single_iter_data/*
**/temp.json
.DS_Store
bench_params.json
/vendor
2 changes: 2 additions & 0 deletions continuous_reporting/gh_tasks/check_reporting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ chruby 3.0.2
cd ~/ym/yjit-metrics
git pull

bundle

# Copy benchmark raw data into destination repo
#ruby continuous_reporting/file_benchmark_data_into_raw.rb -d continuous_reporting/data

Expand Down
2 changes: 2 additions & 0 deletions continuous_reporting/gh_tasks/check_reporting_minimal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ chruby 3.0.2

cd ~/ym/yjit-metrics

bundle

# Copy benchmark raw data into destination repo
#ruby continuous_reporting/file_benchmark_data_into_raw.rb -d continuous_reporting/data

Expand Down
2 changes: 2 additions & 0 deletions continuous_reporting/gh_tasks/commit_benchmark_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ chruby 3.0.2
# If there is uncommitted data after a benchmark run, get it into (all?) raw_benchmarks where it belongs
cd ~/ym/yjit-metrics

bundle

# NOTE: This data dir is not configurable. If we run a smoke test on jenkins
# into a different data dir we explicitly do not want to include that here.
# In that case this will run, find no data, and do nothing (which is what we want).
Expand Down
2 changes: 2 additions & 0 deletions continuous_reporting/gh_tasks/generate_bench_params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ chruby 3.0.2
cd ~/ym/yjit-metrics
git checkout main && git pull

bundle

# No timestamp given, default to right now
ruby continuous_reporting/create_json_params_file.rb --full-rebuild=$FULL_REBUILD --bench-type="$BENCH_TYPE" --yjit-metrics-name=$YJIT_METRICS_NAME --yjit-metrics-repo=$YJIT_METRICS_REPO --yjit-bench-name=$YJIT_BENCH_NAME --yjit-bench-repo=$YJIT_BENCH_REPO --cruby-name=$CRUBY_NAME --cruby-repo=$CRUBY_REPO --benchmark-data-dir=$BENCH_DATA_DIR

Expand Down
2 changes: 2 additions & 0 deletions continuous_reporting/gh_tasks/report_and_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ chruby 3.0.2

cd ~/ym/yjit-metrics

bundle

# Copy benchmark raw data into destination repo, generate reports, commit changes to Git.
ruby continuous_reporting/generate_and_upload_reports.rb

Expand Down
2 changes: 2 additions & 0 deletions continuous_reporting/gh_tasks/report_full_rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ chruby 3.0.2

cd ~/ym/yjit-metrics

bundle

# Copy benchmark raw data into destination repo, generate reports, commit changes to Git.
# The --regenerate-reports argument will regenerate ***all*** reports, which can take quite a
# long time. It will also occasionally hit a Ruby error, so we should update from 3.0.2 when
Expand Down
2 changes: 2 additions & 0 deletions continuous_reporting/gh_tasks/run_benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ set -e
chruby 3.0.2
cd ~/ym/yjit-metrics

bundle

ruby continuous_reporting/benchmark_and_update.rb --no-gh-issue --no-perf-tripwires --bench-params=$BENCH_PARAMS

echo "Completed benchmarking successfully."
2 changes: 2 additions & 0 deletions continuous_reporting/gh_tasks/run_single_iter_benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ chruby 3.0.2

cd ~/ym/yjit-metrics

bundle

ruby continuous_reporting/benchmark_and_update.rb --benchmark-type smoketest --no-gh-issue --no-perf-tripwires --bench-params=$BENCH_PARAMS --data-dir=continuous_reporting/single_iter_data

echo "Completed smoke-test benchmarking successfully."
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pipeline {
}

environment {
BUNDLE_DEPLOYMENT = 'true'
SLACK_OAUTH_TOKEN = credentials('684cd699-feae-4ef1-8483-e71440a73fcd')
NOTIFIER_ARGS = "--template smoke_test --channels \"${params.SLACK_FAILURE_NOTIFY}\" --properties \"RUBY=${params.RUBY_VERSION},YJIT_BENCH=${params.YJIT_BENCH_VERSION},YJIT_METRICS=${params.YJIT_METRICS_VERSION}\""
}
Expand Down
4 changes: 4 additions & 0 deletions continuous_reporting/jenkins/Jenkinsfile_configurable_run
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ pipeline {
)
}

environment {
BUNDLE_DEPLOYMENT = 'true'
}

stages {
stage('generate_params') {
environment {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ pipeline {
)
}

environment {
BUNDLE_DEPLOYMENT = 'true'
}

stages {
// This stage commits and pushes the benchmark data from its directory, but doesn't get it there from yjit-metrics/continuous_reporting/data
stage('data checkin') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pipeline {
}

environment {
BUNDLE_DEPLOYMENT = 'true'
SLACK_OAUTH_TOKEN = credentials('684cd699-feae-4ef1-8483-e71440a73fcd')
NOTIFIER_ARGS = "--template build_status --channels \"${params.SLACK_FAILURE_NOTIFY}\""
}
Expand Down
1 change: 1 addition & 0 deletions continuous_reporting/jenkins/Jenkinsfile_reporting_rebuild
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pipeline {
agent any

environment {
BUNDLE_DEPLOYMENT = 'true'
SSH_HOST = credentials('2ea5f8cb-6fab-4454-b7cb-46ca2fd3cba7')
}

Expand Down

0 comments on commit 6c5d0fa

Please sign in to comment.