<commit_before># 1. Set your default branch to develop
# 2. In circleci project settings->advanced set:
#    - GitHub Status Updates (this should be on already)
#    - Only build pull requests
#    - Auto-cancel redundant builds
#    - Free and Open Source (this should be on already)

version: 2.1
jobs:
  build:
    environment:
      IMAGE_NAME: quay.io/wtsicgp/cgppindel
    docker:
      - image: circleci/buildpack-deps:stretch
    steps:
      - checkout
      - setup_remote_docker
      - run:
          name: Build Docker image
          command: |
            set -e
            docker login -u "$DOCKERHUB_USER" -p "$DOCKERHUB_PASSWORD"
            docker login -u "$QUAYIO_USER" -p "$QUAYIO_PASSWORD" quay.io
            docker build -t $IMAGE_NAME:$CIRCLE_BRANCH .
            echo 'Verify program(s) from each inherited base image - cgpbigwig'
            docker run -t --rm $IMAGE_NAME:$CIRCLE_BRANCH bwjoin --version
            echo 'Verify program(s) from each inherited base image - pcap-core'
            docker run -t --rm $IMAGE_NAME:$CIRCLE_BRANCH bwa_mem.pl -version
            docker run -t --rm $IMAGE_NAME:$CIRCLE_BRANCH bammarkduplicates2 --version
            docker run -t --rm $IMAGE_NAME:$CIRCLE_BRANCH samtools --version
            docker run -t --rm $IMAGE_NAME:$CIRCLE_BRANCH bash -c 'bwa 2>&1 | grep Version'
            echo 'Verify program(s) from this repo'
            docker run -t --rm $IMAGE_NAME:$CIRCLE_BRANCH pindel.pl --version
            docker run -t --rm $IMAGE_NAME:$CIRCLE_BRANCH pindel_input_gen.pl --version
            docker run -t --rm $IMAGE_NAME:$CIRCLE_BRANCH pindel_2_combined_vcf.pl --version
            docker run -t --rm $IMAGE_NAME:$CIRCLE_BRANCH FlagVcf.pl --version
            docker run -t --rm $IMAGE_NAME:$CIRCLE_BRANCH pindel_merge_vcf_bam.pl --version
            docker run -t --rm $IMAGE_NAME:$CIRCLE_BRANCH pindel_np_from_vcf.pl --version
            docker run -t --rm $IMAGE_NAME:$CIRCLE_BRANCH pindel_germ_bed.pl --version
            docker run -t --rm $IMAGE_NAME:$CIRCLE_BRANCH which pindel
            docker run -t --rm $IMAGE_NAME:$CIRCLE_BRANCH which filter_pindel_reads
            BRANCH_OR_TAG="${CIRCLE_TAG:-$CIRCLE_BRANCH}"
            if [ "$CIRCLE_TAG" = "$BRANCH_OR_TAG" ]; then
              echo 'Pushing image'
              docker push $IMAGE_NAME:$CIRCLE_BRANCH
            else
              echo "I am not a tag so not pushing image"
            fi

workflows:
  version: 2.1
  build_test:
    jobs:
      - build:
          context:
            - dockerhub-casmservice
            - quayio-casmservice
          filters:
            tags:
              only: /.+/
<commit_msg>branch name cleaning<commit_after># 1. Set your default branch to develop
# 2. In circleci project settings->advanced set:
#    - GitHub Status Updates (this should be on already)
#    - Only build pull requests
#    - Auto-cancel redundant builds
#    - Free and Open Source (this should be on already)

version: 2.1
jobs:
  build:
    environment:
      IMAGE_NAME: quay.io/wtsicgp/cgppindel
    docker:
      - image: circleci/buildpack-deps:stretch
    steps:
      - checkout
      - setup_remote_docker
      - run:
          name: Build Docker image
          command: |
            set -e
            CLEAN_BRANCH=$(echo $CIRCLE_BRANCH | tr / -)
            docker login -u "$DOCKERHUB_USER" -p "$DOCKERHUB_PASSWORD"
            docker login -u "$QUAYIO_USER" -p "$QUAYIO_PASSWORD" quay.io
            docker build -t $IMAGE_NAME:$CLEAN_BRANCH .
            echo 'Verify program(s) from each inherited base image - cgpbigwig'
            docker run -t --rm $IMAGE_NAME:$CLEAN_BRANCH bwjoin --version
            echo 'Verify program(s) from each inherited base image - pcap-core'
            docker run -t --rm $IMAGE_NAME:$CLEAN_BRANCH bwa_mem.pl -version
            docker run -t --rm $IMAGE_NAME:$CLEAN_BRANCH bammarkduplicates2 --version
            docker run -t --rm $IMAGE_NAME:$CLEAN_BRANCH samtools --version
            docker run -t --rm $IMAGE_NAME:$CLEAN_BRANCH bash -c 'bwa 2>&1 | grep Version'
            echo 'Verify program(s) from this repo'
            docker run -t --rm $IMAGE_NAME:$CLEAN_BRANCH pindel.pl --version
            docker run -t --rm $IMAGE_NAME:$CLEAN_BRANCH pindel_input_gen.pl --version
            docker run -t --rm $IMAGE_NAME:$CLEAN_BRANCH pindel_2_combined_vcf.pl --version
            docker run -t --rm $IMAGE_NAME:$CLEAN_BRANCH FlagVcf.pl --version
            docker run -t --rm $IMAGE_NAME:$CLEAN_BRANCH pindel_merge_vcf_bam.pl --version
            docker run -t --rm $IMAGE_NAME:$CLEAN_BRANCH pindel_np_from_vcf.pl --version
            docker run -t --rm $IMAGE_NAME:$CLEAN_BRANCH pindel_germ_bed.pl --version
            docker run -t --rm $IMAGE_NAME:$CLEAN_BRANCH which pindel
            docker run -t --rm $IMAGE_NAME:$CLEAN_BRANCH which filter_pindel_reads
            BRANCH_OR_TAG="${CIRCLE_TAG:-$CLEAN_BRANCH}"
            if [ "$CIRCLE_TAG" = "$BRANCH_OR_TAG" ]; then
              echo 'Pushing image'
              docker push $IMAGE_NAME:$CLEAN_BRANCH
            else
              echo "I am not a tag so not pushing image"
            fi

workflows:
  version: 2.1
  build_test:
    jobs:
      - build:
          context:
            - dockerhub-casmservice
            - quayio-casmservice
          filters:
            tags:
              only: /.+/

{'fraction_non_alphanumeric': 0.09310918159985221, 'fraction_numerical': 0.003694808793644929, 'mean_word_length': 2.0467079347214407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '469272', 'n_tokens_mistral': 1857, 'n_tokens_neox': 1754, 'n_words': 479}