Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
baa7921
Update metrics-information.md
jenworthington Mar 6, 2019
c3aaa12
Update metrics-information.md
jenworthington Mar 7, 2019
e41f493
Update metrics-information.md (#45)
chaitanyaphalak Jun 17, 2019
7af163f
Merge branch 'develop' into jenworthington-patch-5
chaitanyaphalak Jun 17, 2019
8a831de
Update metrics-information.md (#44)
chaitanyaphalak Jun 17, 2019
174b4fa
Added more robust conditions to handle missing metrics
chaitanyaphalak Jul 18, 2019
2365ac6
Added more robust conditions to handle missing metrics (#56)
chaitanyaphalak Jul 25, 2019
55c1448
Release process: push gem to rubygems.org and get fluentd HEC gem ver…
rockb1017 Oct 8, 2019
9dae67b
Release process: push gem to rubygems.org and get fluentd HEC gem ver…
rockb1017 Oct 9, 2019
e8d6e44
Trigger release when VERSION file is edited
rockb1017 Oct 9, 2019
5f22af1
Trigger release when VERSION file is edited
rockb1017 Oct 9, 2019
a908585
fix yaml spacing
rockb1017 Oct 9, 2019
da963a6
Non interactive merge for automation
rockb1017 Oct 9, 2019
80ee076
test run of process
rockb1017 Oct 9, 2019
0653834
bumping up VERSION for testing
rockb1017 Oct 9, 2019
f036c47
test with splunk admin account
splunk-oss-admin Oct 9, 2019
0d5a496
run test outside of if block
splunk-oss-admin Oct 9, 2019
deba201
set VERSION variable for test
splunk-oss-admin Oct 9, 2019
55a5f43
user splunk admin account for the rest of push
rockb1017 Oct 9, 2019
55c7feb
explicitly set user info
rockb1017 Oct 9, 2019
02b77a4
clean dummy stages written for test
rockb1017 Oct 10, 2019
6aeb8ea
add back slash to regex
rockb1017 Oct 10, 2019
0b691fe
comment out step for pushing gems to rubygems.org
rockb1017 Oct 10, 2019
79a74ef
Remove Gemfile.lock from PR
rockb1017 Oct 10, 2019
ed99fbc
add back the step for publishing ruby gems
rockb1017 Oct 10, 2019
2276e08
CircleCI Release process (#59)
chaitanyaphalak Oct 11, 2019
611879e
ci fix for failing to push artifacts
chaitanyaphalak Oct 11, 2019
23431c0
Merge pull request #60 from splunk/ci-fix
rockb1017 Oct 11, 2019
3497290
fix hec version
chaitanyaphalak Oct 11, 2019
3702ad3
fix hec version (#61)
chaitanyaphalak Oct 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .circleci/build_and_push.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env bash
set -e
FLUENTD_HEC_GEM_VERSION=`cat docker/FLUENTD_HEC_GEM_VERSION`
aws ecr get-login --region $AWS_REGION --no-include-email | bash
echo "Building docker image..."
cp /tmp/pkg/fluent-plugin-kubernetes-metrics-*.gem docker
docker build --build-arg VERSION=$FLUENT_SPLUNK_HEC_GEM_VERSION --no-cache -t splunk/fluent-plugin-kubernetes-metrics:metrics ./docker
docker build --build-arg VERSION=$FLUENTD_HEC_GEM_VERSION --no-cache -t splunk/fluent-plugin-kubernetes-metrics:metrics ./docker
docker tag splunk/fluent-plugin-kubernetes-metrics:metrics $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/k8s-ci-metrics:latest
echo "Push docker image to ecr..."
docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/k8s-ci-metrics:latest | awk 'END{print}'
Expand Down
3 changes: 2 additions & 1 deletion .circleci/build_and_push_to_dockerhub.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env bash
set -e
FLUENTD_HEC_GEM_VERSION=`cat docker/FLUENTD_HEC_GEM_VERSION`
echo "Building docker image..."
cp /tmp/pkg/fluent-plugin-kubernetes-metrics-*.gem docker
VERSION=`cat VERSION`
docker build --build-arg VERSION=$FLUENT_SPLUNK_HEC_GEM_VERSION --no-cache -t splunk/fluent-plugin-kubernetes-metrics:ci ./docker
docker build --build-arg VERSION=$FLUENTD_HEC_GEM_VERSION --no-cache -t splunk/fluent-plugin-kubernetes-metrics:ci ./docker
docker tag splunk/fluent-plugin-kubernetes-metrics:ci splunk/${DOCKERHUB_REPO_NAME}:${VERSION}
echo "Push docker image to splunk dockerhub..."
docker login --username=$DOCKERHUB_ACCOUNT_ID --password=$DOCKERHUB_ACCOUNT_PASS
Expand Down
26 changes: 26 additions & 0 deletions .circleci/check_version_trigger_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -e

#!/usr/bin/env bash
LATEST_COMMIT=$(git rev-parse HEAD)
VERSION_COMMIT=$(git log -1 --format=format:%H VERSION)
if [ $VERSION_COMMIT = $LATEST_COMMIT ];
then
if [ -s VERSION ] # Check if content is empty
then
VERSION=`cat VERSION`
echo "VERSION is changed to $VERSION"
else
echo "[ERROR] VERSION file is empty."
exit 1
fi
git config user.email "splunk-oss-admin@splunk.com"
git config user.name "splunk-oss-admin"
git checkout develop
git pull origin develop
git checkout -b release/$VERSION origin/develop
git push https://$RELEASE_GITHUB_USER:$RELEASE_GITHUB_PASS@github.com/splunk/fluent-plugin-kubernetes-metrics.git release/$VERSION
git checkout master
git merge --no-edit release/$VERSION
git push https://$RELEASE_GITHUB_USER:$RELEASE_GITHUB_PASS@github.com/splunk/fluent-plugin-kubernetes-metrics.git master
fi
36 changes: 32 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,34 @@ jobs:
name: Upload gem to Github
command: |
.circleci/build_and_push_to_github_release.sh
- run:
name: Upload gem to Ruby Gem
command: |
.circleci/push_gems_to_rubygems.sh

check_version:
docker:
- image: circleci/ruby:2.6.1-node-browsers
working_directory: ~/repo
steps:
- attach_workspace:
at: /tmp
- checkout
- setup_remote_docker:
reusable: true
- run:
name: Check VERSION file for change
command: |
.circleci/check_version_trigger_release.sh

workflows:
version: 2
build_test_push:
jobs:
- build
- build:
filters:
branches:
ignore: /^release\/.*/
- test:
requires:
- build
Expand All @@ -97,9 +119,15 @@ workflows:
filters:
branches:
only: develop
- release:
- check_version:
requires:
- test
- push
release:
jobs:
- build:
filters:
branches:
only: master
only: master
- release:
requires:
- build
1 change: 1 addition & 0 deletions .circleci/push_gem.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -e
sudo apt-get update
sudo apt-get install -y python-pip libpython-dev > /dev/null 2>&1
echo "Installing aws cli..."
sudo pip install awscli > /dev/null 2>&1
Expand Down
7 changes: 7 additions & 0 deletions .circleci/push_gems_to_rubygems.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e
echo "Pushing metrics gem to rubygems.org..."
echo "gem `gem --version`"
cat .circleci/gem_credentials | sed -e "s/__RUBYGEMS_API_KEY__/${RUBYGEMS_API_KEY}/" > ~/.gem/credentials
chmod 0600 ~/.gem/credentials
gem push /tmp/pkg/fluent-plugin-kubernetes-metrics-*.gem
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.1
1.1.2
1 change: 1 addition & 0 deletions docker/FLUENTD_HEC_GEM_VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.1.2
3 changes: 3 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Docker Image for Splunk Connect for Kubernetes
Fluentd with input plugin for k8s metrics
# To Build
`docker build --build-arg VERSION=$(cat docker/FLUENTD_HEC_GEM_VERSION) --no-cache -t splunk/fluent-plugin-kubernetes-metrics:ci ./docker`
Loading