Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 29 additions & 31 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,44 @@
name: Build e2e tests

on:
workflow_run:
workflows:
- Trigger build
types:
- completed
push:
branches: [ develop, release/** ]
pull_request:
branches: [ develop, release/** ]
types: [ opened, synchronize, reopened, labeled ]
workflow_dispatch:

jobs:
build:
build-e2e-tests:
runs-on: k8s-runner-e2e

if: ${{ github.event.workflow_run.conclusion != 'skipped' }}
# We allow builds:
# 1) When triggered manually
# 2) When it's a merge into a branch
# 3) For PRs that are labeled as build and
# - It's a code change
# - A build label was just added
# A bit complex, but prevents builds when other labels are manipulated
if: >
github.event_name == 'workflow_dispatch'
|| github.event_name == 'push'
|| (contains(github.event.pull_request.labels.*.name, 'build')
&& (github.event.action != 'labeled' || github.event.label.name == 'build')
)
steps:
# Pinned 1.0.0 version
- uses: haya14busa/action-workflow_run-status@967ed83efa565c257675ed70cfe5231f062ddd94
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: plugin
ref: ${{ github.event.workflow_run.head_sha }}

- name: Checkout e2e test repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: cdapio/cdap-e2e-tests
path: e2e
ref: release/6.11

- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ github.workflow }}-${{ hashFiles('**/pom.xml') }}
Expand All @@ -51,7 +61,7 @@ jobs:
- name: Get Secrets from GCP Secret Manager
id: 'secrets'
uses: 'google-github-actions/get-secretmanager-secrets@v0'
uses: 'google-github-actions/get-secretmanager-secrets@v2'
with:
secrets: |-
SALESFORCE_USERNAME:cdapio-github-builds/SALESFORCE_USERNAME
Expand All @@ -69,33 +79,21 @@ jobs:
SALESFORCE_CONSUMER_KEY: ${{ steps.secrets.outputs.SALESFORCE_CONSUMER_KEY }}
SALESFORCE_CONSUMER_SECRET: ${{ steps.secrets.outputs.SALESFORCE_CONSUMER_SECRET }}

- name: Upload report
uses: actions/upload-artifact@v3
if: always()
with:
name: Cucumber report
path: ./plugin/target/cucumber-reports

- name: Upload debug files
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: Debug files
path: ./**/target/e2e-debug

- name: Upload reports to GCS
uses: google-github-actions/upload-cloud-storage@v0
uses: google-github-actions/upload-cloud-storage@v2
if: always()
with:
path: ./plugin/target/cucumber-reports
destination: e2e-tests-cucumber-reports/${{ github.event.repository.name }}/${{ github.ref }}

- name: github-status-action
uses: Sibz/github-status-action@67af1f4042a5a790681aad83c44008ca6cfab83d
- name: Cucumber Report URL
if: always()
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
state: success
context: Cucumber report
sha: ${{github.event.pull_request.head.sha || github.sha}}
run: echo "https://storage.googleapis.com/e2e-tests-cucumber-reports/${{ github.event.repository.name }}/${{ github.ref }}/cucumber-reports/advanced-reports/cucumber-html-reports/overview-features.html"

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@
<dependency>
<groupId>io.cdap.tests.e2e</groupId>
<artifactId>cdap-e2e-framework</artifactId>
<version>0.4.0-SNAPSHOT</version>
<version>0.4.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Loading