Skip to content

Conversation

@endorama
Copy link
Contributor

Terraform Lock File support has been added elastic/package-spec#269
but was not used by Terraform Deployer as the file was not copied from
the stage folder to the workspace.

cp * does not copy hidden files.

This commit adds copy for .terraform.lock.hcl from the stage to the
workspace folder, so it's correctly picked up by Terraform in tests.

@endorama endorama requested a review from mtojek February 14, 2022 15:45
cp -r /stage/* /workspace
# Hidden files are not copied over, we make an exception for Terraform Dependency Lock file.
# See more: https://github.com/elastic/package-spec/issues/269
cp -r /stage/* /stage/.terraform.lock.hcl /workspace
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make it future-proof, in case we need to add more hidden files: cp -a /stage/ /workspace/. Could you please check if it works correctly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cp -a /stage/ /workspace/ does not copy all files, but the entire folder.
cp -a /stage/. /workspace/ does copy all visible and hidden files. Commit updated.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Feb 14, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-02-14T16:39:13.458+0000

  • Duration: 27 min 0 sec

Test stats 🧪

Test Results
Failed 0
Passed 524
Skipped 1
Total 525

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

Terraform Lock File support has been added elastic/package-spec#269
but was not used by Terraform Deployer as the file was not copied from
the stage folder to the workspace.

cp * does not copy hidden files.

This commit adds copy for hidden files from the stage to the
workspace folder, so it's correctly picked up by Terraform in tests.
@mtojek mtojek self-requested a review February 14, 2022 17:06
@endorama endorama merged commit 5e97962 into elastic:main Feb 14, 2022
@endorama endorama deleted the terraform-deployer-deps-lock branch February 14, 2022 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants