Skip to content

Commit

Permalink
Build Automation (#6)
Browse files Browse the repository at this point in the history
* More work on build actions, refining push.
* Remove docker buildx stuff for first iteration of this repo.
  • Loading branch information
Miles-Garnsey authored Jun 15, 2022
1 parent c8220ad commit 1f8ab78
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 24 deletions.
26 changes: 4 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ jobs:
distribution: temurin
java-version: 11
cache: 'gradle'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Setup and execute Gradle 'build' task
uses: gradle/gradle-build-action@v2
with:
Expand All @@ -51,16 +42,7 @@ jobs:
echo ::set-output name=sha_short::$(git rev-parse --short=8 ${{ github.sha }})
echo ::set-output name=tag_name::${GITHUB_REF#refs/tags/}
echo "TARGET_VERSION=$(echo ${GITHUB_REF#refs/tags/} | awk '{print substr($0,2)}')" >> $GITHUB_ENV
- name: Build and push testutils
id: docker_build_testutils
uses: docker/build-push-action@v2
with:
file: Dockerfile
build-args: |
VERSION=${{ env.TARGET_VERSION }}
context: .
push: ${{ !env.ACT }}
tags: k8ssandra/testutils:${{ steps.vars.outputs.tag_name}}
platforms: linux/amd64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Push testutils
shell: bash
run: |
docker push k8ssandra/testutils:${{ steps.vars.outputs.tag_name }}
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM hub.docker.com/k8ssandra/testutils:0.0.1
2 changes: 1 addition & 1 deletion pulsar-cdc-testutil/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ distributions {


docker {
name "hub.docker.com/k8ssandra/testutils:${version}"
name "k8ssandra/testutils:${gradle.version}"
copySpec.from("build/install").into(".")
// dockerfile file('Dockerfile')
// files tasks.distTar.outputs, "Dockerfile"
Expand Down
2 changes: 1 addition & 1 deletion pulsar-cdc-testutil/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
*/

rootProject.name = 'io.k8ssandra.pulsarcdctestutil'
var version = "v0.1.0"
gradle.ext.version = "v0.0.1"
include('app')

0 comments on commit 1f8ab78

Please sign in to comment.