When unsing docker compose you can have a problem with the order of dependent linked containers
The solution is to start a script which tries to access a service and waits until it gets ready before loading your program
When unsing docker compose you can have a problem with the order of dependent linked containers
The solution is to start a script which tries to access a service and waits until it gets ready before loading your program
| //The global script scope | |
| def ctx = context(scope: scriptScope()) | |
| //What things can be on the script scope | |
| contributor(ctx) { | |
| method(name: 'pipeline', type: 'Object', params: [body: Closure]) | |
| property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable') | |
| property(name: 'env', type: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder') | |
| property(name: 'currentBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder') | |
| property(name: 'scm', type: 'org.jenkinsci.plugins.workflow.multibranch.SCMVar') |
| # Official framework image. Look for the different tagged releases at: | |
| # https://hub.docker.com/r/library/node/tags/ | |
| image: node:6 | |
| before_script: | |
| - npm install | |
| # This folder is cached between builds | |
| # http://docs.gitlab.com/ce/ci/yaml/README.html#cache | |
| cache: |
| certifi==2016.8.8 | |
| elasticsearch-curator==4.0.6 | |
| PyYAML==3.11 |
| apt-get install source-highlight | |
| # update .bashrc / .zshrc: | |
| export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s" | |
| export LESS=' -R ' | |
| # add yaml support as shown in lang.map.diff |
| const defaultFirst = 'A`' | |
| const defaultSecond = 'B`' | |
| const defaultThird = 'C`' | |
| async function doFirst() { | |
| // throw new Error('Error A') | |
| return await 'A' | |
| } | |
| async function doSecond() { |
sudo apt-get install python-pip or wget https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.pysudo pip install powerline-statusgit clone https://github.com/powerline/fonts.git && cd fonts && sh ./install.shset rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/
> " Always show statusline
| curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash | |
| export NVM_DIR="$HOME/.nvm" | |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
| [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
| nvm install 8.4.0 | |
| npm install -g vue-cli | |
| vue init webpack my-project | |
| cd my-project |
| #!/bin/env node | |
| //thx to http://fsprojects.github.io/Chessie/a-tale-of-3-nightclubs.html | |
| Promise.all([ | |
| suitablePersonEnterGayBar(), | |
| unsuitablePersonEnterGayBar(), | |
| ]) | |
| .then(result => result.map((person, i) => `Person ${i+1}: ${person.cost || ''}${person.reasons.join(' ')}`)) | |
| .then(result => console.log(`Person entries\n${result.join('\n')}`)); |
| var cluster = require('cluster'); | |
| if (cluster.isWorker) { | |
| console.log('Worker ' + process.pid + ' has started.'); | |
| // Send message to master process. | |
| process.send({msgFromWorker: 'This is from worker ' + process.pid + '.'}) | |
| // Receive messages from the master process. |