devops-recipes / basic-node Goto Github PK
View Code? Open in Web Editor NEWContinuous integration for a basic Node.js project with Shippable https://www.shippable.com
Continuous integration for a basic Node.js project with Shippable https://www.shippable.com
Hi,
I'm trying this example on aarch64 using the Shippable_Shared_aarch64 pool, but it failed with error:
Binary download from https://nodejs.org/dist/v0.12.18/node-v0.12.18-linux-arm64.tar.xz failed, trying source.
(my shippable.yml file: https://github.com/eugene-xie/basic-node/blob/master/shippable.yml)
The complete log is as below, I wonder how to refine this to make this example work on aarch64 platform.
Generating JobGetting subscriptionSuccessfully fetched subscription
Decrypting secure envsSuccessfully decrypted secure envs
Creating vault tokenSuccessfully created cubbyhole token
Saving integrations to vaultSuccessfully saved integrations
Provision job nodeInfoInfoRunning job on shared node pool: shippable_shared_aarch64SetupValidating incoming messageSuccessfully validated incoming message
Getting jobSuccessfully fetched job
Validating CI StepsSuccessfully validated CI Steps
Validating steps orderSuccessfully validated steps order
Validating job dependenciesSuccessfully validated 1 dependencies
Updating nodeSuccessfully updated node in job
Parsing job propertiesSuccessfully parsed job properties
Setting up build directories for job: 5b514f0e82ff4a0700721e7cCleaning directories.
Successfully cleaned directory at path: /build
Successfully cleaned directory at path: /shippableci/onstartjobenvs
Successfully cleaned directory at path: /tmp/ssh
Successfully created directory at path: /build/IN
Successfully created directory at path: /build/OUT
Successfully created directory at path: /build/previousState
Successfully created directory at path: /build/state
Successfully created directory at path: /build/managed
Successfully created directory at path: /build
Successfully created directory at path: /tmp/mexec
Successfully created directory at path: /tmp/ssh
Successfully created directory at path: /tmp/cexec
Successfully created directory at path: /shippableci
Successfully created directory at path: /shippableci/onstartjobenvs
Creating template metadata file: /build/state/basic-node_ciRepo.env
Creating template metadata file: /build/state/basic-node_runCI.env
Validating dependencies to get previous job filesSuccessfully validated dependencies of previous job
Getting files of previous jobSuccessfully received files for previous job
Saving files of previous jobSuccessfully saved files for previous job
Setting permissions on files of previous jobSuccessfully set permissions for files for previous job
Setting timeouttimeout set to 60 minutes
Setting up dependency: basic-node_ciRepoCreating metadata file
Successfully created folder: /build/IN/basic-node_ciRepo
Successfully saved file: version.json
Generating replace script
Successfully generated replace script
Validating script dependencies
the path is: /build/IN/basic-node_ciRepo/replace_placeholders.sh
Successfully validated script dependencies
shippable_replace /build/IN/basic-node_ciRepo/version.json
Reading version.json
Generating environment variables
Successfully added environment variables for basic-node_ciRepo
Creating state directory
Successfully created folder: /build/IN/basic-node_ciRepo/ciRepo
writing ENVs to fileSuccessfully created file: /build/common.env
Writing message to fileSuccessfully saved message at: /build/message.json
Processing IN Dependency: basic-node_ciRepoVersion Number: 4
Version Name: 0de03e0
No special dependencyHandler for dependency type: IN ciRepo
Clean git credentialsrm -rf /.git-credentialswrite_keyls -ltra /tmp/sshtotal 816.04.1-Ubuntu SMP Tue Oct 10 16:33:57 UTC 2017 aarch64 aarch64 aarch64 GNU/Linux
drwxr-xr-x 2 root root 4096 Jul 17 07:05 .
drwxrwxrwt 1 root root 4096 Jul 20 02:55 ..
echo 'writing rsa key'writing rsa key
chmod -cR 600 /tmp/ssh/01_deploymode of '/tmp/ssh/01_deploy' changed from 0644 (rw-r--r--) to 0600 (rw-------)
write_keyls -ltra /tmp/sshtotal 12
drwxrwxrwt 1 root root 4096 Jul 20 02:55 ..
-rw------- 1 root root 1676 Jul 20 02:55 01_deploy
drwxr-xr-x 2 root root 4096 Jul 20 02:55 .
echo 'writing rsa key'writing rsa key
chmod -cR 600 /tmp/ssh/00_submode of '/tmp/ssh/00_sub' changed from 0644 (rw-r--r--) to 0600 (rw-------)
Job node infouname -aLinux 25fa97d93907 4.10.0-38-generic #42
uptime 02:55:24 up 9 days, 22:29, 0 users, load average: 0.04, 0.01, 0.00
df -hFilesystem Size Used Avail Use% Mounted on
overlay 227G 11G 205G 5% /
tmpfs 64M 0 64M 0% /dev
tmpfs 63G 0 63G 0% /sys/fs/cgroup
/dev/sda3 227G 11G 205G 5% /build
shm 64M 0 64M 0% /dev/shm
tmpfs 13G 36M 13G 1% /run/docker.sock
tmpfs 63G 0 63G 0% /proc/scsi
tmpfs 63G 0 63G 0% /sys/firmware
free -m total used free shared buff/cache available
Mem: 128872 905 116181 35 11785 126503
Swap: 2384 0 2384
echo 'Docker daemon successfully running on the host'Docker daemon successfully running on the host
sudo docker infoContainers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 7
Server Version: 17.09.1-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.10.0-38-generic
Operating System: Ubuntu 16.04.2 LTS
OSType: linux
Architecture: aarch64
CPUs: 96
Total Memory: 125.9GiB
Name: restricted-aarch64-Ubuntu-1604-01
ID: 26OH:HP6G:VWZE:4CVJ:AEIK:AVHH:BFYM:6T4R:3PGE:NDEI:LSVW:25VN
Docker Root Dir: /data
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support
sudo docker ps -aCONTAINER ID IMAGE
COMMAND CREATED STATUS PORTS NAMES
25fa97d93907 drydock/aarch64_u16reqproc:v6.7.1
"/bin/sh -c $IMAGE..." 7 days ago Up 2 days reqProc-39d6aaa9-7ab4-488e-b63b-70d240c31e21
bash --versionGNU bash, version 4.3.48(1)-release (aarch64-unknown-linux-gnu)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
setup_envsave on start job envsmkdir -p /shippableci/onstartjobenvstrigger on start notificationecho 'Triggering on start notification'Triggering on start notification
setup_envpull_job_imageshippable_retry sudo docker pull drydock/aarch64_u16nodall:v6.6.4v6.6.4: Pulling from drydock/aarch64_u16nodall
Digest: sha256:724d0c97f90aaac36d7a864e6a15f3abc6cd14f2cf193029e81f3a3da016c7e2
Status: Image is up to date for drydock/aarch64_u16nodall:v6.6.4
boot_containerecho 'No running build container to stop'No running build container to stop
echo 'Booting job image drydock/aarch64_u16nodall:v6.6.4'Booting job image drydock/aarch64_u16nodall:v6.6.4
sudo docker run -d --net=bridge -v /home/shippable/cexec:/home/shippable/cexec -v /home/shippable/cache:/home/shippable/cache -v /tmp/cexec:/tmp/cexec -v /build:/build -v /root/node:/build/node --name=c.exec.basic-node.4.1 --entrypoint=/home/shippable/cexec/build.sh -e RUN_MODE=production -e SHIPPABLE_API_URL=https://con.shippable.com -e SHIPPABLE_API_RETRY_INTERVAL=3 -e SHIPPABLE_CONTAINER_NAME=c.exec.basic-node.4.1 -e SHIPPABLE_IS_OFFICIAL_IMAGE=true -e SHIPPABLE_DOCKER_VERSION=17.09.1 -e SHIPPABLE_IS_LEGACY_IMAGE=false -e SHIPPABLE_NODE_ARCHITECTURE=aarch64 -e SHIPPABLE_NODE_OPERATING_SYSTEM=Ubuntu_16.04 drydock/aarch64_u16nodall:v6.6.47e926b2135685f7c1515d4a4f26268769f4af954a5a980a2c22955073fe91629
wait_for_exitClean git credentials
rm -rf ~/.git-credentials
write_key
ls -ltra /tmp/ssh
total 8
drwxr-xr-x 2 root root 4096 Jul 20 02:55 .
drwxrwxrwt 1 root root 4096 Jul 20 02:55 ..
echo 'writing rsa key'
writing rsa key
chmod -cR 600 /tmp/ssh/01_deploy
mode of '/tmp/ssh/01_deploy' changed from 0644 (rw-r--r--) to 0600 (rw-------)
write_key
ls -ltra /tmp/ssh
total 12
drwxrwxrwt 1 root root 4096 Jul 20 02:55 ..
-rw------- 1 root root 1676 Jul 20 02:55 01_deploy
drwxr-xr-x 2 root root 4096 Jul 20 02:55 .
echo 'writing rsa key'
writing rsa key
chmod -cR 600 /tmp/ssh/00_sub
mode of '/tmp/ssh/00_sub' changed from 0644 (rw-r--r--) to 0600 (rw-------)
setup_env
verifying job dependencies
echo 'jq already installed.'
jq already installed.
echo 'curl already installed.'
curl already installed.
echo 'Installing shipctl components'
Installing shipctl components
Installing shippable_decrypt
Installing shippable_retry
Installing shippable_replace
Installing shippable_jdk
shippable_jdk already installed on the image, skipping
Installing shipctl
Installing utility
setup_ve
. /root/.nvm/nvm.sh
nvm install "0.12"
Downloading and installing node v0.12.18...
Downloading https://nodejs.org/dist/v0.12.18/node-v0.12.18-linux-arm64.tar.xz...
curl: (22) The requested URL returned error: 404 Not Found
Binary download from https://nodejs.org/dist/v0.12.18/node-v0.12.18-linux-arm64.tar.xz failed, trying source.
grep: /root/.nvm/.cache/bin/node-v0.12.18-linux-arm64/node-v0.12.18-linux-arm64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
setup_env
parse test reports
echo 'No test reports exist, skipping test report processing'
No test reports exist, skipping test report processing
parse coverage reports
echo 'No coverage reports exist, skipping coverage report processing'
No coverage reports exist, skipping coverage report processing
setup_env
uploading coverage reports
echo 'No coverage reports available, skipping push'
No coverage reports available, skipping push
uploading test reports
echo 'No test reports available, skipping push'
No test reports available, skipping push
echo Container c.exec.basic-node.4.1 exited with 99Container c.exec.basic-node.4.1 exited with 99
sudo docker logs c.exec.basic-node.4.1 No LSB modules are available.
Distributor ID: Ubuntu Description: Ubuntu 16.04.4 LTS Release: 16.04 Codename: xenial
Ubuntu confirmed
Looking for apt-get...
Found apt-get at /usr/bin/apt-get
Looking for sudo...
Found sudo at /usr/bin/sudo
Looking for git...
Found git at /usr/bin/git
Looking for ssh-agent
Found ssh-agent at /usr/bin/ssh-agent
Looking for python...
Found python at /usr/bin/python
Booting up CEXEC
Running CEXEC script
ERROR:script_runner - script_runner:Command failed : ssh-agent bash -c 'ssh-add /tmp/ssh/00_sub;ssh-add /tmp/ssh/01_deploy; cd /root && /root/4b659e82-5b0f-4f00-9f88-7f6f74cc64d1.sh'
Exception Script failure tag received
ERROR:script_runner - script_runner:Command failed : ssh-agent bash -c 'ssh-add /tmp/ssh/00_sub;ssh-add /tmp/ssh/01_deploy; cd /root && /root/4b659e82-5b0f-4f00-9f88-7f6f74cc64d1.sh'
Exception Script failure tag received
sudo docker rm -fv $CONTAINER_NAME c.exec.basic-node.4.1
DebugDebug logsScriptType:collect_stats|msg:Identity added: /tmp/ssh/00_sub (/tmp/ssh/00_sub)
ScriptType:collect_stats|msg:Identity added: /tmp/ssh/01_deploy (/tmp/ssh/01_deploy)
ScriptType:on_start_job_envs|msg:Identity added: /tmp/ssh/00_sub (/tmp/ssh/00_sub)
ScriptType:on_start_job_envs|msg:Identity added: /tmp/ssh/01_deploy (/tmp/ssh/01_deploy)
ScriptType:boot|msg:Identity added: /tmp/ssh/00_sub (/tmp/ssh/00_sub)
ScriptType:boot|msg:Identity added: /tmp/ssh/01_deploy (/tmp/ssh/01_deploy)
CleanupPersisting Previous StateCopy previous state to current state
Successfully persisted previous state of job
Saving Job FilesValidating dependencies to save current job files
Successfully validated dependencies to save current job files
Creating file list for current job
Successfully created file list for current job
Reading file permissions for current job
Successfully read file permissions for current job
Constructing message for current job
Successfully constructed message for current job
Posting message for current job
Successfully posted message for current job
Updating job statusSuccessfully updated job status
Hi: my JS-fu is not strong, so sorry in advance. I was attempting to build this project - as per Run a sample CI build and the build failed. This is the error that I received:
$MOD_LOC/mocha --recursive "$TESTS_LOC_DIR/**/*.spec.js" -R mocha-junit-reporter --reporter-options mochaFile=$TEST_RESULTS_DIR/testresults.xml 0s
"mocha-junit-reporter" reporter blew up with error:
/root/src/github.com/brentwg/basic-node/node_modules/mocha-junit-reporter/node_modules/strip-ansi/index.js:2
const ansiRegex = require('ansi-regex');
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/root/src/github.com/brentwg/basic-node/node_modules/mocha-junit-reporter/index.js:10:17)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Mocha.reporter (/root/src/github.com/brentwg/basic-node/node_modules/mocha/lib/mocha.js:153:21)
at Object. (/root/src/github.com/brentwg/basic-node/node_modules/mocha/bin/_mocha:220:7)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
/root/src/github.com/brentwg/basic-node/node_modules/mocha/lib/mocha.js:174
throw new Error('invalid reporter "' + reporter + '"');
^
Error: invalid reporter "mocha-junit-reporter"
at Mocha.reporter (/root/src/github.com/brentwg/basic-node/node_modules/mocha/lib/mocha.js:174:13)
at Object. (/root/src/github.com/brentwg/basic-node/node_modules/mocha/bin/_mocha:220:7)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
Not really sure where to begin. Please let me know, if you require any additional information.
Exception
mocha test --reporter mocha-junit-reporter
/usr/lib/nodejs/mocha/lib/mocha.js:137
if (!_reporter) throw new Error('invalid reporter "' + reporter + '"');
^
Error: invalid reporter "mocha-junit-reporter"
at Mocha.reporter (/usr/lib/nodejs/mocha/lib/mocha.js:137:27)
at Object. (/usr/lib/nodejs/mocha/bin/_mocha:191:7)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
Code used:
module.exports = {
mocha: true,
path: 'tests/',
mochaConfig: {
reporter: 'mocha-junit-reporter',
reporterOptions: {
mochaFile: './test-results.xml',
},
},
webdriverio: {
waitforTimeout: 10000,
baseUrl: 'http://localhost:3001',
desiredCapabilities: {
chromeOptions: {
args: ['--window-size=1366,768'],
/* download: {
default_directory: '/home/aditya/Desktop',
},
'download.default_directory': '/home/aditya/Desktop',*/
},
},
},
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.