Skip to content

Commit

Permalink
Merge pull request #1473 from Logflare/staging
Browse files Browse the repository at this point in the history
Release v1.1.0
  • Loading branch information
chasers authored May 3, 2023
2 parents fc295e1 + c34c17e commit f4395c5
Show file tree
Hide file tree
Showing 97 changed files with 1,924 additions and 1,099 deletions.
20 changes: 0 additions & 20 deletions .editorconfig

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/arm-docker-latest-push.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/arm-docker-versioned-push.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/docker-ci-amd-and-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Docker CI

on:
workflow_dispatch:
push:
branches: [staging, master]

permissions:
contents: read

jobs:
publish:
name: Build and publish amd64 and arm64 image
runs-on: ubuntu-latest
env:
PUSH_TO_DOCKER: ${{github.ref == 'refs/heads/staging'}}
steps:
- uses: actions/checkout@v3
- id: version
name: Get version
run: |
echo "LOGFLARE_VERSION=$(cat VERSION)" >> $GITHUB_ENV
echo "LOGFLARE_VERSION=$(cat VERSION)" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# build for master
- name: Build and push latest, versioned
if: ${{github.ref == 'refs/heads/master'}}
uses: docker/build-push-action@v3
with:
push: true
tags: supabase/logflare:latest, supabase/${{ env.LOGFLARE_VERSION}}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/arm64,linux/amd64
# build for staging
- name: Build and push staging build
if: ${{github.ref == 'refs/heads/staging'}}
uses: docker/build-push-action@v3
with:
push: true
tags: supabase/logflare:staging
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/arm64,linux/amd64
20 changes: 10 additions & 10 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
platforms: linux/amd64
trigger_cloudbuild:
name: Trigger Cloud Build in Production
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/staging'
needs:
- publish
runs-on: ubuntu-latest
Expand All @@ -61,17 +61,17 @@ jobs:
- name: Set prod envs
if: github.ref == 'refs/heads/master'
run: |
echo "LF_BRANCH=master" >> $GITHUB_ENV
echo "LF_CLOUDBUILD_TRIGGER=logflare-master" >> $GITHUB_ENV
echo "LF_PROJECT_ID=logflare-232118" >> $GITHUB_ENV
echo "LF_GCP_SECRETS=${{ secrets.GCP_PROD_CREDENTIALS }}" >> $GITHUB_ENV
echo "LF_BRANCH=master" >> "$GITHUB_ENV"
echo "LF_CLOUDBUILD_TRIGGER=logflare-master" >> "$GITHUB_ENV"
echo "LF_PROJECT_ID=logflare-232118" >> "$GITHUB_ENV"
echo "LF_GCP_SECRETS=${{ secrets.GCP_PROD_CREDENTIALS }}" >> "$GITHUB_ENV"
- name: Set staging envs
if: github.ref == 'refs/heads/staging'
run: |
echo "LF_BRANCH=staging" >> $GITHUB_ENV
echo "LF_CLOUDBUILD_TRIGGER=logflare-app-staging-trigger" >> $GITHUB_ENV
echo "LF_PROJECT_ID=logflare-staging" >> $GITHUB_ENV
echo "LF_GCP_SECRETS=${{ secrets.GCP_STAGING_CREDENTIALS }}" >> $GITHUB_ENV
echo "LF_BRANCH=staging" >> "$GITHUB_ENV"
echo "LF_CLOUDBUILD_TRIGGER=logflare-app-staging-trigger" >> "$GITHUB_ENV"
echo "LF_PROJECT_ID=logflare-staging" >> "$GITHUB_ENV"
echo "LF_GCP_SECRETS=${{ secrets.GCP_STAGING_CREDENTIALS }}" >> "$GITHUB_ENV"
- uses: actions/setup-python@v4
with:
python-version: '3.10'
Expand All @@ -88,4 +88,4 @@ jobs:
version: '418.0.0'
project_id: ${{ env.LF_PROJECT_ID}}
- name: 'Trigger Cloud Build'
run: 'gcloud builds triggers run ${{ env.LF_CLOUDBUILD_TRIGGER }} --branch=${{ env.LF_BRANCH}} --format "value(name)"'
run: 'gcloud builds triggers run ${{ env.LF_CLOUDBUILD_TRIGGER }} --branch=${{ env.LF_BRANCH }} --format "value(name)"'
4 changes: 2 additions & 2 deletions .github/workflows/elixir-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: "1.12.3" # Define the elixir version [required]
otp-version: "24" # Define the OTP version [required]
elixir-version: "1.14.4" # Define the elixir version [required]
otp-version: "25" # Define the OTP version [required]
- name: Set up Rust
uses: ATiltedTree/setup-rust@v1
with:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/release-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
SHELL: /bin/bash
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Ensure version changed
run: git --no-pager diff --name-only master staging | grep VERSION
# - name: Ensure changelog is updated
# run: git --no-pager diff --name-only master staging | grep CHANGELOG
run: git --no-pager diff --name-only origin/master origin/staging -- | grep VERSION
# - name: Ensure changelog is updated
# run: git --no-pager diff --name-only master staging | grep CHANGELOG
3 changes: 1 addition & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
elixir 1.12.3-otp-24
erlang 24.3.4
elixir 1.14.4-otp-25
nodejs 18.13.0
rust 1.64.0
14 changes: 14 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ In order to test all changes locally, perform the following steps:
3. Update the test supabase project's config under `supabase/config.toml`
- logflare uses the `analytics` namespace.

## Release Management

Logflare's `VERSION` file is bumped on each release.

The `master` branch reflects what is on production on https://logflare.app

The `staging` branch reflects what is on the staging environment.

Version bumping policy is as follows:

- **Patch**: For any changes that do not affect external api. ui changes, refactoring, docs, etc. Is the default.
- **Minor**: Non-breaking external api changes, changes in config, major changes to core features.
- **Major**: External api breaking changes, major code changes.

## Development Code Style

### Logging
Expand Down
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM elixir:1.12.3-alpine as builder
FROM elixir:1.14.4-alpine as builder

ENV MIX_ENV prod

Expand All @@ -7,7 +7,6 @@ RUN apk update && \

COPY . /logflare


WORKDIR /logflare
# Due to some Rust caveats with SSL on Alpine images, we need to use GIT to fecth cargo registry index
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
Expand All @@ -21,8 +20,8 @@ WORKDIR /logflare
RUN mix phx.digest

# alpine version must match the base erlang image version used
# https://github.com/erlef/docker-elixir/blob/master/1.12/alpine/Dockerfile
# https://github.com/erlang/docker-erlang-otp/blob/master/24/alpine/Dockerfile
# https://github.com/erlef/docker-elixir/blob/master/1.14/alpine/Dockerfile
# https://github.com/erlang/docker-erlang-otp/blob/master/25/alpine/Dockerfile
FROM alpine:3.17.0 as app

# Required for the BeamVM to run
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Sign up at https://logflare.app.

| Provider/Runtime | Link |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Cloudflare | <a href="https://www.cloudflare.com/apps/logflare/install"><img src="https://install.cloudflareapps.com/install-button.png" alt="Install Logflare with Cloudflare" border="0" width="110"></a> |
| Cloudflare | <a href="https://www.cloudflareapps.com/apps/logflare"><img src="https://install.cloudflareapps.com/install-button.png" alt="Install Logflare with Cloudflare" border="0" width="110"></a> |
| Vercel | [Logflare Vercel integration](https://vercel.com/integrations/logflare) |
| Fly | [Logflare/fly-log-shipper](https://github.com/Logflare/fly-log-shipper) |
| Github Action | [Logflare/action](https://github.com/Logflare/action) |
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.2
1.1.0
Loading

0 comments on commit f4395c5

Please sign in to comment.