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

Issue 87 Part 3: Add codenarc and fix terraform-version comparison #188

Merged
merged 2 commits into from
Feb 6, 2020

Conversation

kmanning
Copy link
Collaborator

@kmanning kmanning commented Feb 6, 2020

  • Issue Terraform Pipeline needs CI #87

  • The initial merge of issue_87_part_3 introduced a regression, when refactoring version comparison to use >=.

  • The compareTo method of SemanticVersion doesn't properly override the various comparison operators. It also behaves differently in unit tests than it does under a normal Jenkinsfile context.

  • Switch to <=> operator instead of >= when comparing semantic versions, to determine whether or not to use Terraform v0.12 workflow.

  • Test: new SemanticVersion('0.12.0') >= new SemanticVersion('0.12.0')

  • Expected: true

  • Actual: 0

@codecov
Copy link

codecov bot commented Feb 6, 2020

Codecov Report

Merging #188 into v5.4-dev will not change coverage.
The diff coverage is 79.31%.

Impacted file tree graph

@@            Coverage Diff            @@
##           v5.4-dev     #188   +/-   ##
=========================================
  Coverage     52.35%   52.35%           
=========================================
  Files            31       31           
  Lines           764      764           
  Branches        207      207           
=========================================
  Hits            400      400           
  Misses          283      283           
  Partials         81       81
Impacted Files Coverage Δ
src/FileParametersPlugin.groovy 18.75% <ø> (ø) ⬆️
src/AgentNodePlugin.groovy 0% <0%> (ø) ⬆️
src/TerraformInitCommand.groovy 91.89% <100%> (ø) ⬆️
src/TerraformPlanCommand.groovy 90.9% <100%> (ø) ⬆️
src/TerraformApplyCommand.groovy 90.62% <100%> (ø) ⬆️
src/TfvarsFilesPlugin.groovy 100% <100%> (ø) ⬆️
src/Jenkinsfile.groovy 16.94% <100%> (ø) ⬆️
src/S3BackendPlugin.groovy 77.94% <100%> (ø) ⬆️
src/RegressionStage.groovy 26% <100%> (ø) ⬆️
src/TerraformValidateCommand.groovy 78.57% <50%> (ø) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4f81df...ee26960. Read the comment docs.

@kmanning kmanning merged commit 00d7cef into v5.4-dev Feb 6, 2020
@kmanning kmanning deleted the v5.4-dev-fix branch February 6, 2020 03:16
@kmanning
Copy link
Collaborator Author

kmanning commented Feb 6, 2020

Note: this problem was identified in the original author's PR - https://github.com/manheim/terraform-pipeline/pull/173/files#diff-2724a09cdd048285c15140f07b77fb5dR47-R51

The return of int instead of boolean appears to be due to CPS .

@kmanning kmanning added this to the v5.4 milestone Feb 6, 2020
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

1 participant