Last active
October 4, 2023 21:28
-
-
Save RyanHarijanto/217d62534260fd2ee63278b3c293cd10 to your computer and use it in GitHub Desktop.
.gitlab-ci.yml example: multiple Docker images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The folders below will be cached between builds | |
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache | |
cache: | |
paths: | |
- node_modules/ | |
- _site # or other arbitrary directory | |
stages: | |
- build | |
- test | |
- deployterraform | |
- deploytos3 # you can have more stages | |
- deploytoelasticbeanstalk | |
build: | |
image: node:6-wheezy # or another arbitrary docker image | |
stage: build | |
script: | |
- npm run build # or another arbitrary command | |
- npm run build2 # or another arbitrary command | |
test: | |
image: node:7-wheezy # or another arbitrary docker image | |
stage: test | |
script: | |
- npm run test # or another arbitrary command | |
# example of applying terraform template | |
deployterraform: | |
image: hashicorp/terraform/ # or another arbitrary docker image | |
stage: deployterraform | |
script: | |
- hashicorp/terraform:full apply main.tf # or another arbitrary command | |
# example of deploying to S3 | |
deploytos3: | |
image: mikesir87/aws-cli # or another arbitrary docker image | |
stage: deploytos3 | |
script: | |
- aws s3 sync . s3://example.com/ --delete # or another arbitrary command | |
# example of deploying to Elastic Beanstalk | |
deploytoelasticbeanstalk: | |
image: lciel/eb-cli # or another arbitrary docker image | |
stage: deploytoelasticbeanstalk | |
script: | |
- eb deploy # or another arbitrary command |
Thanks very much.
Very nice
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great example
shouldn't be
stage: test
in line 24?