blob: 2a3e79aa09dc814242df9ecd2fc1aa0a3def18ac [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: ipe-wim-gitlab.fzi.de:5000
HARBOR_IMAGE_NAME: $HARBOR_REGISTRY_HOST/streampipes/ui
IMAGE_NAME: $REGISTRY_HOST/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME
stages:
- build
- docker
- github
- docker-hub
#test:
# image: beevelop/nodejs-python
# stage: test
# script:
# - apt-get update && apt-get install -y apt-transport-https ca-certificates
# - curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add -
# - echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list
# - apt-get update
# - apt-get install -y google-chrome-stable --no-install-recommends
# - apt-get install -y firefox --no-install-recommends
# - export CHROME_BIN=google-chrome
# - export NODE_PATH=/cache/node_modules
# - npm install --unsafe-perm
# - npm test
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 rm github
- git remote add github https://$GITHUB_TOKEN:x-oauth-basic@github.com/streampipes/streampipes-ui.git
- git push github $CI_COMMIT_REF_NAME
only:
- dev
nginx:
image: docker:17.06.0-ce
stage: docker
script:
- apk update
- apk add curl
- apk add unzip
# - 'curl -k -f -L -H "PRIVATE-TOKEN: ${API_KEY}" -o javadoc.zip "https://ipe-wim-gitlab.fzi.de/streampipes/ce/-/jobs/artifacts/dev/download?job=build"'
# - unzip javadoc.zip
# - mkdir javadoc && mv target/site/apidocs/* ./javadoc
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $REGISTRY_HOST
- docker login -u zehnder -p $HARBOR_PASSWORD $HARBOR_REGISTRY_HOST
- docker build --no-cache --pull -t $HARBOR_IMAGE_NAME:0.63.0 -t $IMAGE_NAME .
- docker push $IMAGE_NAME
- docker push $HARBOR_IMAGE_NAME
nginx-docker-hub:
image: docker:17.06.0-ce
stage: docker-hub
script:
- apk update
- apk add curl
- mkdir javadoc
- docker login -u streampipesbuild -p $DOCKER_HUB_USER_PWD
- docker build --pull -t streampipes/ui:$CI_COMMIT_REF_NAME .
- docker push streampipes/ui:$CI_COMMIT_REF_NAME
- docker build --pull -t streampipes/ui .
- docker push streampipes/ui
when: manual
only:
- 0.65.0
nginx-testfeld:
image: docker:17.06.0-ce
stage: docker
script:
- apk update
- apk add curl
- apk add unzip
#- 'curl -k -f -L -H "PRIVATE-TOKEN: ${API_KEY}" -o docs.zip "https://ipe-wim-gitlab.fzi.de/streampipes/docs/-/jobs/artifacts/master/download?job=build"'
#- unzip docs.zip
#- mkdir javadoc
- docker login -u zehnder -p $HARBOR_PASSWORD $HARBOR_REGISTRY_HOST
- docker build --pull -t $HARBOR_REGISTRY_HOST/testfeld/ui:$CI_COMMIT_REF_NAME .
- docker push $HARBOR_REGISTRY_HOST/testfeld/ui:$CI_COMMIT_REF_NAME
only:
- testfeld