-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
321 additions
and
345 deletions.
There are no files selected for viewing
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
services: | ||
redash: | ||
build: ../ | ||
command: manage version | ||
depends_on: | ||
- postgres | ||
- redis | ||
ports: | ||
- "5000:5000" | ||
environment: | ||
PYTHONUNBUFFERED: 0 | ||
REDASH_LOG_LEVEL: "INFO" | ||
REDASH_REDIS_URL: "redis://redis:6379/0" | ||
POSTGRES_PASSWORD: "FmTKs5vX52ufKR1rd8tn4MoSP7zvCJwb" | ||
REDASH_DATABASE_URL: "postgresql://postgres:FmTKs5vX52ufKR1rd8tn4MoSP7zvCJwb@postgres/postgres" | ||
REDASH_COOKIE_SECRET: "2H9gNG9obnAQ9qnR9BDTQUph6CbXKCzF" | ||
redis: | ||
image: redis:7-alpine | ||
restart: unless-stopped | ||
postgres: | ||
image: pgautoupgrade/pgautoupgrade:latest | ||
command: "postgres -c fsync=off -c full_page_writes=off -c synchronous_commit=OFF" | ||
restart: unless-stopped | ||
environment: | ||
POSTGRES_HOST_AUTH_METHOD: "trust" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
x-redash-service: &redash-service | ||
build: | ||
context: ../ | ||
args: | ||
install_groups: "main" | ||
code_coverage: ${CODE_COVERAGE} | ||
x-redash-environment: &redash-environment | ||
REDASH_LOG_LEVEL: "INFO" | ||
REDASH_REDIS_URL: "redis://redis:6379/0" | ||
POSTGRES_PASSWORD: "FmTKs5vX52ufKR1rd8tn4MoSP7zvCJwb" | ||
REDASH_DATABASE_URL: "postgresql://postgres:FmTKs5vX52ufKR1rd8tn4MoSP7zvCJwb@postgres/postgres" | ||
REDASH_RATELIMIT_ENABLED: "false" | ||
REDASH_ENFORCE_CSRF: "true" | ||
REDASH_COOKIE_SECRET: "2H9gNG9obnAQ9qnR9BDTQUph6CbXKCzF" | ||
services: | ||
server: | ||
<<: *redash-service | ||
command: server | ||
depends_on: | ||
- postgres | ||
- redis | ||
ports: | ||
- "5000:5000" | ||
environment: | ||
<<: *redash-environment | ||
PYTHONUNBUFFERED: 0 | ||
scheduler: | ||
<<: *redash-service | ||
command: scheduler | ||
depends_on: | ||
- server | ||
environment: | ||
<<: *redash-environment | ||
worker: | ||
<<: *redash-service | ||
command: worker | ||
depends_on: | ||
- server | ||
environment: | ||
<<: *redash-environment | ||
PYTHONUNBUFFERED: 0 | ||
cypress: | ||
ipc: host | ||
build: | ||
context: ../ | ||
dockerfile: .ci/Dockerfile.cypress | ||
depends_on: | ||
- server | ||
- worker | ||
- scheduler | ||
environment: | ||
CYPRESS_baseUrl: "http://server:5000" | ||
CYPRESS_coverage: ${CODE_COVERAGE} | ||
PERCY_TOKEN: ${PERCY_TOKEN} | ||
PERCY_BRANCH: ${CIRCLE_BRANCH} | ||
PERCY_COMMIT: ${CIRCLE_SHA1} | ||
PERCY_PULL_REQUEST: ${CIRCLE_PR_NUMBER} | ||
COMMIT_INFO_BRANCH: ${CIRCLE_BRANCH} | ||
COMMIT_INFO_MESSAGE: ${COMMIT_INFO_MESSAGE} | ||
COMMIT_INFO_AUTHOR: ${CIRCLE_USERNAME} | ||
COMMIT_INFO_SHA: ${CIRCLE_SHA1} | ||
COMMIT_INFO_REMOTE: ${CIRCLE_REPOSITORY_URL} | ||
CYPRESS_PROJECT_ID: ${CYPRESS_PROJECT_ID} | ||
CYPRESS_RECORD_KEY: ${CYPRESS_RECORD_KEY} | ||
redis: | ||
image: redis:7-alpine | ||
restart: unless-stopped | ||
postgres: | ||
image: pgautoupgrade/pgautoupgrade:latest | ||
command: "postgres -c fsync=off -c full_page_writes=off -c synchronous_commit=OFF" | ||
restart: unless-stopped | ||
environment: | ||
POSTGRES_HOST_AUTH_METHOD: "trust" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
# This script only needs to run on the main Redash repo | ||
|
||
if [ "${GITHUB_REPOSITORY}" != "getredash/redash" ]; then | ||
echo "Skipping image build for Docker Hub, as this isn't the main Redash repository" | ||
exit 0 | ||
fi | ||
|
||
if [ "${GITHUB_REF_NAME}" != "master" ] && [ "${GITHUB_REF_NAME}" != "preview-image" ]; then | ||
echo "Skipping image build for Docker Hub, as this isn't the 'master' nor 'preview-image' branch" | ||
exit 0 | ||
fi | ||
|
||
if [ "x${DOCKER_USER}" = "x" ] || [ "x${DOCKER_PASS}" = "x" ]; then | ||
echo "Skipping image build for Docker Hub, as the login details aren't available" | ||
exit 0 | ||
fi | ||
|
||
set -e | ||
VERSION=$(jq -r .version package.json) | ||
VERSION_TAG="$VERSION.b${GITHUB_RUN_ID}.${GITHUB_RUN_NUMBER}" | ||
|
||
export DOCKER_BUILDKIT=1 | ||
export COMPOSE_DOCKER_CLI_BUILD=1 | ||
|
||
docker login -u "${DOCKER_USER}" -p "${DOCKER_PASS}" | ||
|
||
DOCKERHUB_REPO="redash/redash" | ||
DOCKER_TAGS="-t redash/redash:preview -t redash/preview:${VERSION_TAG}" | ||
|
||
# Build the docker container | ||
docker build --build-arg install_groups="main,all_ds,dev" ${DOCKER_TAGS} . | ||
|
||
# Push the container to the preview build locations | ||
docker push "${DOCKERHUB_REPO}:preview" | ||
docker push "redash/preview:${VERSION_TAG}" | ||
|
||
echo "Built: ${VERSION_TAG}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
NAME=redash | ||
VERSION=$(jq -r .version package.json) | ||
FULL_VERSION=$VERSION+b$CIRCLE_BUILD_NUM | ||
FILENAME=$NAME.$FULL_VERSION.tar.gz | ||
|
||
mkdir -p /tmp/artifacts/ | ||
|
||
tar -zcv -f /tmp/artifacts/$FILENAME --exclude=".git" --exclude="optipng*" --exclude="cypress" --exclude="*.pyc" --exclude="*.pyo" --exclude="venv" * |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
VERSION=$(jq -r .version package.json) | ||
FULL_VERSION=${VERSION}+b${GITHUB_RUN_ID}.${GITHUB_RUN_NUMBER} | ||
|
||
sed -ri "s/^__version__ = '([A-Za-z0-9.-]*)'/__version__ = '${FULL_VERSION}'/" redash/__init__.py | ||
sed -i "s/dev/${GITHUB_SHA}/" client/app/version.json |
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
Oops, something went wrong.