This docker image contains the necessary dependencies to use the Stackery CLI for deployments. Built on the node:lts-slim base image it contains the NodeJS runtime as well as yarn.
The intention is to use this image to perform your serverless builds on gitlab.
Full Dockerfile
FROM node:lts-slim
USER root
RUN curl -Ls --compressed https://ga.cli.stackery.io/linux/stackery > /tmp/stackery
RUN chmod a+x /tmp/stackery
RUN stackery=/tmp/stackery
RUN curl -o- -L https://yarnpkg.com/install.sh | bash
ENV PATH="/tmp:${PATH}"
Example .gitlab-ci.yml
stages:
- build
- test
- deploy
build:
stage: build
tags:
- stackery
script:
- yarn install
test:
stage: test
tags:
- stackery
script:
- yarn install
- yarn test
deploy:
stage: deploy
script:
- stackery login --email $STACKERY_EMAIL --password $STACKERY_PASSWORD --non-interactive
- stackery deploy --stack-name $STACKERY_STACK_NAME --env-name $STACKERY_ENV_NAME --git-ref "$CI_COMMIT_SHA" --access-key-id $AWS_ACCESS_KEY_ID --secret-access-key $AWS_SECRET_ACCESS_KEY
only:
- master
tags:
- stackery
The gitlab cicd pipeline configuration listed above assumes you have the following environment variables set in your CI pipeline:
STACKERY_EMAIL - the email address used to login to your Stackery account.STACKERY_PASSWORD - the password for the Stackery login.STACKERY_STACK_NAME - the name of the stack you are deploying in your Stackery account.STACKERY_ENV_NAME the name of the environment you are deploying to (as defined in Stackery).AWS_ACCESS_KEY_ID an AWS Key ID used by Stackery for the deployment.AWS_SECRET_ACCESS_KEY an AWS Secret used by Stackery for the deployment.Content type
Image
Digest
Size
76.1 MB
Last updated
about 7 years ago
docker pull dsandor/gitlab_stackery