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
31 changes: 31 additions & 0 deletions .github/workflows/build-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 📋 Build CLI

on:
pull_request:
types: [ synchronize, opened, reopened, ready_for_review ]

concurrency:
group: build-cli-${{ github.head_ref }}
cancel-in-progress: true

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: amd64
- os: ubuntu-24.04-arm
arch: arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and push
run: |
IMAGE=${{ env.REGISTRY }}/${{ github.repository }}:latest
docker build -t ${IMAGE}-${{matrix.arch}} -f tracing/cli/Dockerfile tracing
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
name: 📋 Build
name: 📋 Build Extension

on:
pull_request:
types: [ synchronize, opened, reopened, ready_for_review ]
push:
branches:
- 'patchy'

concurrency:
group: build-test-${{ github.head_ref }}
group: build-extension-${{ github.head_ref }}
cancel-in-progress: true

env:
Expand All @@ -31,4 +28,4 @@ jobs:
- name: Build and push
run: |
IMAGE=${{ env.REGISTRY }}/${{ github.repository }}:latest
docker build -t ${IMAGE}-${{matrix.arch}} --build-arg=PHP_VERSION=8.4 .
docker build -t ${IMAGE}-${{matrix.arch}} --build-arg=PHP_VERSION=8.4 extension
31 changes: 31 additions & 0 deletions .github/workflows/build-sidecar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 📋 Build Sidecar

on:
pull_request:
types: [ synchronize, opened, reopened, ready_for_review ]

concurrency:
group: build-sidecar-${{ github.head_ref }}
cancel-in-progress: true

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: amd64
- os: ubuntu-24.04-arm
arch: arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and push
run: |
IMAGE=${{ env.REGISTRY }}/${{ github.repository }}:latest
docker build -t ${IMAGE}-${{matrix.arch}} -f tracing/sidecar/Dockerfile tracing
12 changes: 7 additions & 5 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ jobs:
- name: ⬇️ Git clone the repository
uses: actions/checkout@v4

# Uncomment for CPU / Memory / IO statistics.
# - name: Collect Workflow Telemetry
# uses: catchpoint/workflow-telemetry-action@v2

- name: 📁 Init
run: |
# Create performance testing results directory.
Expand All @@ -40,11 +36,17 @@ jobs:

- name: 📦 Build Images
run: |
echo "Building base images"
docker build -t localhost/compass:nginx-latest .github/workflows/performance/docker/compose/nginx
docker build -t localhost/compass:php-fpm-latest .github/workflows/performance/docker/compose/php-fpm
docker build --no-cache --build-arg=PHP_VERSION=8.4 -t localhost/compass:latest .

echo "Building extension"
docker build -t localhost/compass-extension:latest --build-arg=PHP_VERSION=8.4 extension
docker build -t localhost/compass:php-fpm-ext-latest .github/workflows/performance/docker/compose/php-fpm-ext

echo "Building sidecar"
docker build -t localhost/compass-sidecar:latest -f tracing/sidecar/Dockerfile tracing

- name: 📦 Setup
run: |
cd .github/workflows/performance/matrix/${{ matrix.configuration }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM localhost/compass:php-fpm-latest

COPY --from=localhost/compass:latest /etc/php/conf.d/00_compass.ini /etc/php/conf.d/00_compass.ini
COPY --from=localhost/compass:latest /usr/lib/php/modules/compass.so /usr/lib/php/modules/compass.so
COPY --from=localhost/compass-extension:latest /etc/php/conf.d/00_compass.ini /etc/php/conf.d/00_compass.ini
COPY --from=localhost/compass-extension:latest /usr/lib/php/modules/compass.so /usr/lib/php/modules/compass.so
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
retries: 60

compass:
image: localhost/compass:latest
image: localhost/compass-sidecar:latest
network_mode: service:nginx
privileged: true
pid: "service:php-fpm"
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: "📋 Release CLI"

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+[0-9A-Za-z]?'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
include:
- os: ubuntu-latest
arch: amd64
- os: ubuntu-24.04-arm
arch: arm64

permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: ⬇️ Git clone the repository
uses: actions/checkout@v4

- name: 🔐 Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: 📦 Build and Push
run: |
IMAGE=${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref_name }}-${{ matrix.arch }}
docker build --no-cache -t ${IMAGE} -f tracing/cli/Dockerfile tracing
docker push ${IMAGE}

manifest:
name: Manifest
runs-on: ubuntu-latest
needs: build

permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: 🔐 Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: ☁️ Push
run: |
IMAGE=${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref_name }}
docker manifest create ${IMAGE} --amend ${IMAGE}-arm64 --amend ${IMAGE}-amd64
docker manifest push ${IMAGE}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "📋 Release"
name: "📋 Release Extension"

on:
push:
Expand All @@ -7,7 +7,7 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: ${{ github.repository }}-extension

jobs:
build:
Expand Down Expand Up @@ -40,15 +40,16 @@ jobs:

- name: 📦 Build
run: |
IMAGE=${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref_name }}
IMAGE=${{ env.REGISTRY }}/${{ github.repository }}-extension:${{ github.ref_name }}
cd extension
docker build --no-cache --build-arg=PHP_VERSION=8.4 -t ${IMAGE}-php8.4-${{ matrix.arch }} .
docker build --no-cache --build-arg=PHP_VERSION=8.3 -t ${IMAGE}-php8.3-${{ matrix.arch }} .
docker build --no-cache --build-arg=PHP_VERSION=8.2 -t ${IMAGE}-php8.2-${{ matrix.arch }} .
docker build --no-cache --build-arg=PHP_VERSION=8.1 -t ${IMAGE}-php8.1-${{ matrix.arch }} .

- name: ☁️ Push
run: |
IMAGE=${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref_name }}
IMAGE=${{ env.REGISTRY }}/${{ github.repository }}-extension:${{ github.ref_name }}
docker push ${IMAGE}-php8.4-${{matrix.arch}}
docker push ${IMAGE}-php8.3-${{matrix.arch}}
docker push ${IMAGE}-php8.2-${{matrix.arch}}
Expand All @@ -75,7 +76,7 @@ jobs:

- name: ☁️ Push
run: |
IMAGE=${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref_name }}
IMAGE=${{ env.REGISTRY }}/${{ github.repository }}-extension:${{ github.ref_name }}
docker manifest create ${IMAGE}-php8.4 --amend ${IMAGE}-php8.4-arm64 --amend ${IMAGE}-php8.4-amd64
docker manifest push ${IMAGE}-php8.4
docker manifest create ${IMAGE}-php8.3 --amend ${IMAGE}-php8.3-arm64 --amend ${IMAGE}-php8.3-amd64
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/release-sidecar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: "📋 Release Sidecar"

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+[0-9A-Za-z]?'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
include:
- os: ubuntu-latest
arch: amd64
- os: ubuntu-24.04-arm
arch: arm64

permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: ⬇️ Git clone the repository
uses: actions/checkout@v4

- name: 🔐 Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: 📦 Build and Push
run: |
IMAGE=${{ env.REGISTRY }}/${{ github.repository }}-sidecar:${{ github.ref_name }}-${{ matrix.arch }}
docker build --no-cache -t ${IMAGE} -f tracing/sidecar/Dockerfile tracing
docker push ${IMAGE}

manifest:
name: Manifest
runs-on: ubuntu-latest
needs: build

permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: 🔐 Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: ☁️ Push
run: |
IMAGE=${{ env.REGISTRY }}/${{ github.repository }}-sidecar:${{ github.ref_name }}
docker manifest create ${IMAGE} --amend ${IMAGE}-arm64 --amend ${IMAGE}-amd64
docker manifest push ${IMAGE}
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
/.idea
/.vscode
/vendor_output
/_output
/vendor
.idea
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ flowchart LR
|-----------|---------|----------------------------|
| Control | 49ms | |
| Installed | 49ms | 0ms |
| Enabled | 50ms | 0ms |
| Enabled | 50ms | 1ms |
| Collector | 57ms | 7ms |

Performance data can be found in Github Actions for [this build](https://github.com/skpr/compass/pull/113).
Expand Down Expand Up @@ -124,9 +124,16 @@ These images contain:
* The collector (sidecar and CLI)

```
ghcr.io/skpr/compass:extension-8.4-latest
ghcr.io/skpr/compass:extension-8.3-latest
ghcr.io/skpr/compass:extension-8.2-latest
# PHP extension
ghcr.io/skpr/compass-extension:VERSION-php8.4
ghcr.io/skpr/compass-extension:VERSION-php8.3
ghcr.io/skpr/compass-extension:VERSION-php8.2

# Sidecar
ghcr.io/skpr/compass-sidecar:VERSION

# CLI
ghcr.io/skpr/compass:VERSION
```

## How to test
Expand Down
Loading