-
Notifications
You must be signed in to change notification settings - Fork 47
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
Missing Env Variables #70
Comments
Hmm, I understand that earlier PR #69 better now. The thing is that both inputs and env variables are supposed to be supported in your own workflow YAML. For instance, if I would create the following workflow (for static tests, but it illustrates the idea): on: [push]
jobs:
static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: extdn/github-actions-m2/magento-coding-standard/8.1@master
with:
phpcs_severity: 6 then it would equal the following: on: [push]
jobs:
static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: extdn/github-actions-m2/magento-coding-standard/8.1@master
env:
PHPCS_SEVERITY: 6 which again equals: name: ExtDN Static Tests
on: [push]
env:
PHPCS_SEVERITY: 6
jobs:
static:
name: Static Code Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: extdn/github-actions-m2/magento-coding-standard/8.1@master In other words, either you would define an input Following from this, in the Integration Test scripts, the variable
action.yml , people might not know about this. Plus, because the variable is not defined as input in action.yml , the variable is never allowed as input either. Therefore the INPUT_ELASTICSEARCH variable will never do anything: This is incomplete and should be fixed.
As I see it, there are 2 issues:
|
|
Let me illustrate with another variable This is defined in https://github.com/extdn/github-actions-m2/blob/master/magento-integration-tests/8.1/action.yml#L22 as a valid input, though not required. This means that in a workflow YAML you can use this via This conversion of the variable name happens with inputs, but not with env variables. In other words, if I would define an env variable in my workflow YAML called So, depending on the type of variable you define in your workflow (input or env), the variable name either becomes |
So the input I'd say we just need to define what takes precedence and then change this in all places, so that it is the same everywhere. What do you think makes more sense? I do not really care - mixing both approaches (so using input variables and env variables) does not make sense to me anyway. |
So far so good, all is working. And I really would like to keep both options (env and secret) in there, because otherwise existing flows might be broken. But let's keep this ticket open until I found the time to make sure that all possible variables are usable in this way. |
As part of #69, we encountered that there are quite some input variables, which are not passed into the Docker container. https://github.com/extdn/github-actions-m2/blob/4091e3ae8e47b4fdaa049a9c64a088c1d06d02f1/magento-integration-tests/entrypoint.sh uses the following inputs, which are not passed into the Docker container here:
github-actions-m2/magento-integration-tests/8.1/action.yml
Lines 44 to 49 in 4091e3a
INPUT_ELASTICSEARCH
INPUT_PHPUNIT_FILE
INPUT_COMPOSER_VERSION
INPUT_REPOSITORY_URL
INPUT_PRE_PROJECT_SCRIPT
INPUT_POST_PROJECT_SCRIPT
INPUT_MAGENTO_PRE_INSTALL_SCRIPT
INPUT_MAGENTO_POST_INSTALL_SCRIPT
Wouldn't all these variables need to be passed as well? Am I missing something?
/cc @jissereitsma
The text was updated successfully, but these errors were encountered: