diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 000000000..4181b9a99 --- /dev/null +++ b/.github/workflows/release.yaml @@ -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/github-tag-action@v6.0 + 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/changelog-updater-action@v1.6.2 + 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/git-auto-commit-action@v4.14.1 + 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/github-tag-action@v6.0 + 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 }} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..1d013ff92 --- /dev/null +++ b/CHANGELOG.md @@ -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). diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000000000..92df64be1 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,4 @@ +[bumpversion] +current_version = 0.0.0 +commit = False +tag = False diff --git a/tutoraspects/patches/local-docker-compose-services b/tutoraspects/patches/local-docker-compose-services index 6e4c1a59a..342389b02 100644 --- a/tutoraspects/patches/local-docker-compose-services +++ b/tutoraspects/patches/local-docker-compose-services @@ -81,7 +81,7 @@ superset-worker-beat: vector: image: {{ DOCKER_IMAGE_VECTOR }} volumes: - - ../../aspects/data/vector:/var/lib/vector + - ../../data/vector:/var/lib/vector - ../plugins/aspects/apps/vector/local.toml:/etc/vector/vector.toml:ro {% if ASPECTS_DOCKER_HOST_SOCK_PATH %}- {{ ASPECTS_DOCKER_HOST_SOCK_PATH }}:/var/run/docker.sock:ro{% endif %} environment: diff --git a/tutoraspects/plugin.py b/tutoraspects/plugin.py index 1b8ea3d7c..e4b5f55e1 100644 --- a/tutoraspects/plugin.py +++ b/tutoraspects/plugin.py @@ -31,10 +31,10 @@ ("RUN_CLICKHOUSE", True), ("RUN_RALPH", True), ("RUN_SUPERSET", True), - ("DOCKER_IMAGE_ASPECTS", "python:3.8"), + ("DOCKER_IMAGE_ASPECTS", "edunext/aspects:{{ ASPECTS_VERSION }}"), ("DOCKER_IMAGE_CLICKHOUSE", "clickhouse/clickhouse-server:23.3"), ("DOCKER_IMAGE_RALPH", "fundocker/ralph:3.8.0"), - ("DOCKER_IMAGE_SUPERSET", "apache/superset:2.0.1"), + ("DOCKER_IMAGE_SUPERSET", "edunext/aspects-superset:{{ ASPECTS_VERSION }}"), ("DOCKER_IMAGE_VECTOR", "timberio/vector:0.30.0-alpine"), ( "OPENEDX_EXTRA_PIP_REQUIREMENTS", @@ -112,6 +112,7 @@ ("SUPERSET_DB_PORT", "{{ MYSQL_PORT }}"), ("SUPERSET_DB_NAME", "superset"), ("SUPERSET_DB_USERNAME", "superset"), + ("SUPERSET_EXTRA_REQUIREMENTS", []), ("SUPERSET_OAUTH2_ACCESS_TOKEN_PATH", "/oauth2/access_token/"), ("SUPERSET_OAUTH2_AUTHORIZE_PATH", "/oauth2/authorize/"), ( @@ -160,7 +161,7 @@ ("DBT_REPOSITORY_PATH", "aspects-dbt/aspects"), # This is a pip compliant list of Python packages to install to run dbt # make sure packages with versions are enclosed in double quotes - ("DBT_PACKAGES", '"dbt-core==1.4.0" "dbt-clickhouse==1.4.1"'), + ("EXTRA_DBT_PACKAGES", []), # If set, DDL/table operations will be executed with the `ON CLUSTER` clause # using this cluster. This has not been tested with Aspects and is unlikely to # work. @@ -275,32 +276,10 @@ # ("", ("", "", "