flink
flink copied to clipboard
[FLINK-34047][ci] Make CI scripts agnostic to CI environment
What is the purpose of the change
Azure Pipelines (see pre-defined env variables) and GitHub (see pre-defined env variables) use a different set of environment variables. The CI tools rely on some of the environment variables that are provided by Azure Pipelines. With the migration to GitHub Actions we need to make the scripts CI environment agnostic.
Brief change log
- Made
tools/azure-pipelines/debug_files_utils.sh
use parameters instead of relying on environment variables - Made
tools/azure-pipelines/uploading_watchdog.sh
consider Azure Pipelines and GitHub Actions environments - I checked for occurrences of the following substrings (based on Azure Pipelines pre-defined env variables) in the code to verify that we're not missing any other env variables:
-
$AGENT_
-
$SYSTEM_
-
$BUILD_
-
$COMMON_
-
$ENV_
-
$CHECKS
-
Verifying this change
- PR CI should still work w/o errors
- The follow-up FLINK-33914 PR should fail without the right environment variables being set in the fork XComp/flink's project being set
- We should see a successful build with the necessary environment variables being set for FLINK-33914
Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
@Public(Evolving)
: no - The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? in-code documentation
CI report:
- 91a76e9e6c70e62f8b0ca9e0544a83c113b40ca5 Azure: SUCCESS
Bot commands
The @flinkbot bot supports the following commands:-
@flinkbot run azure
re-run the last Azure build
(Could also move the debug_files_utils script out of the azure-pipelines directory but 🙈 )
(Could also move the debug_files_utils script out of the azure-pipelines directory but 🙈 )
I rather leave everything in one place for now and move it to a better place when removing Azure Pipelines :innocent: