Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:redhat-ipaas/ipaas-verifier into …
Browse files Browse the repository at this point in the history
…pr/swagger-integration
  • Loading branch information
rhuss committed Apr 26, 2017
2 parents 46213d2 + 298033f commit 893603e
Show file tree
Hide file tree
Showing 7 changed files with 529 additions and 44 deletions.
75 changes: 75 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#
# Copyright (C) 2016 Red Hat, Inc.
#
# Licensed 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.
#

version: 2
jobs:
build:
working_directory: /workspace
docker:
- image: openjdk:8-jdk
environment:
MAVEN_OPTS: -Xmx1024m
DOCKER_VERSION: 17.04.0-ce

steps:
- setup_remote_docker

- checkout

- restore_cache:
key: ipaas-verifier-m2

- run:
name: Maven
command: ./mvnw --batch-mode package fabric8:build install

- save_cache:
key: ipaas-verifier-m2
paths:
- ~/.m2

- run:
name: Collect junit reports
command: |
mkdir ./junit/
find . -type f -regex ".*/target/.*-reports/.*xml" -exec cp {} ./junit/ \;
- store_artifacts:
path: ./junit

- deploy:
command: |
if [ "${CIRCLE_PROJECT_USERNAME}" != "redhat-ipaas" ]; then
exit 0
fi
curl -fsSL https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz | tar xz -C /usr/bin --strip-components 1
if [ "${CIRCLE_BRANCH}" == "master" ]; then
DOCKER_IMAGE_TAG="latest"
elif [ "${CIRCLE_BRANCH}" == "summit-demo" ]; then
DOCKER_IMAGE_TAG="${CIRCLE_BRANCH}"
docker tag rhipaas/ipaas-verifier:latest rhipaas/ipaas-verifier:${DOCKER_IMAGE_TAG}
elif [[ "${CIRCLE_TAG}" =~ "^v[0-9]+(\.[0-9]+){2}" ]]; then
DOCKER_IMAGE_TAG="${CIRCLE_TAG}"
fi
if [ -z "${DOCKER_IMAGE_TAG}" ]; then
exit 0
fi
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
docker push rhipaas/ipaas-verifier:${DOCKER_IMAGE_TAG} | cat -
85 changes: 85 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Created by .ignore support plugin (hsz.mobi)
### Maven template
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties

# Eclipse
.project
.settings/
.classpath
*/.factorypath

### Java template
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*


### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion

*.iml

## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:

# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries

# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml

# Gradle:
# .idea/gradle.xml
# .idea/libraries

# Mongo Explorer plugin:
# .idea/mongoSettings.xml

## File-based project format:
*.ipr
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties

# OS X files
.DS_Store


Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
1 change: 1 addition & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip
44 changes: 0 additions & 44 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,44 +0,0 @@
#
# Copyright (C) 2017 Red Hat, Inc.
#
# Licensed 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.
#

machine:
pre:
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
services:
- docker

dependencies:
override:
- mvn --batch-mode -DskipTests package dependency:go-offline
test:
override:
- mvn --batch-mode fabric8:build install
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/target/.*-reports/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
# No swagger yet:
# - cp target/classes/static/index.html $CIRCLE_ARTIFACTS/apidocs.html
# - cp target/classes/static/swagger.json $CIRCLE_ARTIFACTS/
# - cp target/classes/static/swagger.yaml $CIRCLE_ARTIFACTS/
- bash <(curl -s https://codecov.io/bash)

deployment:
staging:
owner: redhat-ipaas
branch: master
commands:
- mvn -Ddocker.push.username=$DOCKER_USERNAME -Ddocker.push.password=$DOCKER_PASSWORD fabric8:push

Loading

0 comments on commit 893603e

Please sign in to comment.