[DPE-2704] Integrate Kafka built from source #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build ROCK | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
workflow_call: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install tox | |
run: python3 -m pip install tox | |
- name: YAML Lint | |
run: tox -e lint | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
needs: | |
- lint | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup LXD | |
uses: canonical/setup-lxd@main | |
- name: Install dependencies | |
run: | | |
sudo snap install yq | |
sudo snap install rockcraft --classic --edge | |
- name: Build ROCK | |
run: | | |
app_version=$(yq '.version' rockcraft.yaml) | |
version=$(yq '(.version|split("-"))[0]' rockcraft.yaml) | |
base=$(yq '(.base|split(":"))[1]' rockcraft.yaml) | |
risk=edge | |
tag=${version}-${base}_${risk} | |
sed -i "s/${app_version}/${tag}/g" rockcraft.yaml | |
rockcraft pack --verbose | |
- name: Upload locally built ROCK artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: charmed-kafka | |
path: "charmed-kafka_*.rock" |