| variables: |
| REGISTRY_HOST: ipe-wim-gitlab.fzi.de:5000 |
| IMAGE_NAME: $REGISTRY_HOST/$CI_PROJECT_PATH |
| DOCKER_HUB_IMAGE_NAME: streampipes/ |
| MAVEN_CLI_OPTS: -DskipTests --batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true |
| HARBOR_REGISTRY_HOST: laus.fzi.de:8201 |
| HARBOR_IMAGE_NAME: $HARBOR_REGISTRY_HOST/$CI_PROJECT_PATH |
| GIT_REPO_ORIGIN: ssh://git@ipe-wim-gitlab.fzi.de:2222 |
| GIT_STRATEGY: clone |
| |
| |
| stages: |
| - build |
| - github |
| # - docker |
| # - deploy |
| - release |
| - docker-hub |
| |
| build: |
| image: maven:3-jdk-8 |
| stage: build |
| script: |
| - echo "$GPG_PRIVATE_KEY" | gpg --batch --import --passphrase "$GPG_PASSPHRASE" |
| - echo "$MAVEN_CREDENTIALS" > /root/.m2/settings.xml |
| - mvn clean package javadoc:aggregate -U -DskipTests |
| - export MVN_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[') |
| - "echo $MVN_VERSION >> ./target/mvn_version" |
| artifacts: |
| paths: |
| - ./*/target/*.jar |
| - ./target/mvn_version |
| expire_in: 1 hour |
| except: |
| - /release-.*$/ |
| |
| |
| github: |
| image: maven:3-jdk-8 |
| stage: github |
| script: |
| - git config --global user.email 'zehnder@fzi.de' |
| - git config --global user.name 'zehnder' |
| - git checkout $CI_COMMIT_REF_NAME |
| - git pull |
| - git remote add github https://$GITHUB_TOKEN:x-oauth-basic@github.com/streampipes/streampipes-pipeline-elements.git |
| - git push github $CI_COMMIT_REF_NAME |
| only: |
| - dev |
| - master |
| |
| |
| #.docker_script: &docker_script |
| # image: docker:17.06.0-ce |
| # stage: docker |
| # dependencies: |
| # - build |
| # script: |
| # - export MVN_VERSION=$(cat ./target/mvn_version) |
| # - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $REGISTRY_HOST |
| # - docker login -u riemer -p $HARBOR_PASSWORD laus.fzi.de:8201 |
| # - docker build --no-cache --pull -t $IMAGE_NAME/$CONTAINER_NAME:latest -t $IMAGE_NAME/$CONTAINER_NAME:$MVN_VERSION -t $HARBOR_IMAGE_NAME/$CONTAINER_NAME:latest -t $HARBOR_IMAGE_NAME/$CONTAINER_NAME:$MVN_VERSION ./streampipes-$CONTAINER_NAME |
| # - docker push $IMAGE_NAME/$CONTAINER_NAME:$MVN_VERSION |
| # - docker push $IMAGE_NAME/$CONTAINER_NAME:latest |
| # - docker push $HARBOR_IMAGE_NAME/$CONTAINER_NAME:$MVN_VERSION |
| # - docker push $HARBOR_IMAGE_NAME/$CONTAINER_NAME:latest |
| # only: |
| # - dev |
| |
| .docker_hub: &docker_hub_script |
| image: docker:17.06.0-ce |
| stage: docker-hub |
| when: manual |
| script: |
| - export MVN_VERSION=$(cat ./target/mvn_version) |
| - docker login -u streampipesbuild -p $DOCKER_HUB_USER_PWD |
| - docker build --no-cache --pull -t $DOCKER_HUB_IMAGE_NAME/$CONTAINER_NAME:latest -t $DOCKER_HUB_IMAGE_NAME/$CONTAINER_NAME:$MVN_VERSION ./streampipes-$CONTAINER_NAME |
| - docker push $DOCKER_HUB_IMAGE_NAME/$CONTAINER_NAME:$MVN_VERSION |
| - docker push $DOCKER_HUB_IMAGE_NAME/$CONTAINER_NAME:latest |
| when: manual |
| only: |
| - master |
| |
| #deploy: |
| # image: maven:3-jdk-8 |
| # stage: deploy |
| # script: |
| # - echo "$GPG_PRIVATE_KEY" | gpg --batch --import --passphrase "$GPG_PASSPHRASE" |
| # - echo "$MAVEN_CREDENTIALS" > /root/.m2/settings.xml |
| # - mvn deploy -DskipTests |
| # artifacts: |
| # paths: |
| # - ./**/*.jar |
| # only: |
| # - dev |
| |
| start release: |
| image: maven:3-jdk-8 |
| stage: release |
| script: |
| - echo "$MAVEN_CREDENTIALS" > /root/.m2/settings.xml |
| - git remote set-url origin $GIT_REPO_ORIGIN/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME.git |
| - eval $(ssh-agent -s) |
| - ssh-add <(echo "$SSH") |
| - mkdir ~/.ssh |
| - touch ~/.ssh/known_hosts |
| - ssh-keyscan -p 2222 -t rsa ipe-wim-gitlab.fzi.de > ~/.ssh/known_hosts |
| - git config --global user.email 'zehnder@fzi.de' |
| - git config --global user.name 'zehnder' |
| - git fetch |
| - git checkout master |
| - git checkout dev |
| - mvn -B jgitflow:release-start $MAVEN_CLI_OPTS |
| - git push origin --all |
| only: |
| - dev |
| when: manual |
| |
| finish release: |
| image: maven:3-jdk-8 |
| stage: release |
| script: |
| - export MVN_VERSION=$(cat ./target/mvn_version) |
| - echo "$GPG_PRIVATE_KEY" | gpg --batch --import --passphrase "$GPG_PASSPHRASE" |
| - echo "$MAVEN_CREDENTIALS" > /root/.m2/settings.xml |
| - git remote set-url origin $GIT_REPO_ORIGIN/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME.git |
| - git remote add github https://$GITHUB_TOKEN:x-oauth-basic@github.com/streampipes/streampipes-pipeline-elements.git |
| - eval $(ssh-agent -s) |
| - ssh-add <(echo "$SSH") |
| - mkdir ~/.ssh |
| - touch ~/.ssh/known_hosts |
| - ssh-keyscan -p 2222 -t rsa ipe-wim-gitlab.fzi.de > ~/.ssh/known_hosts |
| - git config --global user.email 'zehnder@fzi.de' |
| - git config --global user.name 'zehnder' |
| - git checkout master |
| - git checkout dev |
| - git checkout $CI_BUILD_REF_NAME |
| - mvn -B jgitflow:release-finish $MAVEN_CLI_OPTS |
| - git push origin --all |
| - git push origin --tags |
| - git checkout master |
| - git push github master |
| - git push github $MVN_VERSION |
| - git checkout dev |
| - git push github dev |
| when: manual |
| except: |
| - master |
| |
| #docker-processors-aggregation-flink: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "processors-aggregation-flink" |
| # |
| #docker-processors-enricher-flink: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "processors-enricher-flink" |
| # |
| #docker-processors-filters-jvm: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "processors-filters-jvm" |
| # |
| #docker-processors-geo-jvm: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "processors-geo-jvm" |
| # |
| #docker-processors-image-processing-jvm: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "processors-image-processing-jvm" |
| # |
| #docker-processors-pattern-detection-flink: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "processors-pattern-detection-flink" |
| # |
| #docker-processors-filters-siddhi: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "processors-filters-siddhi" |
| # |
| #docker-processors-statistics-flink: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "processors-statistics-flink" |
| # |
| #docker-processors-geo-flink: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "processors-geo-flink" |
| # |
| #docker-processors-transformation-flink: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "processors-transformation-flink" |
| # |
| #docker-processors-transformation-jvm: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "processors-transformation-jvm" |
| # |
| #docker-sinks-brokers-jvm: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "sinks-brokers-jvm" |
| # |
| #docker-sinks-databases-flink: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "sinks-databases-flink" |
| # |
| #docker-sinks-databases-jvm: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "sinks-databases-jvm" |
| # |
| #docker-sinks-notifications-jvm: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "sinks-notifications-jvm" |
| # |
| #docker-sinks-internal-jvm: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "sinks-internal-jvm" |
| # |
| #docker-sources-vehicle-simulator: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "sources-vehicle-simulator" |
| # |
| #docker-sources-random: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "sources-random-data-generator" |
| # |
| #docker-sources-watertank-simulator: |
| # <<: *docker_script |
| # variables: |
| # CONTAINER_NAME: "sources-watertank-simulator" |
| |
| |
| docker-hub-processors-aggregation-flink: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "processors-aggregation-flink" |
| |
| docker-hub-processors-enricher-flink: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "processors-enricher-flink" |
| |
| docker-hub-processors-filters-jvm: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "processors-filters-jvm" |
| |
| docker-hub-processors-geo-jvm: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "processors-geo-jvm" |
| |
| docker-hub-processors-image-processing-jvm: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "processors-image-processing-jvm" |
| |
| docker-hub-processors-pattern-detection-flink: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "processors-pattern-detection-flink" |
| |
| docker-hub-processors-filters-siddhi: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "processors-filters-siddhi" |
| |
| docker-hub-processors-statistics-flink: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "processors-statistics-flink" |
| |
| docker-hub-processors-geo-flink: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "processors-geo-flink" |
| |
| docker-hub-processors-transformation-flink: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "processors-transformation-flink" |
| |
| docker-hub-processors-transformation-jvm: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "processors-transformation-jvm" |
| |
| docker-hub-sinks-brokers-jvm: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "sinks-brokers-jvm" |
| |
| docker-hub-sinks-databases-flink: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "sinks-databases-flink" |
| |
| docker-hub-sinks-databases-jvm: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "sinks-databases-jvm" |
| |
| docker-hub-sinks-notifications-jvm: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "sinks-notifications-jvm" |
| |
| docker-hub-sinks-internal-jvm: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "sinks-internal-jvm" |
| |
| docker-hub-sources-vehicle-simulator: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "sources-vehicle-simulator" |
| |
| docker-hub-sources-random: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "sources-random-data-generator" |
| |
| docker-hub-sources-watertank-simulator: |
| <<: *docker_hub_script |
| variables: |
| CONTAINER_NAME: "sources-watertank-simulator" |