name: ykonsole-server kind: pipeline type: docker trigger: branch: - master steps: - name: setup image: ubuntu:20.04 commands: - echo -n $DRONE_BUILD_NUMBER > .tags - name: package image: plugins/docker settings: username: from_secret: docker_username password: from_secret: docker_password repo: r.vmaple.dev/ykonsole/server registry: r.vmaple.dev - name: deploy image: ubuntu:20.04 environment: SSH_DRONE_PRIVATE_KEY: from_secret: ssh_private_key SSH_USERNAME: from_secret: ssh_username SSH_TARGET: from_secret: ssh_target commands: - apt-get update - apt-get -y install openssh-client - eval `ssh-agent -s` - echo "$SSH_DRONE_PRIVATE_KEY" | ssh-add - - ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$SSH_TARGET ./deploy-ykonsole.sh $DRONE_BUILD_NUMBER