Skip to content

Instantly share code, notes, and snippets.

@MikeMichel
Last active May 30, 2016 19:29
Show Gist options
  • Save MikeMichel/1fdda86a159a65399afd91c1f082b094 to your computer and use it in GitHub Desktop.
Save MikeMichel/1fdda86a159a65399afd91c1f082b094 to your computer and use it in GitHub Desktop.
build:
box: node:0.12.7-onbuild
steps:
- script:
name: echo nodejs information
code: |
echo "node version $(node -v) running"
echo "npm version $(npm -v) running"
echo $WERCKER_GIT_COMMIT
- npm-install
- script:
name: copy files to the pipeline
code: cp -R . "$WERCKER_OUTPUT_DIR"
docker-push:
box: node:0.12.7-onbuild
steps:
- script:
name: copy
code: cp -R /pipeline/source/* /usr/src/app/
- internal/docker-push:
#username: $QUAY_USERNAME
username: $DOCKERHUB_USERNAME
#password: $QUAY_PASSWORD
password: $DOCKERHUB_PASSWORD
ports: "8080"
repository: $REPOSITORY
#registry: https://quay.io
tag: $WERCKER_GIT_COMMIT
cmd: node app.js
deploy-to-sloppyio:
steps:
- script:
name: deploy to sloppy using the API with curl
code: |
curl -H "Content-Type: application/json" -H "Authorization: Bearer $SLOPPYIO_TOKEN" -X PATCH -d '{"image": "'$REPOSITORY':'$WERCKER_GIT_COMMIT'"}' https://api.sloppy.io/v1/apps/hackathon/services/web/apps/node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment