blob: f2710af54b8bac2622da9daaa5c532290ea0e2ff [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
variables:
REGISTRY_HOST: $REGISTRY_HOST
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: $HARBOR_REGISTRY_HOST
HARBOR_IMAGE_NAME: $HARBOR_REGISTRY_HOST/$CI_PROJECT_PATH
GIT_REPO_ORIGIN: $GIT_REPO_ORIGIN
GIT_STRATEGY: clone
stages:
- github
- build
pull github:
image: maven:3-jdk-8
stage: github
script:
- git remote set-url origin $GIT_REPO_ORIGIN/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME.git
- git remote add github https://github.com/apache/incubator-streampipes-examples.git
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH")
- mkdir ~/.ssh
- touch ~/.ssh/known_hosts
- ssh-keyscan -p 2222 -t rsa $GITLAB_HOST > ~/.ssh/known_hosts
- git config --global user.email '$USER_EMAIL'
- git config --global user.name '$USER_NAME'
- git checkout dev
- git pull github dev
- git push origin --all
build:
image: maven:3-jdk-8
stage: build
script:
- mvn clean package javadoc:aggregate -U -DskipTests