sshportal/.circleci/config.yml

41 lines
1.3 KiB
YAML
Raw Normal View History

defaults: &defaults
working_directory: /go/src/moul.io/sshportal
docker:
2021-12-24 15:59:57 +08:00
- image: circleci/golang:1.17.5
2018-11-16 17:24:18 +08:00
environment:
GO111MODULE: "on"
2018-11-16 22:44:29 +08:00
install_retry: &install_retry
run:
name: install retry
command: |
command -v wget &>/dev/null && wget -O /tmp/retry "https://github.com/moul/retry/releases/download/v0.5.0/retry_$(uname -s)_$(uname -m)" || true
if [ ! -f /tmp/retry ]; then command -v curl &>/dev/null && curl -L -o /tmp/retry "https://github.com/moul/retry/releases/download/v0.5.0/retry_$(uname -s)_$(uname -m)"; fi
chmod +x /tmp/retry
/tmp/retry --version
2017-12-04 16:52:30 +08:00
version: 2
jobs:
docker.integration:
<<: *defaults
steps:
- checkout
- run:
name: Install Docker Compose
command: |
umask 022
2019-01-04 06:54:26 +08:00
curl -L https://github.com/docker/compose/releases/download/1.11.4/docker-compose-`uname -s`-`uname -m` > ~/docker-compose
- setup_remote_docker:
docker_layer_caching: true
2020-08-20 00:30:10 +08:00
version: 18.09.3 # https://github.com/golang/go/issues/40893
2018-11-16 22:44:29 +08:00
- *install_retry
- run: /tmp/retry -m 3 docker build -t moul/sshportal .
- run: /tmp/retry -m 3 make integration
workflows:
version: 2
build_and_integration:
jobs:
- docker.integration