Skip to content

Commit

Permalink
#56 Sign connectors during CI build (#57)
Browse files Browse the repository at this point in the history
* #56 Sign connectors during CI build

* Add project keeper

* Add workflow for uploading release artifacts
  • Loading branch information
kaklakariada authored Aug 23, 2022
1 parent fda3676 commit 3750bd1
Show file tree
Hide file tree
Showing 25 changed files with 1,878 additions and 193 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/broken_links_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Broken Links Checker

on:
schedule:
- cron: "0 2 * * 0"
- cron: "0 5 * * 0"
push:
branches:
- main
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 1

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Cache npm files
uses: actions/cache@v3
Expand All @@ -32,11 +32,27 @@ jobs:
- name: Build connectors
run: ./tools/package_connector.sh

- name: Upload connectors
- name: Upload unsigned connectors
uses: actions/upload-artifact@v2
with:
name: Exasol Tableau Connectors
path: target/*.taco
name: Unsigned Exasol Tableau Connectors
path: target/exasol_*.taco

- name: Retrieve code signing certificate
run: echo $CODE_SIGNING_CERTIFICATE_BASE64 | base64 --decode > target/cert.pfx
env:
CODE_SIGNING_CERTIFICATE_BASE64: ${{ secrets.CODE_SIGNING_CERTIFICATE_BASE64 }}

- name: Sign connectors
run: ./tools/sign_connector.sh target/cert.pfx
env:
CODE_SIGNING_CERTIFICATE_PASSWORD: ${{ secrets.CODE_SIGNING_CERTIFICATE_PASSWORD }}

- name: Upload signed connectors
uses: actions/upload-artifact@v2
with:
name: Signed Exasol Tableau Connectors
path: target/tableau-exasol-connector-*.taco

- name: Set up JDK 11
uses: actions/setup-java@v3
Expand All @@ -46,4 +62,4 @@ jobs:
cache: 'maven'

- name: Run unit tests
run: mvn --batch-mode test -DtrimStackTrace=false
run: mvn --batch-mode -DtrimStackTrace=false --projects . test com.exasol:project-keeper-maven-plugin:verify
47 changes: 47 additions & 0 deletions .github/workflows/release_droid_upload_github_release_assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release Droid - Upload GitHub Release Assets

on:
workflow_dispatch:
inputs:
upload_url:
description: 'Assets upload URL'
required: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Build connectors
run: ./tools/package_connector.sh

- name: Retrieve code signing certificate
run: echo $CODE_SIGNING_CERTIFICATE_BASE64 | base64 --decode > target/cert.pfx
env:
CODE_SIGNING_CERTIFICATE_BASE64: ${{ secrets.CODE_SIGNING_CERTIFICATE_BASE64 }}

- name: Sign connectors
run: ./tools/sign_connector.sh target/cert.pfx
env:
CODE_SIGNING_CERTIFICATE_PASSWORD: ${{ secrets.CODE_SIGNING_CERTIFICATE_PASSWORD }}

- name: Generate sha256sum files
run: |
cd target
find . -maxdepth 1 -name "tableau-exasol-connector-*.taco" -exec bash -c 'sha256sum {} > {}.sha256' \;
- name: Upload signed connectors
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: target/tableau-exasol-connector-*.taco

- name: Upload sha256sum files
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: target/*.sha256
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,20 @@
/jdbc-kerberos-setup-test/logs
/javascript-test/node_modules/
/javascript-test/coverage/

.DS_Store
*.swp
local
.dbeaver*
**/*.log
.directory
venv/
target
.cache
dependency-reduced-pom.xml
.classpath
pom.xml.versionsBackup
*.orig
*.old
*.md.html
*.flattened-pom.xml
29 changes: 29 additions & 0 deletions .project-keeper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
sources:
- type: maven
path: jdbc-kerberos-setup-test/pom.xml
parentPom:
groupId: "com.exasol"
artifactId: "tableau-connector"
version: "${revision}"
relativePath: "../pom.xml"
advertise: false
- type: maven
path: tableau-server-GUI-tests/pom.xml
parentPom:
groupId: "com.exasol"
artifactId: "tableau-connector"
version: "${revision}"
relativePath: "../pom.xml"
- type: maven
path: pom.xml
version:
fromSource: pom.xml
excludes:
- regex: "(?s)E-PK-CORE-62: The project's README\\.md does not contain a valid badges block\\. Please add or replace the following badges.*"
- regex: "(?s)E-PK-CORE-53: The dependencies.md file has outdated content.*"
- "E-PK-CORE-18: Outdated content: '.github/workflows/ci-build.yml'"
- "E-PK-CORE-17: Missing required file: '.github/workflows/ci-build-next-java.yml'"
- "E-PK-CORE-17: Missing required file: '.github/workflows/dependencies_check.yml'"
- "E-PK-CORE-17: Missing required file: '.github/workflows/release_droid_prepare_original_checksum.yml'"
- "E-PK-CORE-17: Missing required file: '.github/workflows/release_droid_print_quick_checksum.yml'"
- "E-PK-CORE-18: Outdated content: '.github/workflows/release_droid_upload_github_release_assets.yml'"
Loading

0 comments on commit 3750bd1

Please sign in to comment.