This is an automated email from the ASF dual-hosted git repository.
kichan pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/trafficserver-ingress-controller.git
The following commit(s) were added to refs/heads/master by this push:
new ba31f09 Adds github action workflows for testing and building
new 009877f Merge pull request #11 from rishabhc/cicd-githubactions
ba31f09 is described below
commit ba31f0960a8807f2a56f8c20a5a15fad78d6e28e
Author: Rishabh Chhabra <[email protected]>
AuthorDate: Fri Jul 17 19:34:12 2020 -0500
Adds github action workflows for testing and building
---
.github/workflows/build.yml | 18 +++++++++++++++++
.github/workflows/test.yml | 48 +++++++++++++++++++++++++++++++++++++++++++++
build-master.sh | 12 ++++++++++++
3 files changed, 78 insertions(+)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..44fdebb
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,18 @@
+name: Build
+
+on:
+ push:
+ branches:
+ - 'master'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ - name: Build and push
+ run: ./build-master.sh
+ # env:
+ # QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
+ # QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
\ No newline at end of file
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..e361553
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,48 @@
+name: Test
+
+on: [push, pull_request]
+
+jobs:
+
+ build:
+ name: Test Redis and Lua
+ runs-on: ubuntu-latest
+ steps:
+
+ - name: Set up Go 1.x
+ uses: actions/setup-go@v2
+ with:
+ go-version: ^1.13
+ id: go
+
+ - name: Check out code into the Go module directory
+ uses: actions/checkout@v2
+
+ - uses: leafo/gh-actions-lua@v6
+ with:
+ luaVersion: "5.1.5"
+
+ - uses: leafo/gh-actions-luarocks@v2
+
+ - name: Install Busted
+ run: |
+ luarocks install busted
+
+ - name: Get dependencies
+ run: |
+ go get -v -t -d ./...
+ if [ -f Gopkg.toml ]; then
+ curl
https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
+ dep ensure
+ fi
+
+ - name: Test Watcher
+ run: go test -v ./watcher/
+
+ - name: Test Redis
+ run: go test -v ./redis/
+
+ - name: Test RedisPluginATS
+ run: |
+ cd pluginats
+ ../.luarocks/bin/busted connect_redis_test.lua
\ No newline at end of file
diff --git a/build-master.sh b/build-master.sh
new file mode 100644
index 0000000..ad5d5ef
--- /dev/null
+++ b/build-master.sh
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+# build
+REPONAME="ats-ingress"
+TAG="latest"
+#TARGET="quay.io"/${QUAY_USERNAME}/${REPONAME}:${TAG}
+TARGET="ats-ingress:latest"
+#echo ${TARGET}
+
+#echo "${QUAY_PASSWORD}" | docker login -u "${QUAY_USERNAME}" quay.io
--password-stdin
+docker build -t ${TARGET} .
+#docker push ${TARGET}
\ No newline at end of file