kind: pipeline
type: docker
name: test

platform:
  arch: amd64
  os: linux

steps:
  - name: test
    image: docker/compose:1.29.2
    commands:
      - cat .env.example
      - ls
      - cp .env.example .env
      - ls
      - docker-compose config
  - name: deploy
    image: appleboy/drone-ssh:linux-amd64
    settings:
      host: 10.10.14.176
      port: 22
      username: root
      password:
        from_secret: ssh_password
      script:
        - env
        - apt -y install git
        - mkdir -p ~/publish/cicd && cd $_
        - git init
        - git remoteadd origin http://10.10.14.176:3000/examples/DockerComposeCICD.git
        - git fetch origin +refs/heads/master
        - git checkout ${DRONE_COMMIT_SHA} -b ${DRONE_REPO_BRANCH}
        #- ./start.sh
