tinybirdco / ci

Collection of configuration files that enable CI flows for Tinybird projects
MIT License
3 stars 3 forks source link

not clean environment after ci and more #19

Closed alrocar closed 11 months ago

alrocar commented 11 months ago

Added some changes:

alrocar commented 11 months ago

I've updated the PR description with the changes included it.

The plan is test them with ci_analytics in GitHub and Internal in GitLab and then release a v2.3.0 and update the CLI so it generates new ci/cd templates based on that version.

Changes are not fully backwards compatible, in order to clean up Environments rules of execution of the CI pipelines both in GitHub and GitLab need to be updated. I'll add it to the release notes and we have to think on a way to communicate to users.

alrocar commented 11 months ago

Tested both in GitHub and GitLab.

In order to keep Environments between CI runs:

- &cli_telemetry_cleanup_rule
    if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
    changes:
      - .gitlab-ci.yml
      - cli_telemetry/**/*
    when: always

And remove needs: ["run_ci__whatever"] from the ci_cleanup job.

If no change is applied and you update to use this template, the behaviour is the same as before in GitLab. In GitHub, CI environments are not cleaned after merge, so users will notice and when they reach the limit we can tell them to include the closed event.

xavijam commented 11 months ago

What if we update the CLI with the new changes to a production version and then we release the new CI/CD changes? With that we will avoid to point to a pre-release version

alrocar commented 11 months ago

What if we update the CLI with the new changes to a production version and then we release the new CI/CD changes? With that we will avoid to point to a pre-release version

Yes, I'd do that but first let's merge this PR and integrate in some of our internal projects (using directly the main branch) during next week. If everything goes OK then we can:

WDYT?

xavijam commented 11 months ago

Fine by me, let's go!

alrocar commented 11 months ago

Added a changelog to not forget about these changes and use them as release notes