Skip to content

Commit

Permalink
Merge branch 'hog-plus-plus' into hogql-autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra committed Jun 20, 2024
2 parents 39b494e + 6e68a4d commit 6e7b267
Show file tree
Hide file tree
Showing 280 changed files with 13,810 additions and 8,150 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/build-and-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,9 @@ on:
- master
paths-ignore:
- 'rust/**'
- 'livestream/**'

jobs:
slack:
name: Notify Slack of start of deploy
runs-on: ubuntu-20.04
if: github.repository == 'posthog/posthog'
steps:
- name: Notify Platform team on slack
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: platform-bots
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_ICON: https://github.com/posthog.png?size=48
SLACK_MESSAGE: 'Production Cloud Deploy Beginning :rocket: - ${{ github.event.head_commit.message }}'
SLACK_TITLE: Message
SLACK_USERNAME: Max Hedgehog
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

sentry:
name: Notify Sentry of a production release
runs-on: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
push:
branches:
- master
pull_request:
workflow_dispatch:
inputs:
clickhouseServerVersion:
description: ClickHouse server version. Leave blank for default
type: string
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci-hog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ on:
push:
branches:
- master
paths-ignore:
- rust/**
- livestream/**
pull_request:
paths-ignore:
- rust/**
- livestream/**

jobs:
# Job to decide if we should run backend ci
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
build-mode: none
- language: python
build-mode: none
- language: go
build-mode: autobuild
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/container-images-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- master
paths-ignore:
- 'rust/**'
- 'livestream/**'
workflow_dispatch:

jobs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/container-images-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Container Images CI

on:
pull_request:
paths-ignore:
- 'rust/**'
- 'livestream/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/livestream-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Livestream Docker CI/CD

on:
push:
branches:
- master
paths:
- 'livestream/**'
- '.github/workflows/livestream-docker-image.yml'

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

outputs:
sha: ${{ steps.push.outputs.digest }}

steps:
- name: Check out livestream code
uses: actions/checkout@v4
with:
sparse-checkout: 'livestream/'
sparse-checkout-cone-mode: false

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: false

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/posthog/posthog/livestream

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Build and push Docker image
id: push
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: livestream/
file: livestream/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: get deployer token
id: deployer
uses: getsentry/action-github-app-token@v3
with:
app_id: ${{ secrets.DEPLOYER_APP_ID }}
private_key: ${{ secrets.DEPLOYER_APP_PRIVATE_KEY }}

- name: Trigger livestream deployment
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ steps.deployer.outputs.token }}
repository: PostHog/charts
event-type: commit_state_update
client-payload: |
{
"values": {
"image": {
"sha": "${{ needs.build.outputs.sha }}"
}
},
"release": "livestream",
"commit": ${{ toJson(github.event.head_commit) }},
"repository": ${{ toJson(github.repository) }}
}
Loading

0 comments on commit 6e7b267

Please sign in to comment.