--- kind: pipeline name: CI/CD trigger: ref: - refs/tags/* volumes: - name: deps temp: {} steps: - name: notify-start image: appleboy/drone-discord settings: webhook_id: from_secret: DISCORD_WEBHOOK_ID webhook_token: from_secret: DISCORD_WEBHOOK_TOKEN message: "Started build: https://drone.cechis.cz/c3c/cv/{{ build.number }}" - name: build image: nixos/nix commands: - nix-build - name: publish image: docker:dind commands: - ./result | docker load - echo ${REGISTRY_PASSWORD} | docker login -u ${REGISTRY_USER} dr.cechis.cz - docker tag cv:latest dr.cechis.cz/c3c/cv:${DRONE_TAG} - docker push dr.cechis.cz/c3c/cv:${DRONE_TAG} depends_on: - build - name: deploy image: appleboy/drone-ssh settings: host: vps-1.cechis.cz command_timeout: 20m username: drone key: from_secret: SSH_DRONE script: - docker service update --quiet --with-registry-auth --detach=false --image dr.cechis.cz/c3c/cv:${DRONE_TAG} c3c-cv depends_on: - publish - name: notify-end image: appleboy/drone-discord settings: webhook_id: from_secret: DISCORD_WEBHOOK_ID webhook_token: from_secret: DISCORD_WEBHOOK_TOKEN message: "C3C CV build: {{ build.number }} - {{ build.status }}" when: status: [ success, failure ] depends_on: - deploy --- kind: signature hmac: 524884f80693fe90f6cc2ac2267276afd7057bb462a25feba53cd700c9ea2877 ...