-
Notifications
You must be signed in to change notification settings - Fork 93
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
Action var tests off #2632
Action var tests off #2632
Conversation
testing action variable
testing action variables
syntax error
Remove environment variable in favor of action variable.
Replacing env with action var.
Replacing env with action vars.
replace env with action vars.
changing boolean to binary
fixed comment
changed to binary boolean
Changed conditional to binary boolean.
Changed to binary boolean.
Hi @BrianCashProf, thanks for opening the PR; I wonder if the variable could be boolean instead of the int. Also, while reading the docs for variables again, I noticed this:
So, one thing that we could also change is the primary condition, so instead of looking for a value of the given variable (and this requiring that to be preset), we could use:
I've attested that this works as expected, but with the caveat that those variables must be set in the repository settings of a given fork. |
I'll take a look into this method. |
testing regular boolean again.
testing camel case
no string
using different expression
single quotes false
if not statement
does not equal
In my initial test I have realized I had used double quotes. Regular boolean works fine like such:
The code you provided:
Works well in the sense that if you do not set the variable at all it will run the pipeline but if you do set the variable to any value at all it will skip the pipeline. If by default we want to run the pipeline and the flag only needs to be placed to skip the pipeline; then this is my suggestion:
|
@BrianCashProf Yes we do want to run by default and only skip if the flag is set accordingly. Please make your suggested change. Once that is committed, is there anything else needed before this PR can be merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrianCashProf, make sure they follow the standard you suggested above. NO_PROVIDER_CREDENTIALS_AWS != 'true'
to vars.NO_PROVIDER_CREDENTIALS_AZURE == 0
. Also, now that we removed the previous check-for-credentials
job and we are also relying on different variables for each provider anyway, I suggest that we rename the variable to SKIP_***_INTEGRATION_TEST
.
Update to SKIP_AWS_INTEGRATION_TEST var
Update to SKIP_AZURE_INTEGRATION_TEST var.
update SKIP_AZURE_INTEGRATION_TEST
Update SKIP_DO_INTEGRATION_TEST var.
update SKIP_GCP_INTEGRATION_TEST var
echo "::set-output name=provider_credentials_aws::1" | ||
fi | ||
|
||
# Must have action variable NO_PROVIDER_CREDENTIALS_AWS set up in the repo as a binary boolean. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, I've removed the comment.
Remove comment
Remove comment.
Remove comment
remove comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @BrianCashProf
Reference Issues or PRs
What does this implement/fix?
Put a
x
in the boxes that applyTesting
Any other comments?
Following the changes introduced in #2569, We have decided to use action variables instead of local environment variables.
These action variables must be set at the repo level and can be set by forks differently to the main repository without merge conflicts.
The action variable is set as a binary boolean (with 0 being false and 1 being true).