Skip to content

Commit

Permalink
Modify build pipeline to get some logs.. and some dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Apr 10, 2024
1 parent 28ae236 commit 17a93d3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 18 deletions.
54 changes: 37 additions & 17 deletions .github/workflows/buildAndDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,28 @@ jobs:
name: Build Cass Config Builder Docker Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: true
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: github.event_name != 'pull_request'
with:
submodules: true
- name: Login to GitHub Package Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u "${{ github.actor }}" --password-stdin
- name: Setup Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
- name: Login to DockerHub
if: ${{ !env.ACT }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
id: cache
Expand All @@ -32,19 +40,31 @@ jobs:
restore-keys: |
${{ runner.os }}-buildx-
java-version: 1.8
- name: Run tests
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'datastax/cass-config-builder'
env:
ORG_GRADLE_PROJECT_dockerRegistry: docker.pkg.github.com
ORG_GRADLE_PROJECT_dockerRegistryUsername: ${{ github.actor }}
ORG_GRADLE_PROJECT_dockerRegistryPassword: ${{ secrets.GITHUB_TOKEN }}
uses: eskatos/gradle-command-action@v1
with:
gradle-version: 6.0.1
arguments: test
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
run: ./gradlew test

# - name: Run tests
# if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'datastax/cass-config-builder'
# env:
# ORG_GRADLE_PROJECT_dockerRegistry: docker.pkg.github.com
# ORG_GRADLE_PROJECT_dockerRegistryUsername: ${{ github.actor }}
# ORG_GRADLE_PROJECT_dockerRegistryPassword: ${{ secrets.GITHUB_TOKEN }}
# uses: eskatos/gradle-command-action@v1
# with:
# gradle-version: 6.0.1
# arguments: test
- name: Build docker image
env:
GITHUB_REPO_OWNER: ${{ github.repository_owner }}
run: |
export GITHUB_REPO_URL="https://github.com/${{ github.repository }}"
./scripts/build-push-images.sh
- name: Archive build logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: gradle-logs
path: build/reports

3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ repositories {
name = 'clojars'
url = 'https://repo.clojars.org'
}
redhatEA {
maven {
name = 'redhatEA'
url = 'https://maven.repository.redhat.com/earlyaccess/all/'
}
Expand Down Expand Up @@ -98,6 +98,7 @@ dependencies {
implementation "slingshot:slingshot:0.12.2"
implementation 'org.yaml:snakeyaml:1.33.0.SP1-redhat-00001'
implementation "cheshire:cheshire:5.13.0"
implementation 'commons-codec:commons-codec:1.16.1'
implementation ("selmer:selmer:1.12.59") { // templating lib
exclude module: 'hiccups'
exclude module: 'cheshire'
Expand Down

0 comments on commit 17a93d3

Please sign in to comment.