Skip to content

Commit

Permalink
Add GitHub Tanzu Tile test action
Browse files Browse the repository at this point in the history
New action tests tile creation to make sure changes
to the BOSH releaes and Tanzu tile don't break making
the tile. Also, fix BOSH release test link to homebrew.
  • Loading branch information
crobert-1 committed Mar 15, 2023
1 parent 244690a commit dfbc5e2
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/bosh-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jobs:
- name: Check out the codebase.
uses: actions/checkout@v3
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@0c611abec1fc679030907286a2c084cc92fb8f2e
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install BOSH CLI
shell: bash
run: |
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/tanzu-tile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Tanzu Tile

# The workflow triggered by any change in deployments/cloudfoundry/bosh/
# or /deployments/cloudfoundry/tile

on:
pull_request:
paths:
- 'deployments/cloudfoundry/bosh/**'
- 'deployments/cloudfoundry/tile/**'

permissions:
contents: write

defaults:
run:
working-directory: 'deployments/cloudfoundry/tile'

jobs:

test:
name: Test Tanzu Tile creation
# Use 20.04.5 until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16450 is resolved
runs-on: ubuntu-20.04
steps:
- name: Check out the codebase.
uses: actions/checkout@v3
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install BOSH CLI
shell: bash
run: |
brew install cloudfoundry/tap/bosh-cli
bosh -v
- name: Install PCF CLI
shell: bash
run: |
pip install tile-generator
- name: Run release script
shell: bash
run: |
./make-latest-tile
FILE=""
# The tile will be in the product directory, named
# splunk-opentelemetry-collector-VERSION.pivotal
for f in $(find product -maxdepth 1 -regex "product\/splunk-opentelemetry-collector\-.*pivotal")
do
FILE=$f
done
# Confirm tile exists, is a regular file, and non-zero size.
if [ ! -f "$FILE" ] || [ ! -s "$FILE" ]; then
echo "$FILE does not exist."
exit 1
fi

0 comments on commit dfbc5e2

Please sign in to comment.