<commit_before>#
# requires the following gitlab secret variables
#
# - NEXUS_USERNAME
# - NEXUS_PASSWORD
# - NEXUS_REPO_URL
# - DOCKER_REGISTRY_USERNAME
# - DOCKER_REGISTRY_PASSWORD
# - DOCKER_REGISTRY_EMAIL
# - DOCKER_REGISTRY_NAME        # eg "registry-1.docker.io" (for docker hub)
                                # or "docker-dev.incode.cloud" (eg a cloud-based nexus)
# - DOCKER_REGISTRY_URL         # eg "https://index.docker.io/v1/" (for docker hub)
                                # or "https://repo.incode.cloud/repository/docker-dev/" (eg a cloud-based nexus)
#

image: maven:3.5.3-jdk-8

before_script:
  - export BASELINE=1.16.2
  - export REVISION=$BASELINE.$(date +%Y%m%d)-$(date +%H%M)-$(echo $CI_COMMIT_SHA | cut -c1-8)

services:
  - docker:dind

variables:
  DOCKER_HOST: tcp://docker:2375
  DOCKER_DRIVER: overlay2
  APP_NAME: "simpleapp"

stages:
  - build-package-push

build-package-push:
  stage: build-package-push
  script:
    - echo "REVISION=$REVISION"
    - cd core
    - >
      mvn -s .m2/settings.xml \
          --batch-mode \
          clean deploy \
          -Drevision=$REVISION \
          -Dnexus-deploy \
          -Dnexus-deploy.repositoryUrl=$NEXUS_REPO_URL \
          $CORE_ADDITIONAL_OPTS
    - cd ..

#
# remainder commented out for now, see: https://gitlab.com/gitlab-org/gitlab-runner/issues/3552
#
# it's possible that the mvn command to build the Docker image is failing ... it seems to get stuck.
# maybe the background stuff is deadlocking?
# then, the CI job for reporting the failure/uploading artifacts then hangs.
# if that's correct, then commenting this out is a problem because we're masking an error on our side.
#
# on the other hand, I can't reproduce this issue locally.
#

#    - cd example/application/$APP_NAME
#    - >
#      mvn --batch-mode \
#          install \
#          -Drevision=$REVISION \
#          -Disis.version=$REVISION \
#          $CORE_ADDITIONAL_OPTS \
#          -Dmavenmixin-docker \
#          -Ddocker-plugin.imageName=$DOCKER_REGISTRY_NAME/$DOCKER_REGISTRY_USERNAME/$APP_NAME
#    - >
#      mvn -s .m2/settings.xml \
#          --batch-mode \
#          docker:push@push-image-tagged \
#          -pl webapp \
#          -Drevision=$REVISION \
#          -Disis.version=$REVISION \
#          -DskipTests \
#          -Dskip.isis-swagger \
#          -Dmavenmixin-docker \
#          -Ddocker-plugin.imageName=$DOCKER_REGISTRY_NAME/$DOCKER_REGISTRY_USERNAME/$APP_NAME \
#          -Ddocker-plugin.serverId=docker-registry \
#          -Ddocker.registryUrl=$DOCKER_REGISTRY_URL
#    - cd ../../..
#
#
<commit_msg>ISIS-1965: trivial edits for testing ci<commit_after>#
# requires the following gitlab secret variables
#
# - NEXUS_USERNAME
# - NEXUS_PASSWORD
# - NEXUS_REPO_URL
# - DOCKER_REGISTRY_USERNAME
# - DOCKER_REGISTRY_PASSWORD
# - DOCKER_REGISTRY_EMAIL
# - DOCKER_REGISTRY_NAME        # eg "registry-1.docker.io" (for docker hub)
                                # or "docker-dev.incode.cloud" (eg a cloud-based nexus)
# - DOCKER_REGISTRY_URL         # eg "https://index.docker.io/v1/" (for docker hub)
                                # or "https://repo.incode.cloud/repository/docker-dev/" (eg a cloud-based nexus)
#

image: maven:3.5.3-jdk-8

before_script:
  - export BASELINE=1.16.2
  - export REVISION=$BASELINE.$(date +%Y%m%d)-$(date +%H%M)-$(echo $CI_COMMIT_SHA | cut -c1-8)

services:
  - docker:dind

variables:
  DOCKER_HOST: tcp://docker:2375
  DOCKER_DRIVER: overlay2
  APP_NAME: "simpleapp"

stages:
  - build-package-push

build-package-push:
  stage: build-package-push
  script:
    - echo ""
    - echo ""
    - echo ""
    - echo "$REVISION"
    - echo ""
    - echo ""
    - echo ""
    - cd core
    - >
      mvn -s .m2/settings.xml \
          --batch-mode \
          clean deploy \
          -Drevision=$REVISION \
          -Dnexus-deploy \
          -Dnexus-deploy.repositoryUrl=$NEXUS_REPO_URL \
          $CORE_ADDITIONAL_OPTS
    - cd ..
    - echo ""
    - echo ""
    - echo ""
    - echo "$REVISION"
    - echo ""
    - echo ""
    - echo ""

#
# remainder commented out for now, see: https://gitlab.com/gitlab-org/gitlab-runner/issues/3552
#
# it's possible that the mvn command to build the Docker image is failing ... it seems to get stuck.
# maybe the background stuff is deadlocking?
# then, the CI job for reporting the failure/uploading artifacts then hangs.
# if that's correct, then commenting this out is a problem because we're masking an error on our side.
#
# on the other hand, I can't reproduce this issue locally.
#

#    - cd example/application/$APP_NAME
#    - >
#      mvn --batch-mode \
#          install \
#          -Drevision=$REVISION \
#          -Disis.version=$REVISION \
#          $CORE_ADDITIONAL_OPTS \
#          -Dmavenmixin-docker \
#          -Ddocker-plugin.imageName=$DOCKER_REGISTRY_NAME/$DOCKER_REGISTRY_USERNAME/$APP_NAME
#    - >
#      mvn -s .m2/settings.xml \
#          --batch-mode \
#          docker:push@push-image-tagged \
#          -pl webapp \
#          -Drevision=$REVISION \
#          -Disis.version=$REVISION \
#          -DskipTests \
#          -Dskip.isis-swagger \
#          -Dmavenmixin-docker \
#          -Ddocker-plugin.imageName=$DOCKER_REGISTRY_NAME/$DOCKER_REGISTRY_USERNAME/$APP_NAME \
#          -Ddocker-plugin.serverId=docker-registry \
#          -Ddocker.registryUrl=$DOCKER_REGISTRY_URL
#    - cd ../../..
#
#

{'fraction_non_alphanumeric': 0.12749077490774907, 'fraction_numerical': 0.00922509225092251, 'mean_word_length': 2.146256529309344, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3655993', 'n_tokens_mistral': 2025, 'n_tokens_neox': 1907, 'n_words': 369}