-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use custom docker images for services #92
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,70 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
bumpversion: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.tag_version.outputs.new_version }} | ||
previous_tag: ${{ steps.tag_version.outputs.previous_tag }} | ||
bump_commit_sha: ${{ steps.bumpversion.outputs.commit_hash }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get next version | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
default_bump: false | ||
default_prerelease_bump: false | ||
dry_run: true | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
- name: Create bumpversion | ||
if: steps.tag_version.outputs.new_version | ||
run: | | ||
pip install bump2version | ||
bump2version --new-version ${{ steps.tag_version.outputs.new_version }} setup.cfg | ||
- name: Update Changelog | ||
if: steps.tag_version.outputs.new_version | ||
uses: stefanzweifel/[email protected] | ||
with: | ||
latest-version: ${{ steps.tag_version.outputs.new_tag }} | ||
release-notes: ${{ steps.tag_version.outputs.changelog }} | ||
- name: Commit bumpversion | ||
id: bumpversion | ||
if: steps.tag_version.outputs.new_version | ||
uses: stefanzweifel/[email protected] | ||
with: | ||
branch: ${{ github.ref }} | ||
commit_message: "chore: preparing release ${{ steps.tag_version.outputs.new_version }}" | ||
file_pattern: CHANGELOG.md setup.cfg tutoraspects/* | ||
release: | ||
needs: bumpversion | ||
if: needs.bumpversion.outputs.version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
changelog: ${{ steps.tag_version.outputs.changelog }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Create tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
commit_sha: ${{ needs.bumpversion.outputs.bump_commit_sha }} | ||
default_bump: false | ||
default_prerelease_bump: false | ||
- name: Create a GitHub release | ||
if: steps.tag_version.outputs.new_tag | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
name: Release ${{ steps.tag_version.outputs.new_tag }} | ||
body: ${{ steps.tag_version.outputs.changelog }} |
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 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
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,4 @@ | ||
[bumpversion] | ||
current_version = 0.0.0 | ||
commit = False | ||
tag = False |
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
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
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 |
---|---|---|
|
@@ -4,8 +4,6 @@ python3 -m venv virtualenv | |
. virtualenv/bin/activate | ||
|
||
echo "Loading demo xAPI data..." | ||
pip install git+https://github.com/openedx/[email protected]#egg=xapi-db-load==0.2 | ||
pip install pandas # clickhouse_connect is missing this | ||
xapi-db-load --backend ralph_clickhouse \ | ||
--num_batches $1 \ | ||
--batch_size $2 \ | ||
|
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
1 change: 1 addition & 0 deletions
1
tutoraspects/templates/aspects/apps/scripts/aspects/requirements.txt
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 @@ | ||
{% for requirement in EXTRA_DBT_PACKAGES %}{{ requirement }}{% endfor %} |
5 changes: 1 addition & 4 deletions
5
tutoraspects/templates/aspects/apps/superset/docker/requirements-local.txt
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 |
---|---|---|
@@ -1,4 +1 @@ | ||
authlib # OAuth2 | ||
mysqlclient | ||
clickhouse-connect>0.5,<0.6 | ||
sentry-sdk[flask] | ||
{% for requirement in SUPERSET_EXTRA_REQUIREMENTS %}{{ requirement }}{% endfor %} |
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
18 changes: 18 additions & 0 deletions
18
tutoraspects/templates/aspects/build/aspects-superset/Dockerfile
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,18 @@ | ||
# Superset image with additional database drivers | ||
# https://hub.docker.com/r/apache/superset | ||
# https://github.com/apache/superset/releases | ||
# https://github.com/apache/superset/blob/master/Dockerfile | ||
# https://superset.apache.org/docs/databases/installing-database-drivers | ||
FROM apache/superset:2.0.1 | ||
|
||
USER root | ||
|
||
COPY ./requirements.txt /app/requirements.txt | ||
|
||
RUN \ | ||
{% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt \{% endif %} | ||
apt-get update && apt-get install -y zip | ||
|
||
RUN \ | ||
{% if is_buildkit_enabled() %}--mount=type=cache,target=/root/.cache/pip,sharing=shared \{% endif %} | ||
pip install -r /app/requirements.txt |
3 changes: 3 additions & 0 deletions
3
tutoraspects/templates/aspects/build/aspects-superset/requirements.txt
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,3 @@ | ||
authlib # OAuth2 | ||
clickhouse-connect>0.5,<0.6 | ||
sentry-sdk[flask] |
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,5 @@ | ||
FROM python:3.8 | ||
|
||
RUN pip install dbt-core==1.4.0 dbt-clickhouse==1.4.1 | ||
|
||
RUN pip install git+https://github.com/openedx/[email protected]#egg=xapi-db-load==0.2 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to review this it seems to be working now without pandas: openedx/xapi-db-load#32 we can upgrade this to 0.3 after this PR.