3
0
login_themes/.drone.yml
Mike Sutton 0499617ec1
Some checks failed
continuous-integration/drone/push Build is failing
added fg logo and improved drone.yml
2023-03-25 17:13:59 +01:00

59 lines
1.7 KiB
YAML

---
kind: pipeline
type: docker
name: build-test-deploy
image_pull_secrets:
- registryLogins
platform:
os: linux
arch: amd64
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
steps:
- name: notify_start
image: appleboy/drone-telegram
settings:
token: 6138074869:AAHQcUundL70GMUZH-AVala4Ej8dKNGLim4
to: 1558971280
message: >
{{uppercase repo.name}}:{{uppercase build.branch}}:{{build.number}} CI build started
- name: deploy
image: wizewerx/wizewerx-docker-compose
volumes:
- name: dockersock
path: /var/run/docker.sock
environment:
DOCKER_AUTH_CONFIG:
from_secret: registryLogins
commands:
- mkdir -p "/root/.docker" && echo $DOCKER_AUTH_CONFIG > "/root/.docker/config.json"
- export BUILD_TARGET=wizewerx/${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}
- export PULL_IMAGE=`docker manifest inspect $BUILD_TARGET > /dev/null;echo $?`
- if [[ "$PULL_IMAGE" -eq 0 ]]; then docker pull $BUILD_TARGET ;fi
- echo ${DRONE_COMMIT_SHA} > ./version.txt
- docker build --cache-from $BUILD_TARGET --build-arg GEM_CACHE=$BUILD_TARGET -f ./docker/Dockerfile -t $BUILD_TARGET .
- docker push $BUILD_TARGET
when:
branch:
- master
- production
- name: notify_end
image: appleboy/drone-telegram
settings:
token: 6138074869:AAHQcUundL70GMUZH-AVala4Ej8dKNGLim4
to: 1558971280
message: >
{{uppercase repo.name}}:{{uppercase build.branch}}:{{build.number}}{{#success build.status}} succeeded. Good job. {{else}} failed. FIX THE BUILD!!!.{{/success}}
Build took {{since build.started}}
when:
status: [ success, failure ]
branch:
- master
- production