Skip to content

Instantly share code, notes, and snippets.

@AndrewBestbier
Created October 15, 2019 22:37
Show Gist options
  • Save AndrewBestbier/e6a5997ecddec12d2b7e04f70ff26c5a to your computer and use it in GitHub Desktop.
Save AndrewBestbier/e6a5997ecddec12d2b7e04f70ff26c5a to your computer and use it in GitHub Desktop.
image: node:latest # (1)
stages:
- build
- test
- docker-deploy-image
- aws-deploy
cache:
paths:
- node_modules/ # (2)
install_dependencies:
stage: build
script:
- npm install # (3)
artifacts:
paths:
- node_modules/
testing:
stage: test
script: npm test # (4)
docker-deploy-image:
stage: docker-deploy-image
image: docker:dind
services:
- docker:dind
script:
- echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin # (5)
- docker build -t andrewbestbier/ci-comparison-blog .
- docker push andrewbestbier/ci-comparison-blog
aws-deploy:
image: 'python:latest'
stage: aws-deploy
before_script:
- 'pip install awsebcli --upgrade' # (6)
script:
- eb deploy CiComparisonBlog-env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment