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

Fixes CircleCI tests run #69

Merged
merged 1 commit into from
Aug 10, 2023
Merged

Conversation

tiagomlalves
Copy link
Contributor

Fixes CircleCI tests run by:

  • replacing Docker Image with VM which has a running OpenSSH server required to run tests
  • skip creating id_rsa if it exists to prevent using yes which causes CircleCI to fail allowing to use existent key. -

Additionally, upgraded CircleCI config to latest 2.1 version and added friendly names to the CI steps.

--
When attempting to run tests in CircleCI we observed several issues.

First, it seems CircleCI fails when we try using yes to pipe an yes-answer to a command (see https://discuss.circleci.com/t/failed-build-exit-code-141/26335). This yes command was needed to be able to replace id_rsa key when it exists. To workaround this issue, I've modified the logic to only generateid_rsa key when it does not exist - and hence not requiring a confirmation. Note that, attempting to remove ~/.ssh and allow the existent logic to generate all keys also causes failures.

Second, when running tests in Docker, the container does not provide an SSH server where the tests can connect to - so all tests fail. I've made an attempt to install the OpenSSH server in the original docker image but was faced with the issue that APT servers for Debian 9 changed (too old version) which further required me to modify APT servers. Instead, I've done an attempt to use more modern convenient images as described in https://discuss.circleci.com/t/legacy-convenience-image-deprecation/41034 . I've made some progress by installing and starting OpenSSH server but there were several test failures. Also, the approach was a bit cumbersome because everytime the image started I would install OpenSSH (not benefitting from Docker image builds) and having to start the OpenSSH server before running the tests. Creating a custom Docker image forces us to publish it and make it public - create a dependency to an external registry and creating a image that is only specific for these tests. Instead, I've decided to use an "old-fashioned" VM linux and that made the trick.
As part of that change, I've used Ubuntu 20.04 (Focal Fossa) LTS as it's OpenSSL version already deprecates RSA keys schemas but it's not as modern as in later Ubuntu 22.04.

Non-necessary changes:

  • Upgrading config version to 2.1, but why not ensure we're at the latest version of what CircleCI updates
  • Adding prettier labels to steps.
  • Removing file header comments which point to URL that doesn't exist.

Fixes CircleCI tests run by:
 - replacing Docker Image with VM which has a running OpenSSH server
   required to run tests
 - skip creating id_rsa if it exists to prevent using `yes` which
   causes CircleCI to fail allowing to use existent key.
Additionally, upgraded CircleCI config to latest 2.1 version and
added friendly names to the CI steps.
Copy link
Member

@slipset slipset left a comment

Choose a reason for hiding this comment

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

🥇

@slipset slipset merged commit 7e3ad60 into clj-commons:master Aug 10, 2023
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.

None yet

2 participants