Skip to content

Commit

Permalink
circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhemmarchand committed Mar 14, 2019
1 parent e801dc9 commit 9afc6d7
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 0 deletions.
107 changes: 107 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#

dependencies:
cache_directories:
- "~/.apt-cache"
pre:
- sudo rm -rf /var/cache/apt/archives && sudo ln -s ~/.apt-cache /var/cache/apt/archives && mkdir -p ~/.apt-cache/partial

apt-run: &apt-install
name: install system packages
command: |
sudo apt update -qq
sudo apt install -y python-pip
version: 2.1

executors:
content-executor:
docker:
- image: circleci/python:2.7.13
working_directory: ~/repo

jobs:
validate-content:
executor: content-executor
steps:
- run:
name: checkout repo
command: |
if [ "${CIRCLE_BRANCH}" == "" ]; then
git clone https://${GITHUB_TOKEN}@github.com/guilhemmarchand/TA-kafka-streaming-platform
else
git clone --branch ${CIRCLE_BRANCH} https://${GITHUB_TOKEN}@github.com/guilhemmarchand/TA-kafka-streaming-platform
fi
- restore_cache:
key: deps1-{{ .Branch }}-{{ checksum "TA-kafka-streaming-platform/TA-kafka-streaming-platform/default/app.conf" }}
- run: *apt-install
- run:
name: grab appinspect
command: |
curl -Ls http://dev.splunk.com/goto/appinspectdownload -o appinspect-lastest.tar.gz
mkdir appinspect-latest
tar -zxvf appinspect-lastest.tar.gz -C appinspect-latest --strip-components=1
- run:
name: install appinspect
command: |
cd appinspect-latest
rm -rf venv
sudo pip install --upgrade pip setuptools
sudo pip install virtualenv
virtualenv --clear venv
source venv/bin/activate
pip install .
- run:
name: run appinspect
command: |
cd TA-kafka-streaming-platform
rm -rf TA-kafka-streaming-platform/.git
rm -rf TA-kafka-streaming-platform/.circleci
rm -rf TA-kafka-streaming-platform/.gitignore
tar -zcvf TA-kafka-streaming-platform.tar.gz TA-kafka-streaming-platform
mkdir dist
cp TA-kafka-streaming-platform.tar.gz dist/
cd ../
cd appinspect-latest
pwd
ls -ltr
source venv/bin/activate
splunk-appinspect inspect ../TA-kafka-streaming-platform/TA-kafka-streaming-platform.tar.gz --included-tags=cloud
- save_cache:
key: deps1-{{ .Branch }}-{{ checksum "TA-kafka-streaming-platform/TA-kafka-streaming-platform/default/app.conf" }}
paths:
- "venv"
- persist_to_workspace:
root: TA-kafka-streaming-platform/dist/
paths:
- TA-kafka-streaming-platform.tar.gz
publish-github-release:
docker:
- image: cibuilds/github:0.10
steps:
- attach_workspace:
at: ~/TA-kafka-streaming-platform/dist/TA-kafka-streaming-platform.tar.gz
- run:
name: publish release on github
command: |
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ~/TA-kafka-streaming-platform/dist/TA-kafka-streaming-platform.tar.gz
workflows:
version: 2.1
validate-and-build:
jobs:
- validate-content:
filters:
tags:
only: /.*/
- publish-github-release:
requires:
- validate-content
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Splunk application for Kafka streaming platform

| branch | build status |
| --- | --- |
| master | [![master status](https://circleci.com/gh/guilhemmarchand/TA-kafka-streaming-platform/tree/master.svg?style=svg)](https://circleci.com/gh/guilhemmarchand/TA-kafka-streaming-platform/tree/master)

## This Splunk application provides index time and search time configuration to index and monitor logs from Apache Kafka Streaming Platform

This Splunk application is compatible with the full Kafka stack (including Confluent Enterprise and Open source):
Expand Down

0 comments on commit 9afc6d7

Please sign in to comment.