version: 2
jobs:
  build:
    branches:
      only:
        - master
    working_directory:  /var/tmp
    docker:
      - image: diegovalle/elcrimen-docker
    steps:
      - checkout
      - run:
          name: Build the website https://elcri.men
          command: |
            sudo -H -E bash -c "cp ansible/* /etc/ansible && cd /etc/ansible && echo $ANSIBLE_PASSWORD > password.txt && ansible-playbook -c local ssh.yml --vault-password-file=/etc/ansible/password.txt --extra-vars 'secrets=true' && cd /root/new.crimenmexico && git pull && make"
          no_output_timeout: 2400

#      - store_artifacts:
#          path: /root/new.crimenmexico/db/crimenmexico.db
#          destination: crimenmexico.db
version: 2
jobs:
  build:
    branches:
      only:
        - master
    working_directory:  /var/tmp
    docker:
      - image: diegovalle/elcrimen-docker
        auth:
          username: diegovalle  # can specify string literal values
          password: $DOCKERHUB_PASSWORD  # or project environment variable reference
    steps:
      - checkout
      - run:
          name: Build the website https://elcri.men
          command: |
            sudo -H -E bash -c "cp ansible/* /etc/ansible && cd /etc/ansible && echo $ANSIBLE_PASSWORD > password.txt && ansible-playbook -c local ssh.yml --vault-password-file=/etc/ansible/password.txt --extra-vars 'secrets=true' && cd /root/new.crimenmexico && git pull && make"
          no_output_timeout: 2400

#      - store_artifacts:
#          path: /root/new.crimenmexico/db/crimenmexico.db
#          destination: crimenmexico.db

Add docker auth [Skip CI]
Add docker auth [Skip CI]
