lemmy/.drone.yml
2020-12-09 23:18:10 +01:00

53 lines
2 KiB
YAML

kind: pipeline
name: default
steps:
- name: build lemmy docker image
image: docker/compose:alpine-1.27.4
volumes:
- name: docker_sock
path: /var/run/docker.sock
commands:
- docker build . --file docker/dev/Dockerfile --tag dessalines/lemmy:travis
- name: run federation tests
image: docker/compose:alpine-1.27.4
volumes:
- name: docker_sock
path: /var/run/docker.sock
commands:
- cd docker/travis/
- mkdir -p volumes/pictrs_{alpha,beta,gamma,delta,epsilon}
- chown -R 991:991 volumes/pictrs_{alpha,beta,gamma,delta,epsilon}
- docker-compose up -d
- pushd ../../api_tests
- echo "Waiting for Lemmy to start..."
- while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8541/api/v1/site')" != "200" ]]; do sleep 1; done
- while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8551/api/v1/site')" != "200" ]]; do sleep 1; done
- while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8561/api/v1/site')" != "200" ]]; do sleep 1; done
- while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8571/api/v1/site')" != "200" ]]; do sleep 1; done
- while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8581/api/v1/site')" != "200" ]]; do sleep 1; done
- yarn
- yarn api-test
- popd
- docker-compose down
- name: make release build and push to docker hub
image: docker/compose:alpine-1.27.4
volumes:
- name: docker_sock
path: /var/run/docker.sock
commands:
- docker build . --file docker/prod/Dockerfile --tag dessalines/lemmy:travis
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker tag dessalines/lemmy:travis dessalines/lemmy:v0.8.10
- docker push dessalines/lemmy:v0.8.10when:
when:
ref:
- refs/heads/feature-*
- refs/tags/*
volumes:
- name: docker_sock
host:
path: /var/run/docker.sock