-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: splitting variables and secrets and reconfiguring pipeline to us…
…e new structure. Also added an indicator to skip the ci pipeline if pyproject.toml
- Loading branch information
Showing
7 changed files
with
70 additions
and
166 deletions.
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 |
---|---|---|
|
@@ -5,34 +5,34 @@ on: | |
branches: | ||
- 'main' | ||
- 'dev' | ||
# - 'feature**' | ||
delete: | ||
branches: | ||
# - 'feature**' | ||
tags-ignore: | ||
- '*' | ||
|
||
|
||
|
||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
PYPI_TEST_TOKEN: ${{ secrets.PYPI_TEST_TOKEN }} | ||
PIPELINE_USER_ACCESS_KEY_ID: ${{ secrets.GH_AWS_ACCESS_KEY_ID }} | ||
PIPELINE_USER_SECRET_ACCESS_KEY: ${{ secrets.GH_AWS_SECRET_ACCESS_KEY }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
DEV_OB_PROVIDER_API_KEY: ${{ secrets.DEV_OB_PROVIDER_API_KEY }} | ||
PROD_OB_PROVIDER_API_KEY: ${{ secrets.PROD_OB_PROVIDER_API_KEY }} | ||
|
||
SAM_TEMPLATE: resources.yaml | ||
TESTING_STACK_NAME: OpenBrainPublish | ||
TESTING_PIPELINE_EXECUTION_ROLE: ${{ secrets.TESTING_PIPELINE_EXECUTION_ROLE }} | ||
TESTING_CLOUDFORMATION_EXECUTION_ROLE: ${{ secrets.TESTING_CLOUDFORMATION_EXECUTION_ROLE }} | ||
TESTING_ARTIFACTS_BUCKET: ${{ secrets.TESTING_ARTIFACTS_BUCKET }} | ||
TESTING_REGION: us-east-1 | ||
|
||
OB_MODE: ${{ secrets.OB_MODE }} | ||
INFRA_STACK_NAME: ${{ secrets.INFRA_STACK_NAME }} | ||
EVENTBUS_NAME: ${{ secrets.EVENTBUS_NAME }} | ||
|
||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
DEV_OB_PROVIDER_API_KEY: ${{ secrets.DEV_OB_PROVIDER_API_KEY }} | ||
PROD_OB_PROVIDER_API_KEY: ${{ secrets.PROD_OB_PROVIDER_API_KEY }} | ||
DEV_API_URL: ${{ secrets.DEV_API_URL }} | ||
PROD_API_URL: ${{ secrets.PROD_API_URL }} | ||
OB_API_URL: ${{ secrets.OB_API_URL }} | ||
TESTING_PIPELINE_EXECUTION_ROLE: ${{ vars.TESTING_PIPELINE_EXECUTION_ROLE }} | ||
TESTING_CLOUDFORMATION_EXECUTION_ROLE: ${{ vars.TESTING_CLOUDFORMATION_EXECUTION_ROLE }} | ||
TESTING_ARTIFACTS_BUCKET: ${{ vars.TESTING_ARTIFACTS_BUCKET }} | ||
OB_MODE: ${{ vars.OB_MODE }} | ||
INFRA_STACK_NAME: ${{ vars.INFRA_STACK_NAME }} | ||
EVENTBUS_NAME: ${{ vars.EVENTBUS_NAME }} | ||
DEV_API_URL: ${{ vars.DEV_API_URL }} | ||
PROD_API_URL: ${{ vars.PROD_API_URL }} | ||
OB_API_URL: ${{ vars.OB_API_URL }} | ||
|
||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
PYPI_TEST_TOKEN: ${{ secrets.PYPI_TEST_TOKEN }} | ||
|
||
jobs: | ||
pre-commit-tests: | ||
|
@@ -201,12 +201,10 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
# token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
|
||
#---------------------------------------------- | ||
# check-out repo and set-up python | ||
#---------------------------------------------- | ||
# - name: Check out repository | ||
# uses: actions/checkout@v4 | ||
- name: Set up python | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
|
@@ -216,57 +214,20 @@ jobs: | |
# ----- install & configure poetry ----- | ||
#---------------------------------------------- | ||
- name: Install Poetry | ||
|
||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
# | ||
# #---------------------------------------------- | ||
# # load cached venv if cache exists | ||
# #---------------------------------------------- | ||
# - name: Load cached venv | ||
# id: cached-poetry-dependencies | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: .venv | ||
# key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
# #---------------------------------------------- | ||
# # install dependencies if cache does not exist | ||
# #---------------------------------------------- | ||
# - name: Install dependencies | ||
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
# run: poetry install --no-interaction --no-root | ||
# #---------------------------------------------- | ||
# # install your root project, if required | ||
# #---------------------------------------------- | ||
# - name: Install project | ||
# run: poetry install --no-interaction | ||
|
||
# - uses: bjoluc/[email protected] | ||
# with: | ||
# pypi_token: ${{ secrets.PYPI_TEST_TOKEN }} | ||
# github_token: ${{ secrets.GH_TOKEN }} | ||
# pypi_repository: https://test.pypi.org/legacy/ | ||
# release_branch: dev | ||
# env: | ||
# RELEASE_BRANCH: dev | ||
|
||
|
||
- name: Python Semantic Release | ||
uses: python-semantic-release/python-semantic-release@master | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TEST_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
PYPI_REPOSITORY: https://test.pypi.org/legacy/ | ||
RELEASE_BRANCH: dev | ||
# - name: Python Semantic Release | ||
# uses: python-semantic-release/python-semantic-release@master | ||
# env: | ||
# PYPI_TOKEN: ${{ secrets.PYPI_TEST_TOKEN }} | ||
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
# PYPI_REPOSITORY: https://test.pypi.org/legacy/ | ||
# RELEASE_BRANCH: dev | ||
|
||
|
||
publish-release: | ||
if: github.ref == 'refs/heads/main' | ||
|
@@ -281,7 +242,7 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
# token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
|
||
#---------------------------------------------- | ||
# check-out repo and set-up python | ||
#---------------------------------------------- | ||
|
@@ -292,11 +253,11 @@ jobs: | |
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
#---------------------------------------------- | ||
# ----- install & configure poetry ----- | ||
#---------------------------------------------- | ||
- name: Install Poetry | ||
|
||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
|
@@ -312,15 +273,17 @@ jobs: | |
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
# #---------------------------------------------- | ||
# # install dependencies if cache does not exist | ||
# #---------------------------------------------- | ||
|
||
#---------------------------------------------- | ||
# install dependencies if cache does not exist | ||
#---------------------------------------------- | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root | ||
# #---------------------------------------------- | ||
# # install your root project, if required | ||
# #---------------------------------------------- | ||
|
||
#---------------------------------------------- | ||
# install your root project, if required | ||
#---------------------------------------------- | ||
- name: Install project | ||
run: poetry install --no-interaction | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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