Skip to content

Commit

Permalink
work on action
Browse files Browse the repository at this point in the history
  • Loading branch information
edigonzales committed Feb 21, 2024
1 parent 9f547d3 commit 2dfb0f6
Showing 1 changed file with 63 additions and 63 deletions.
126 changes: 63 additions & 63 deletions .github/workflows/gretl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,29 @@ jobs:
run: ./gradlew clean gretl:classes

- name: Unit Tests and publish plugin to local maven repo
run: |
TZ="Europe/Zurich" ./gradlew gretl:test gretl:dbTest
./gradlew clean gretl:s3Test -Ds3AccessKey=$S3_ACCESS_KEY -Ds3SecretKey=$S3_SECRET_KEY -Ds3BucketName=ch.so.agi.gretl.test
./gradlew gretl:build gretl:publishPluginMavenPublicationToMavenLocal -x test
# run: |
# TZ="Europe/Zurich" ./gradlew gretl:test gretl:dbTest
# ./gradlew clean gretl:s3Test -Ds3AccessKey=$S3_ACCESS_KEY -Ds3SecretKey=$S3_SECRET_KEY -Ds3BucketName=ch.so.agi.gretl.test
# ./gradlew gretl:build gretl:publishPluginMavenPublicationToMavenLocal -x test
env:
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}

- name: Integration Test (Jar)
run: |
TZ="Europe/Zurich" ./gradlew gretl:jarTest
./gradlew gretl:jarS3Test -Ds3AccessKey=$S3_ACCESS_KEY -Ds3SecretKey=$S3_SECRET_KEY -Ds3BucketName=ch.so.agi.gretl.test
./gradlew gretl:build gretl:publishPluginMavenPublicationToMavenLocal -x test
env:
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}

- uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: reports-jar
path: gretl/build/reports/tests/
# - name: Integration Test (Jar)
# run: |
# TZ="Europe/Zurich" ./gradlew gretl:jarTest
# ./gradlew gretl:jarS3Test -Ds3AccessKey=$S3_ACCESS_KEY -Ds3SecretKey=$S3_SECRET_KEY -Ds3BucketName=ch.so.agi.gretl.test
# env:
# S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
# S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}

# - uses: actions/upload-artifact@v2
# if: ${{ failure() }}
# with:
# name: reports-jar
# path: gretl/build/reports/tests/

- name: Stage jar files
run: |
Expand Down Expand Up @@ -97,52 +97,52 @@ jobs:
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') && !env.ACT }}

- name: Single-platform build
uses: docker/build-push-action@a66e35b9cbcf4ad0ea91ffcaf7bbad63ad9e0229 # v2.7.0 (2021-10-22)
with:
platforms: linux/amd64
context: ./runtimeImage/gretl
file: ./runtimeImage/gretl/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
load: true
pull: true

- name: List images
run: |
docker images
if: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/V2_2_x') && (github.event_name != 'pull_request') && !env.ACT }}

# - name: Single-platform build
# uses: docker/build-push-action@a66e35b9cbcf4ad0ea91ffcaf7bbad63ad9e0229 # v2.7.0 (2021-10-22)
# with:
# platforms: linux/amd64
# context: ./runtimeImage/gretl
# file: ./runtimeImage/gretl/Dockerfile
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# load: true
# pull: true

# - name: List images
# run: |
# docker images

- name: Integration Test (Docker Image)
run: |
TZ="Europe/Zurich" ./gradlew gretl:imageTest
./gradlew gretl:imageS3Test -Ds3AccessKey=$S3_ACCESS_KEY -Ds3SecretKey=$S3_SECRET_KEY -Ds3BucketName=ch.so.agi.gretl.test
env:
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
# - name: Integration Test (Docker Image)
# run: |
# TZ="Europe/Zurich" ./gradlew gretl:imageTest
# ./gradlew gretl:imageS3Test -Ds3AccessKey=$S3_ACCESS_KEY -Ds3SecretKey=$S3_SECRET_KEY -Ds3BucketName=ch.so.agi.gretl.test
# env:
# S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
# S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}

- uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: reports-docker
path: |
gretl/build/reports/tests/
- name: Publish plugin
run: ./gradlew gretl:publishPlugins -s
if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') && !env.ACT }}
env:
gradlePublishKey: ${{ secrets.GRADLEPUBLISHKEY }}
gradlePublishSecret: ${{ secrets.GRADLEPUBLISHSECRET }}

- name: Multi-platform build
uses: docker/build-push-action@a66e35b9cbcf4ad0ea91ffcaf7bbad63ad9e0229 # v2.7.0 (2021-10-22)
with:
platforms: linux/amd64,linux/arm64
context: ./runtimeImage/gretl
file: ./runtimeImage/gretl/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
pull: true
push: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') && !env.ACT }}
# - uses: actions/upload-artifact@v2
# if: ${{ failure() }}
# with:
# name: reports-docker
# path: |
# gretl/build/reports/tests/

# - name: Publish plugin
# run: ./gradlew gretl:publishPlugins -s
# if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') && !env.ACT }}
# env:
# gradlePublishKey: ${{ secrets.GRADLEPUBLISHKEY }}
# gradlePublishSecret: ${{ secrets.GRADLEPUBLISHSECRET }}

# - name: Multi-platform build
# uses: docker/build-push-action@a66e35b9cbcf4ad0ea91ffcaf7bbad63ad9e0229 # v2.7.0 (2021-10-22)
# with:
# platforms: linux/amd64,linux/arm64
# context: ./runtimeImage/gretl
# file: ./runtimeImage/gretl/Dockerfile
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# pull: true
# push: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/V2_2_x') && (github.event_name != 'pull_request') && !env.ACT }}

0 comments on commit 2dfb0f6

Please sign in to comment.