43 lines
1004 B
YAML
43 lines
1004 B
YAML
language: go
|
|
|
|
stages:
|
|
- test
|
|
- deploy
|
|
|
|
services:
|
|
- docker
|
|
|
|
dist: focal
|
|
|
|
go:
|
|
- "1.13"
|
|
- "1.14"
|
|
|
|
env:
|
|
global:
|
|
- GOLANG_VERSION="${TRAVIS_GO_VERSION}"
|
|
- IMAGINARY_VERSION="${TRAVIS_TAG:-dev}"
|
|
matrix:
|
|
- LIBVIPS=8.8.4
|
|
- LIBVIPS=8.9.2
|
|
|
|
before_install:
|
|
- docker pull h2non/imaginary:latest || true
|
|
|
|
install:
|
|
- "true"
|
|
|
|
script:
|
|
- docker build --pull --cache-from h2non/imaginary:latest --build-arg GOLANG_VERSION="${GOLANG_VERSION%.x}" --build-arg LIBVIPS_VERSION="${LIBVIPS}" --build-arg IMAGINARY_VERSION="${IMAGINARY_VERSION#v}" --tag h2non/imaginary:${IMAGINARY_VERSION#v} .
|
|
|
|
# jobs:
|
|
# include:
|
|
# # Deploy stage
|
|
# - stage: deploy
|
|
# script:
|
|
# - docker login -u "$DOCKER_LOGIN" -p "$DOCKER_PWD"
|
|
# - docker tag h2non/imaginary:${IMAGINARY_VERSION#v} h2non/imaginary:latest
|
|
# - docker push h2non/imaginary:${IMAGINARY_VERSION#v}
|
|
# - docker push h2non/imaginary:latest
|
|
# if: "${TRAVIS_TAG} =~ ^v([0-9]+).([0-9]+).([0-9]+)$"
|