<commit_before>language: c

env:
  global:
    - "HOST_IP=$(/sbin/ifconfig venet0:0 | grep 'inet addr' | awk -F: '{print $2}' | awk '{print $1}')"
    - DOCKER_HOST=tcp://$HOST_IP:2375
    - DOCKER_PORT_RANGE=2400:2500
    - SLIRP_PORTS=$(seq 2375 2500)
    - secure: "<KEY>

branches:
  only:
    - master

before_install:
  - openssl aes-256-cbc -K $encrypted_b863493192de_key -iv $encrypted_b863493192de_iv -in .dockercfg.enc -out .dockercfg -d
  - sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
  - sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
  - echo exit 101 | sudo tee /usr/sbin/policy-rc.d
  - sudo chmod +x /usr/sbin/policy-rc.d

install:
  - sudo apt-get -qqy update
  - sudo apt-get -qqy install lxc lxc-docker-1.2.0 slirp
  - sudo sudo usermod -aG docker "$USER"
  - git clone git://github.com/cptactionhank/sekexe

before_script:
  - "sekexe/run 'mount -t tmpfs -o size=8g tmpfs /var/lib/docker && docker -d -H tcp://0.0.0.0:2375' &"
  - "while ! docker info &> /dev/null ; do sleep 1; done"
    #  - docker pull rocker/r-base

script:
  - docker version
  # - docker build -t local/blah blah
  # - docker run local/r-base r -e 'sapply(installed.packages()[,"Package"], tools::testInstalledPackage)'
  - echo "Test" > test.txt
  - echo $TRAVIS_JOB_ID
  - echo $TRAVIS_BUILD_NUMBER
  - echo $TRAVIS_BRANCH
  - ls -la
  - git remote -v
  - git branch

after_script:
  - git remote set-url --push origin https://github.com/Accordance/test-docker.git
  - git remote set-branches --add origin $TRAVIS_BRANCH
  - git fetch -q
  - git config user.name '#{ENV['GIT_NAME']}'
  - git config user.email '#{ENV['GIT_EMAIL']}'
  - git config credential.helper "store --file=.git/credentials"
  - echo "https://${GH_TOKEN}:@github.com" > .git/credentials
  - git branch $TRAVIS_BRANCH origin/$TRAVIS_BRANCH
  - git add test.txt
  - git status
  - git commit -m "Is it working? build: $TRAVIS_BUILD_NUMBER job: $TRAVIS_JOB_ID"
  - git push -u origin master
  - rm -f .git/credentials

# after_success:
  # - docker push accordance/test<commit_msg>More output 1<commit_after>language: c

env:
  global:
    - "HOST_IP=$(/sbin/ifconfig venet0:0 | grep 'inet addr' | awk -F: '{print $2}' | awk '{print $1}')"
    - DOCKER_HOST=tcp://$HOST_IP:2375
    - DOCKER_PORT_RANGE=2400:2500
    - SLIRP_PORTS=$(seq 2375 2500)
    - secure: "m0MlW+KNcV3WRlr8Ky+jGcqZTIynszN0a1zmz1oOpKxfgk8jtiUSAAWAOrjy+/Dq2+VenOTpXzxOqXLmjtRxIDf8QEe+Bt7d+l9h8VY2pFD+2g6XQJM2EK7gxujMPTSoBAX8L3D9/x8uaPb7r5pKJTx941eDXg7Lqbcwi/YBeDc="

branches:
  only:
    - master

before_install:
  - openssl aes-256-cbc -K $encrypted_b863493192de_key -iv $encrypted_b863493192de_iv -in .dockercfg.enc -out .dockercfg -d
  - sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
  - sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
  - echo exit 101 | sudo tee /usr/sbin/policy-rc.d
  - sudo chmod +x /usr/sbin/policy-rc.d

install:
  - sudo apt-get -qqy update
  - sudo apt-get -qqy install lxc lxc-docker-1.2.0 slirp
  - sudo sudo usermod -aG docker "$USER"
  - git clone git://github.com/cptactionhank/sekexe

before_script:
  - "sekexe/run 'mount -t tmpfs -o size=8g tmpfs /var/lib/docker && docker -d -H tcp://0.0.0.0:2375' &"
  - "while ! docker info &> /dev/null ; do sleep 1; done"
    #  - docker pull rocker/r-base

script:
  - docker version
  # - docker build -t local/blah blah
  # - docker run local/r-base r -e 'sapply(installed.packages()[,"Package"], tools::testInstalledPackage)'
  - echo "Test" > test.txt
  - echo $TRAVIS_JOB_ID
  - echo $TRAVIS_BUILD_NUMBER
  - echo $TRAVIS_BRANCH
  - ls -la
  - git remote -v
  - git branch

after_script:
  - git remote set-url --push origin https://github.com/Accordance/test-docker.git
  - git remote set-branches --add origin $TRAVIS_BRANCH
  - git fetch -q
  - git config user.name $GIT_NAME
  - git config user.email $GIT_EMAIL
  - git config credential.helper "store --file=.git/credentials"
  - echo "https://${GH_TOKEN}:@github.com" > .git/credentials
  - git branch $TRAVIS_BRANCH origin/$TRAVIS_BRANCH
  - git add test.txt
  - git status
  - git commit -m "Is it working? build: ${TRAVIS_BUILD_NUMBER} job: ${TRAVIS_JOB_ID}"
  - git push -u origin master
  - rm -f .git/credentials

# after_success:
  # - docker push accordance/test
{'fraction_non_alphanumeric': 0.14266180492251596, 'fraction_numerical': 0.034184138559708296, 'mean_word_length': 3.0488929889298895, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 12, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '43042', 'n_tokens_mistral': 1927, 'n_tokens_neox': 1790, 'n_words': 409}