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

fix(action): re-introduce a custom Dockerfile to handle user input #32

Merged
merged 3 commits into from
Jul 22, 2020

Conversation

ShahradR
Copy link
Owner

This pull request re-introduces the project-specific Dockerfile and entrypoint.sh files, due to the complexity of maintaining Docker parameters solely in the action.yaml file.

Specifically, the entrypoint parameter is no longer defined as part of the action.yaml file—instead, layers are created on top of the taskcat/taskcat:latest image to set the entrypoint to the entrypoint.sh script. The script handles input tokenization, allowing users to pass commands like test run, like they would in the command-line version of taskcat.

Because we no longer define the entrypoint using the metadata syntax for GitHub Actions, we're side-stepping issue #26, where act and the GitHub hosted runner both expect different types for entrypoint. As such, we can re-enable the act JUnit tests. To prevent this in the future, and catch errors act might have missed, a job is added to the CI/CD workflow, running this action on GitHub hosted runners as part of the integration tests.

Closes #20, #26

After trying to reduce dependencies and eliminate the need to create a
new container to run taskcat in GitHub workflows, it seems that it might
be easier to simply control the execution from within a script,
bypassing the restrictions set by the GitHub Action's metadata syntax.

This commit re-introduces the entrypoint.sh script and the Dockerfile.
Building on the official taskcat/taskcat container, the script allows
users to pass arbitrary commands to taskcat from GitHub workflows, as
they would when invoking the taskcat from the command line.

Associated issues: #20, #26
Due to validation and implementation differences between act and the
GitHub hosted runners, we cannot solely rely on the JUnit tests to ensure
the correct functionality of the action.

To help catch errors, a job was added to this repository's GitHub
workflow, which runs the example in this project's README file against
the sample CloudFormation template used by the JUnit tests.

While we can only rely on the action's return code to determine if the
execution was successful, it can act as a simple tool to detect errors
that act might have missed.

Associated issue: #20, #26
Re-enable the JUnit tests which have been disabled in commit 0cfb762.
With the introduction of our own container layer in previous commits,
the entrypoint is now defined in the Dockerfile, rather than the
action.yaml file.

While the underlying issue still persists, we're no longer affected by
the discrepancy between act and the GitHub runner, each expecting
different types for the entrypoint element in the action's definition.

Associated issue: #26, #24
@ShahradR ShahradR added bug Something isn't working enhancement New feature or request labels Jul 20, 2020
@ShahradR ShahradR self-assigned this Jul 20, 2020
@ShahradR ShahradR changed the base branch from main to develop July 22, 2020 01:30
@ShahradR ShahradR merged commit 5c01bb8 into develop Jul 22, 2020
@ShahradR ShahradR deleted the bugfix/entrypoint-dockerfile branch July 22, 2020 01:31
@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.0.3-develop.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.0.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

ShahradR added a commit that referenced this pull request Nov 29, 2020
fix(git): bump .gitattributes file version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request released on @develop released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Directly use the taskcat/taskcat Docker container
1 participant