Skip to content

Instantly share code, notes, and snippets.

@sue445
Last active June 23, 2019 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sue445/0e7e049d68c11e5d1329ad3249a5ed85 to your computer and use it in GitHub Desktop.
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
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