Skip to content

Commit b5f9dba

Browse files
committed
Update ci_build_test.yaml
1 parent 6af9310 commit b5f9dba

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

.github/workflows/ci_build_test.yaml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,23 @@ jobs:
1717
uses: ruby/setup-ruby@v1
1818
with:
1919
bundler-cache: true
20+
ruby-version: 2.6
2021

2122
- name: Install dependencies
2223
run: |
23-
ci_scripts/install_dep.sh
24+
sudo ci_scripts/install_dep.sh
2425
2526
- name: Builder
2627
run: |
2728
rake build -t -v
2829
cp -R pkg /tmp
2930
31+
- name: Cache pkg
32+
uses: actions/cache@v1
33+
with:
34+
path: /tmp
35+
key: ${{ runner.os }}-build
36+
3037
unit-test:
3138
runs-on: ubuntu-latest
3239
needs:
@@ -37,12 +44,14 @@ jobs:
3744

3845
- name: Install dependencies
3946
run: |
40-
ci_scripts/install_dep.sh
47+
sudo ci_scripts/install_dep.sh
4148
42-
- name: Run unit tests
43-
uses: actions/cache@v2
49+
- uses: actions/cache@v2
4450
with:
4551
path: /tmp
52+
key: ${{ runner.os }}-build
53+
54+
- name: Run unit tests
4655
run: |
4756
bundle exec rake test -t -v
4857
@@ -68,7 +77,9 @@ jobs:
6877

6978
- name: Build kube-objects image
7079
run: |
71-
source docker/build.sh $GITHUB_RUN_ID
80+
sed -i 's/VERSION=$VERSION -t splunk\/kube-objects:$TAG .\/docker/VERSION=$VERSION -t kube-objects:$TAG .\/docker/' docker/build.sh
81+
sudo docker/build.sh $GITHUB_RUN_ID
82+
docker image ls
7283
7384
- name: Setup Minikube
7485
run: |
@@ -126,10 +137,8 @@ jobs:
126137
ci_scripts/deploy_connector.sh
127138
128139
- name: Deploy log generator
129-
uses: actions/cache@v1
130-
with:
131-
path: /opt/splunk-connect-for-kubernetes
132140
run: |
141+
cd /opt/splunk-connect-for-kubernetes
133142
kubectl apply -f test/test_setup.yaml
134143
sleep 60
135144
@@ -138,10 +147,10 @@ jobs:
138147
python-version: 3.7
139148

140149
- name: Run functional tests
141-
uses: actions/cache@v1
142-
with:
143-
path: /opt/splunk-connect-for-kubernetes
144150
run: |
151+
echo "check the pods"
152+
kubectl get pods -A
153+
cd /opt/splunk-connect-for-kubernetes
145154
kubectl get nodes
146155
export PYTHONWARNINGS="ignore:Unverified HTTPS request"
147156
export CI_SPLUNK_HOST=$(kubectl get pod splunk --template={{.status.podIP}})
@@ -154,7 +163,3 @@ jobs:
154163
--splunk-user admin \
155164
--splunk-password $CI_SPLUNK_PASSWORD \
156165
-p no:warnings -s
157-
158-
159-
160-

ci_scripts/deploy_connector.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ cd /opt
1414
git clone https://github.com/splunk/splunk-connect-for-kubernetes.git
1515
cd splunk-connect-for-kubernetes
1616

17+
sed -i 's/name: splunk\/kube-objects/repository: kube-objects/' ci_scripts/sck_values.yml
18+
cat ci_scripts/sck_values.yml
19+
1720
echo "Deploying k8s-connect with latest changes"
1821
helm install ci-sck --set global.splunk.hec.token=$CI_SPLUNK_HEC_TOKEN \
1922
--set global.splunk.hec.host=$CI_SPLUNK_HOST \
2023
--set kubelet.serviceMonitor.https=true \
21-
--set splunk-kubernetes-objects.image.tag=$GITHUB_RUN_ID \
2224
--set splunk-kubernetes-objects.image.pullPolicy=IfNotPresent \
2325
-f ci_scripts/sck_values.yml helm-chart/splunk-connect-for-kubernetes
2426
#wait for deployment to finish

0 commit comments

Comments
 (0)