Skip to content
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

load .tinyenv variables #23

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
_ENV_FLAGS="${ENV_FLAGS:=--last-partition --wait}"
_NORMALIZED_ENV_NAME=$(echo $DATA_PROJECT_DIR | rev | cut -d "/" -f 1 | rev | tr '.-' '_')
GIT_BRANCH=${GITHUB_HEAD_REF}
source .tinyenv
cat .tinyenv >> $GITHUB_ENV
echo "GIT_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV
echo "_ENV_FLAGS=$_ENV_FLAGS" >> $GITHUB_ENV
echo "_NORMALIZED_ENV_NAME=$_NORMALIZED_ENV_NAME" >> $GITHUB_ENV
Expand Down Expand Up @@ -81,7 +81,6 @@ jobs:

- name: Push changes to the test Environment
run: |
source .tinyenv
CI_DEPLOY_FILE=./deploy/${VERSION}/ci-deploy.sh
if [ -f "$CI_DEPLOY_FILE" ]; then
./deploy/${VERSION}/ci-deploy.sh
Expand All @@ -94,7 +93,6 @@ jobs:

- name: Deploy changes to the main Workspace
run: |
source .tinyenv
if ${{ inputs.tb_deploy }}; then
tb env deploy --semver ${VERSION} --wait
tb release ls
Expand All @@ -110,7 +108,6 @@ jobs:

- name: run post CD deploy commands
run: |
source .tinyenv
CD_DEPLOY_FILE=./deploy/${VERSION}/cd-deploy.sh
if [ -f "$CD_DEPLOY_FILE" ]; then
./deploy/${VERSION}/cd-deploy.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
_ENV_FLAGS="${ENV_FLAGS:=--last-partition --wait}"
_NORMALIZED_ENV_NAME=$(echo $DATA_PROJECT_DIR | rev | cut -d "/" -f 1 | rev | tr '.-' '_')
GIT_BRANCH=${GITHUB_HEAD_REF}
source .tinyenv
cat .tinyenv >> $GITHUB_ENV
echo "GIT_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV
echo "_ENV_FLAGS=$_ENV_FLAGS" >> $GITHUB_ENV
echo "_NORMALIZED_ENV_NAME=$_NORMALIZED_ENV_NAME" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ Next release
```
- If you have doubts when updating just drop the .github or .gitlab-ci.yml workflow and re-run `tb init --git` using the latest version of `tinybird-cli` to re-generate the CI/CD templates.
- `.tinyenv` now supports `export OBFUSCATE_REGEX_PATTERN=<regex>` to have a list of regex separated by `|` to obfuscate the output of regression tests. It requires version 1.0.1 of tinybird-cli.
- `.tinyenv` variables written to `GITHUB_ENV` to make them available in all GitHub Actions workflow