Skip to content

Instantly share code, notes, and snippets.

@sue445
Last active Jun 23, 2019
Embed
What would you like to do?
Example: deployment gitpanda using GitLab CI c.f. https://inside.pixiv.blog/sue445/7256
stages:
- test
- deploy
.default: &default
image: sue445/awscli-all
variables:
GITPANDA_VERSION: v0.3.4
AWS_DEFAULT_REGION: ap-northeast-1
S3_BUCKET_NAME: YOUR-BUCKET-NAME
STACK_NAME: gitpanda-sam
before_script:
- wget https://github.com/sue445/gitpanda/releases/download/${GITPANDA_VERSION}/gitpanda_linux_amd64 -O gitpanda/gitpanda
- chmod 755 gitpanda/gitpanda
validate:
<<: *default
stage: test
script:
- sam validate
deploy:
<<: *default
stage: deploy
script:
- sam package --template-file template.yaml --s3-bucket $S3_BUCKET_NAME --output-template-file tmp/packaged.yaml
- aws cloudformation deploy --template-file tmp/packaged.yaml --stack-name $STACK_NAME --capabilities CAPABILITY_IAM
only:
- master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment