Deploying to Galaxy using Travis CI or Semaphore

I’m interested in finding a continuous integration solution to speed up the process of merging/deploying/testing at work. So far, I’ve looked into a handful of possibilities, and I’m trying out Travis CI and Semaphore.

Using Travis CI, I’ve gotten as far as investigating the script deployment section, trying to figure out what I need to set up in order to deploy to Galaxy.

Using Semaphore (and @sbr464’s Quick Tutorial - How to setup Semaphore CI for Meteor/Galaxy Continuous Integration), I was able to get as far as starting the deployment process, but I hit the following error:

<--- Last few GCs --->

[3418:0x4114f30]   184308 ms: Mark-sweep 1401.7 (1464.1) -> 1401.7 (1463.1) MB, 678.2 / 0.2 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 678 ms) last resort GC in old space requested
[3418:0x4114f30]   184980 ms: Mark-sweep 1401.7 (1463.1) -> 1401.7 (1463.1) MB, 672.0 / 0.2 ms  last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x37cd2a9a5e91 <JSObject>
   1: /* anonymous */ [/home/runner/.meteor/packages/meteor-tool/.1.6.0.1whvdik.oongk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/source-map/lib/source-node.js:~336] [pc=0x796a4bc8f41](this=0x3a5287a86401 <JSGlobal Object>,chunk=0x201b80117b91 <String[5]: ref4.>,original=0x33e75bd83719 <Object map = 0x2e4d4f976661>)
   2: SourceNode_walk [/home/runne...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/home/runner/.meteor/packages/meteor-tool/.1.6.0.1whvdik.oongk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node]
2: 0x121809c [/home/runner/.meteor/packages/meteor-tool/.1.6.0.1whvdik.oongk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node]
3: v8::Utils::ReportOOMFailure(char const*, bool) [/home/runner/.meteor/packages/meteor-tool/.1.6.0.1whvdik.oongk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/home/runner/.meteor/packages/meteor-tool/.1.6.0.1whvdik.oongk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node]
5: v8::internal::factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/home/runner/.meteor/packages/meteor-tool/.1.6.0.1whvdik.oongk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node]
6: v8::internal::Runtime_AllocateInTargetSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/home/runner/.meteor/packages/meteor-tool/.1.6.0.1whvdik.oongk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node]
7: 0x796a430463d
Aborted (core dumped)

This looks similar to an issue I was having locally, and was able to resolve by adding

export NODE_OPTIONS="--max_old_space_size=4096"
export TOOL_NODE_FLAGS="--max-old-space-size=4096"

to .bashrc

Does anyone have experience using Travis CI to deploy to Galaxy? Alternatively, has anyone been able to overcome the CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory error on Semaphore? Alternatively alternatively, has anyone had a good experience deploying to Galaxy with a service other than Travis CI or Semaphore?

Update

Semaphore support got back to me and suggested that I add

export NODE_OPTIONS="–max_old_space_size=4096"
export TOOL_NODE_FLAGS="–max-old-space-size=4096"

to my list of deploy commands. I took their advice, and I was then able to successfully use Semaphore to deploy to Galaxy. In case anyone else runs into this issue, I’ve copied my Semaphore deployment server’s commands below:

Deploy commands

  1. curl https://install.meteor.com/ | /bin/sh
  2. meteor --version
  3. meteor npm install
  4. export METEOR_SESSION_FILE=/home/runner/deployment_token.json
  5. export DEPLOY_HOSTNAME=us-east-1.galaxy-deploy.meteor.com
  6. export NODE_OPTIONS="–max_old_space_size=4096"
  7. export TOOL_NODE_FLAGS="–max-old-space-size=4096"
  8. meteor deploy --settings /home/runner/GALAXY_DEPLOYMENT_SETTINGS.json MY_GALAXY_DEPLOYMENT.MY_GALAXY_ORGANIZATION.com
1 Like