Hey folks.
I have a gitlab pipeline that builds release containers and I’d like to add a step which can do the fly deploy
step using the —image
argument, however I’m using the flyio/flyctl
container and of course it cannot access the image. Any suggestions?
Here’s my deploy step:
deploy application:
image: docker:latest
stage: deploy
only:
- tags
- /^v\d+\.\d+\.\d+(-\w+)?$/
needs:
- job: push tagged release to gitlab registry
artifacts: false
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay
DOCKER_TLS_CERTDIR: ""
before_script:
- echo ${CI_BUILD_TOKEN} | docker login -u gitlab-ci-token --password-stdin ${CI_REGISTRY}
script:
- docker pull ${CONTAINER_REGISTRY}/release:${CI_COMMIT_TAG}
- docker run --rm -e FLY_APP=${FLY_APP} -e FLY_ACCESS_TOKEN=${FLY_ACCESS_TOKEN} flyio/flyctl:latest deploy --image ${CONTAINER_REGISTRY}/release:${CI_COMMIT_TAG}
environment:
name: production
url: https://tummie.app/