Last active
June 23, 2019 06:25
-
-
Save sue445/0e7e049d68c11e5d1329ad3249a5ed85 to your computer and use it in GitHub Desktop.
Example: deployment gitpanda using GitLab CI c.f. https://inside.pixiv.blog/sue445/7256
This file contains hidden or 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
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