Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit 21aef55

Browse files
Release/1.1.2 (#62)
Release/1.1.2
2 parents 1ce3532 + 3702ad3 commit 21aef55

14 files changed

+495
-166
lines changed

.circleci/build_and_push.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/usr/bin/env bash
22
set -e
3+
FLUENTD_HEC_GEM_VERSION=`cat docker/FLUENTD_HEC_GEM_VERSION`
34
aws ecr get-login --region $AWS_REGION --no-include-email | bash
45
echo "Building docker image..."
56
cp /tmp/pkg/fluent-plugin-kubernetes-metrics-*.gem docker
6-
docker build --build-arg VERSION=$FLUENT_SPLUNK_HEC_GEM_VERSION --no-cache -t splunk/fluent-plugin-kubernetes-metrics:metrics ./docker
7+
docker build --build-arg VERSION=$FLUENTD_HEC_GEM_VERSION --no-cache -t splunk/fluent-plugin-kubernetes-metrics:metrics ./docker
78
docker tag splunk/fluent-plugin-kubernetes-metrics:metrics $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/k8s-ci-metrics:latest
89
echo "Push docker image to ecr..."
910
docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/k8s-ci-metrics:latest | awk 'END{print}'

.circleci/build_and_push_to_dockerhub.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/usr/bin/env bash
22
set -e
3+
FLUENTD_HEC_GEM_VERSION=`cat docker/FLUENTD_HEC_GEM_VERSION`
34
echo "Building docker image..."
45
cp /tmp/pkg/fluent-plugin-kubernetes-metrics-*.gem docker
56
VERSION=`cat VERSION`
6-
docker build --build-arg VERSION=$FLUENT_SPLUNK_HEC_GEM_VERSION --no-cache -t splunk/fluent-plugin-kubernetes-metrics:ci ./docker
7+
docker build --build-arg VERSION=$FLUENTD_HEC_GEM_VERSION --no-cache -t splunk/fluent-plugin-kubernetes-metrics:ci ./docker
78
docker tag splunk/fluent-plugin-kubernetes-metrics:ci splunk/${DOCKERHUB_REPO_NAME}:${VERSION}
89
echo "Push docker image to splunk dockerhub..."
910
docker login --username=$DOCKERHUB_ACCOUNT_ID --password=$DOCKERHUB_ACCOUNT_PASS
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
#!/usr/bin/env bash
5+
LATEST_COMMIT=$(git rev-parse HEAD)
6+
VERSION_COMMIT=$(git log -1 --format=format:%H VERSION)
7+
if [ $VERSION_COMMIT = $LATEST_COMMIT ];
8+
then
9+
if [ -s VERSION ] # Check if content is empty
10+
then
11+
VERSION=`cat VERSION`
12+
echo "VERSION is changed to $VERSION"
13+
else
14+
echo "[ERROR] VERSION file is empty."
15+
exit 1
16+
fi
17+
git config user.email "[email protected]"
18+
git config user.name "splunk-oss-admin"
19+
git checkout develop
20+
git pull origin develop
21+
git checkout -b release/$VERSION origin/develop
22+
git push https://$RELEASE_GITHUB_USER:$RELEASE_GITHUB_PASS@github.com/splunk/fluent-plugin-kubernetes-metrics.git release/$VERSION
23+
git checkout master
24+
git merge --no-edit release/$VERSION
25+
git push https://$RELEASE_GITHUB_USER:$RELEASE_GITHUB_PASS@github.com/splunk/fluent-plugin-kubernetes-metrics.git master
26+
fi

.circleci/config.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,34 @@ jobs:
8282
name: Upload gem to Github
8383
command: |
8484
.circleci/build_and_push_to_github_release.sh
85+
- run:
86+
name: Upload gem to Ruby Gem
87+
command: |
88+
.circleci/push_gems_to_rubygems.sh
89+
90+
check_version:
91+
docker:
92+
- image: circleci/ruby:2.6.1-node-browsers
93+
working_directory: ~/repo
94+
steps:
95+
- attach_workspace:
96+
at: /tmp
97+
- checkout
98+
- setup_remote_docker:
99+
reusable: true
100+
- run:
101+
name: Check VERSION file for change
102+
command: |
103+
.circleci/check_version_trigger_release.sh
85104
86105
workflows:
87106
version: 2
88107
build_test_push:
89108
jobs:
90-
- build
109+
- build:
110+
filters:
111+
branches:
112+
ignore: /^release\/.*/
91113
- test:
92114
requires:
93115
- build
@@ -97,9 +119,15 @@ workflows:
97119
filters:
98120
branches:
99121
only: develop
100-
- release:
122+
- check_version:
101123
requires:
102-
- test
124+
- push
125+
release:
126+
jobs:
127+
- build:
103128
filters:
104129
branches:
105-
only: master
130+
only: master
131+
- release:
132+
requires:
133+
- build

.circleci/push_gem.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env bash
22
set -e
3+
sudo apt-get update
34
sudo apt-get install -y python-pip libpython-dev > /dev/null 2>&1
45
echo "Installing aws cli..."
56
sudo pip install awscli > /dev/null 2>&1

.circleci/push_gems_to_rubygems.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
echo "Pushing metrics gem to rubygems.org..."
4+
echo "gem `gem --version`"
5+
cat .circleci/gem_credentials | sed -e "s/__RUBYGEMS_API_KEY__/${RUBYGEMS_API_KEY}/" > ~/.gem/credentials
6+
chmod 0600 ~/.gem/credentials
7+
gem push /tmp/pkg/fluent-plugin-kubernetes-metrics-*.gem

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.1
1+
1.1.2

docker/FLUENTD_HEC_GEM_VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.1.2

docker/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
# Docker Image for Splunk Connect for Kubernetes
2+
Fluentd with input plugin for k8s metrics
3+
# To Build
4+
`docker build --build-arg VERSION=$(cat docker/FLUENTD_HEC_GEM_VERSION) --no-cache -t splunk/fluent-plugin-kubernetes-metrics:ci ./docker`

0 commit comments

Comments
 (0)