<commit_before>machine:
  java:
    version: oraclejdk8
  services:
    - docker

dependencies:
  post:
    - ./create-all-dockerfiles.sh

# According to https://circleci.com/docs/test-metadata
test:
  post:
    - mkdir -p $CIRCLE_TEST_REPORTS/junit/
    - find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
    - docker build microservices/support/auth-server/build
    - docker build microservices/support/config-server/build
    - docker build microservices/support/discovery-server/build
    - docker build microservices/support/edge-server/build
    - docker build microservices/support/monitor-dashboard/build
    - docker build microservices/support/turbine/build
    - docker build microservices/core/product-service/build
    - docker build microservices/core/recommendation-service/build
    - docker build microservices/core/review-service/build
    - docker build microservices/composite/product-composite-service/build
    - host=localhost ./test-all.sh

deployment:
  hub:
    branch: master
    commands:
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PWD
#      - docker info
#
## Renaming the target-folder for the time being to be compliant with Shippable builds...
#      - mv target buildoutput
#      - docker build -t magnuslarsson/az-ip-api-server:master.$CIRCLE_BUILD_NUM .
#      - mv buildoutput target

      - docker tag magnuslarsson/ms-blog-auth-server               magnuslarsson/ms-blog-auth-server:master.$CIRCLE_BUILD_NUM
      - docker tag magnuslarsson/ms-blog-config-server             magnuslarsson/ms-blog-config-server:master.$CIRCLE_BUILD_NUM
      - docker tag magnuslarsson/ms-blog-discovery-server          magnuslarsson/ms-blog-discovery-server:master.$CIRCLE_BUILD_NUM
      - docker tag magnuslarsson/ms-blog-edge-server               magnuslarsson/ms-blog-edge-server:master.$CIRCLE_BUILD_NUM
      - docker tag magnuslarsson/ms-blog-monitor-dashboard         magnuslarsson/ms-blog-monitor-dashboard:master.$CIRCLE_BUILD_NUM
      - docker tag magnuslarsson/ms-blog-turbine                   magnuslarsson/ms-blog-turbine:master.$CIRCLE_BUILD_NUM

      - docker tag magnuslarsson/ms-blog-product-service           magnuslarsson/ms-blog-product-service:master.$CIRCLE_BUILD_NUM
      - docker tag magnuslarsson/ms-blog-recommendation-service    magnuslarsson/ms-blog-recommendation-service:master.$CIRCLE_BUILD_NUM
      - docker tag magnuslarsson/ms-blog-review-service            magnuslarsson/ms-blog-review-service:master.$CIRCLE_BUILD_NUM
      - docker tag magnuslarsson/ms-blog-product-composite-service magnuslarsson/ms-blog-product-composite-service:master.$CIRCLE_BUILD_NUM

      - docker push magnuslarsson/ms-blog-auth-server:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-config-server:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-discovery-server:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-edge-server:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-monitor-dashboard:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-turbine:master.$CIRCLE_BUILD_NUM

      - docker push magnuslarsson/ms-blog-product-service:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-recommendation-service:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-review-service:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-product-composite-service:master.$CIRCLE_BUILD_NUM<commit_msg>Enhance circleCi integration, adding proper tagging of images...<commit_after>machine:
  java:
    version: oraclejdk8
  services:
    - docker

dependencies:
  post:
    - ./create-all-dockerfiles.sh

# According to https://circleci.com/docs/test-metadata
test:
  post:
    - mkdir -p $CIRCLE_TEST_REPORTS/junit/
    - find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
    - docker build -t magnuslarsson/ms-blog-auth-server:master.$CIRCLE_BUILD_NUM microservices/support/auth-server/build
    - docker build -t magnuslarsson/ms-blog-config-server:master.$CIRCLE_BUILD_NUM microservices/support/config-server/build
    - docker build -t magnuslarsson/ms-blog-discovery-server:master.$CIRCLE_BUILD_NUM microservices/support/discovery-server/build
    - docker build -t magnuslarsson/ms-blog-edge-server:master.$CIRCLE_BUILD_NUM microservices/support/edge-server/build
    - docker build -t magnuslarsson/ms-blog-monitor-dashboard:master.$CIRCLE_BUILD_NUM microservices/support/monitor-dashboard/build
    - docker build -t magnuslarsson/ms-blog-turbine:master.$CIRCLE_BUILD_NUM microservices/support/turbine/build
    - docker build -t magnuslarsson/ms-blog-product-service:master.$CIRCLE_BUILD_NUM microservices/core/product-service/build
    - docker build -t magnuslarsson/ms-blog-recommendation-service:master.$CIRCLE_BUILD_NUM microservices/core/recommendation-service/build
    - docker build -t magnuslarsson/ms-blog-review-service:master.$CIRCLE_BUILD_NUM microservices/core/review-service/build
    - docker build -t magnuslarsson/ms-blog-product-composite-service:master.$CIRCLE_BUILD_NUM microservices/composite/product-composite-service/build
    - host=localhost ./test-all.sh

deployment:
  hub:
    branch: master
    commands:
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PWD
#      - docker info
#
## Renaming the target-folder for the time being to be compliant with Shippable builds...
#      - mv target buildoutput
#      - docker build -t magnuslarsson/az-ip-api-server:master.$CIRCLE_BUILD_NUM .
#      - mv buildoutput target

#      - docker tag magnuslarsson/ms-blog-auth-server               magnuslarsson/ms-blog-auth-server:master.$CIRCLE_BUILD_NUM
#      - docker tag magnuslarsson/ms-blog-config-server             magnuslarsson/ms-blog-config-server:master.$CIRCLE_BUILD_NUM
#      - docker tag magnuslarsson/ms-blog-discovery-server          magnuslarsson/ms-blog-discovery-server:master.$CIRCLE_BUILD_NUM
#      - docker tag magnuslarsson/ms-blog-edge-server               magnuslarsson/ms-blog-edge-server:master.$CIRCLE_BUILD_NUM
#      - docker tag magnuslarsson/ms-blog-monitor-dashboard         magnuslarsson/ms-blog-monitor-dashboard:master.$CIRCLE_BUILD_NUM
#      - docker tag magnuslarsson/ms-blog-turbine                   magnuslarsson/ms-blog-turbine:master.$CIRCLE_BUILD_NUM
#
#      - docker tag magnuslarsson/ms-blog-product-service           magnuslarsson/ms-blog-product-service:master.$CIRCLE_BUILD_NUM
#      - docker tag magnuslarsson/ms-blog-recommendation-service    magnuslarsson/ms-blog-recommendation-service:master.$CIRCLE_BUILD_NUM
#      - docker tag magnuslarsson/ms-blog-review-service            magnuslarsson/ms-blog-review-service:master.$CIRCLE_BUILD_NUM
#      - docker tag magnuslarsson/ms-blog-product-composite-service magnuslarsson/ms-blog-product-composite-service:master.$CIRCLE_BUILD_NUM

      - docker push magnuslarsson/ms-blog-auth-server:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-config-server:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-discovery-server:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-edge-server:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-monitor-dashboard:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-turbine:master.$CIRCLE_BUILD_NUM

      - docker push magnuslarsson/ms-blog-product-service:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-recommendation-service:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-review-service:master.$CIRCLE_BUILD_NUM
      - docker push magnuslarsson/ms-blog-product-composite-service:master.$CIRCLE_BUILD_NUM
{'fraction_non_alphanumeric': 0.1003974868572894, 'fraction_numerical': 0.00025644313373509426, 'mean_word_length': 3.537521815008726, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '440670', 'n_tokens_mistral': 2599, 'n_tokens_neox': 2505, 'n_words': 356}