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

add build coverage regex #627

Merged
merged 7 commits into from Jul 17, 2021
Merged

add build coverage regex #627

merged 7 commits into from Jul 17, 2021

Conversation

zawazawa0316
Copy link
Contributor

@zawazawa0316 zawazawa0316 commented May 21, 2021

Related issue: #596

@zawazawa0316
Copy link
Contributor Author

I've finished fixing.

@armsnyder
Copy link
Collaborator

@zawazawa0316 Thanks for the contribution! I'd like to merge this since it is a small change. Can you resolve conflicts and fix the acceptance test failure?

=== RUN   TestAccGitlabProject_basic
    testing.go:705: Step 0 error: Check failed: Check 2/2 error: 1 error occurred:
        	* Check 30/41 error: attribute build_coverage_regex expected "foo" received ""
        
        
--- FAIL: TestAccGitlabProject_basic (5.95s)
=== RUN   TestAccGitlabProject_initializeWithReadme
--- PASS: TestAccGitlabProject_initializeWithReadme (6.81s)
=== RUN   TestAccGitlabProject_willError
    testing.go:705: Step 0 error: Check failed: Check 2/2 error: 1 error occurred:
        	* Check 13/41 error: attribute build_coverage_regex expected "foo" received ""
        
        

zawazawa0316 and others added 2 commits July 17, 2021 12:46
* Fix documentation to show up on terraform registry

* update reference to `master` branch to `main`

Tested to confirm that it does create a `main` branch by default

* Add support for importing Pipeline Schedules and Triggers

* Also wait for import_status when a project template is configured

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Update dependencies

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

* Add most Premium features for gitlab_branch_protection (gitlabhq#556)

* Rebase and update go.mod

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Add most Premium features for gitlab_branch_protection

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Re-work modified schema for gitlab_branch_protection, and update docs

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Accommodate to name changes from library maintainer

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Remove invalid check for CE

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Revert back how merge_access_level and push_access_level are created

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Simplify expansion of arguments

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Remove several obsolete functions and make acceptance tests independent of implementation functions

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* fix: update default_branch to "main" for gitlab_project tests

* chore: add error handling to resourceGitlabProjectSetToState

* Documentation improvements (gitlabhq#642)

* Documentation improvements

* More Markdown lint fixes

* Add golangci-lint to the pipeline

Fixes #361

* Add protected_branch_ids to gitlab_project_approval_rule (gitlabhq#542)

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* chore: remove incomplete gitlab_project_repository_file resource (gitlabhq#650)

This file was part of gitlabhq#556 but did not include a test, docs, or an entry in gitlab/provider.go, so we are removing it until it can be completed.

* golangci-lint: exclude ResourceData.Set (gitlabhq#652)

The common case when using this method is to ignore the error return. This is because the Terraform test framework checks these errors for primitive types for us.

* CI: Add tfproviderlint workflow

* Ignore preexisting tfproviderlint issues

* chore: run golangci-lint for pull requests and annotate failing checks so we can fix them individually (gitlabhq#658)

* chore: fix markdown linter errors in branch_protection.md (gitlabhq#656)

* modify

Co-authored-by: Denis Doria <denisdoria@gmail.com>
Co-authored-by: Daniel Hill <dan@mamu.co>
Co-authored-by: Patrick Decat <pdecat@gmail.com>
Co-authored-by: Sune Keller <absukl@almbrand.dk>
Co-authored-by: Julien Pivotto <roidelapluie@inuits.eu>
Co-authored-by: Matt Kasa <mkasa@gitlab.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Willian Paixao <willian@ufpa.br>
Co-authored-by: Matt Kasa <mattkasa@users.noreply.github.com>
Co-authored-by: Adam Snyder <armsnyder@gmail.com>
Co-authored-by: Adam Snyder <asnyder@ea.com>
@zawazawa0316
Copy link
Contributor Author

zawazawa0316 commented Jul 17, 2021

@armsnyder OK, I resolved conflicts and fixed.

Copy link
Collaborator

@armsnyder armsnyder left a comment

Choose a reason for hiding this comment

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

Looks good!

@armsnyder armsnyder merged commit 2292b9e into gitlabhq:master Jul 17, 2021
willianpaixao added a commit to willianpaixao/terraform-provider-gitlab that referenced this pull request Jul 20, 2021
* add build coverage regex

* fmt

* modify data source and tests

* modify doc

* fmt

* Feature (#1)

* Fix documentation to show up on terraform registry

* update reference to `master` branch to `main`

Tested to confirm that it does create a `main` branch by default

* Add support for importing Pipeline Schedules and Triggers

* Also wait for import_status when a project template is configured

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Update dependencies

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

* Add most Premium features for gitlab_branch_protection (gitlabhq#556)

* Rebase and update go.mod

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Add most Premium features for gitlab_branch_protection

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Re-work modified schema for gitlab_branch_protection, and update docs

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Accommodate to name changes from library maintainer

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Remove invalid check for CE

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Revert back how merge_access_level and push_access_level are created

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Simplify expansion of arguments

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Remove several obsolete functions and make acceptance tests independent of implementation functions

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* fix: update default_branch to "main" for gitlab_project tests

* chore: add error handling to resourceGitlabProjectSetToState

* Documentation improvements (gitlabhq#642)

* Documentation improvements

* More Markdown lint fixes

* Add golangci-lint to the pipeline

Fixes #361

* Add protected_branch_ids to gitlab_project_approval_rule (gitlabhq#542)

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* chore: remove incomplete gitlab_project_repository_file resource (gitlabhq#650)

This file was part of gitlabhq#556 but did not include a test, docs, or an entry in gitlab/provider.go, so we are removing it until it can be completed.

* golangci-lint: exclude ResourceData.Set (gitlabhq#652)

The common case when using this method is to ignore the error return. This is because the Terraform test framework checks these errors for primitive types for us.

* CI: Add tfproviderlint workflow

* Ignore preexisting tfproviderlint issues

* chore: run golangci-lint for pull requests and annotate failing checks so we can fix them individually (gitlabhq#658)

* chore: fix markdown linter errors in branch_protection.md (gitlabhq#656)

* modify

Co-authored-by: Denis Doria <denisdoria@gmail.com>
Co-authored-by: Daniel Hill <dan@mamu.co>
Co-authored-by: Patrick Decat <pdecat@gmail.com>
Co-authored-by: Sune Keller <absukl@almbrand.dk>
Co-authored-by: Julien Pivotto <roidelapluie@inuits.eu>
Co-authored-by: Matt Kasa <mkasa@gitlab.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Willian Paixao <willian@ufpa.br>
Co-authored-by: Matt Kasa <mattkasa@users.noreply.github.com>
Co-authored-by: Adam Snyder <armsnyder@gmail.com>
Co-authored-by: Adam Snyder <asnyder@ea.com>

Co-authored-by: Denis Doria <denisdoria@gmail.com>
Co-authored-by: Daniel Hill <dan@mamu.co>
Co-authored-by: Patrick Decat <pdecat@gmail.com>
Co-authored-by: Sune Keller <absukl@almbrand.dk>
Co-authored-by: Julien Pivotto <roidelapluie@inuits.eu>
Co-authored-by: Matt Kasa <mkasa@gitlab.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Willian Paixao <willian@ufpa.br>
Co-authored-by: Matt Kasa <mattkasa@users.noreply.github.com>
Co-authored-by: Adam Snyder <armsnyder@gmail.com>
Co-authored-by: Adam Snyder <asnyder@ea.com>
eddb7 added a commit to eddb7/terraform-provider-gitlab that referenced this pull request Aug 31, 2021
* Add most Premium features for gitlab_branch_protection (gitlabhq#556)

* Rebase and update go.mod

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Add most Premium features for gitlab_branch_protection

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Re-work modified schema for gitlab_branch_protection, and update docs

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Accommodate to name changes from library maintainer

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Remove invalid check for CE

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Revert back how merge_access_level and push_access_level are created

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Simplify expansion of arguments

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Remove several obsolete functions and make acceptance tests independent of implementation functions

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* fix: update default_branch to "main" for gitlab_project tests

* chore: add error handling to resourceGitlabProjectSetToState

* Documentation improvements (gitlabhq#642)

* Documentation improvements

* More Markdown lint fixes

* Add golangci-lint to the pipeline

Fixes #361

* Add protected_branch_ids to gitlab_project_approval_rule (gitlabhq#542)

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* chore: remove incomplete gitlab_project_repository_file resource (gitlabhq#650)

This file was part of gitlabhq#556 but did not include a test, docs, or an entry in gitlab/provider.go, so we are removing it until it can be completed.

* golangci-lint: exclude ResourceData.Set (gitlabhq#652)

The common case when using this method is to ignore the error return. This is because the Terraform test framework checks these errors for primitive types for us.

* CI: Add tfproviderlint workflow

* Ignore preexisting tfproviderlint issues

* chore: run golangci-lint for pull requests and annotate failing checks so we can fix them individually (gitlabhq#658)

* chore: fix markdown linter errors in branch_protection.md (gitlabhq#656)

* add build coverage regex (gitlabhq#627)

* add build coverage regex

* fmt

* modify data source and tests

* modify doc

* fmt

* Feature (#1)

* Fix documentation to show up on terraform registry

* update reference to `master` branch to `main`

Tested to confirm that it does create a `main` branch by default

* Add support for importing Pipeline Schedules and Triggers

* Also wait for import_status when a project template is configured

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Update dependencies

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

* Add most Premium features for gitlab_branch_protection (gitlabhq#556)

* Rebase and update go.mod

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Add most Premium features for gitlab_branch_protection

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Re-work modified schema for gitlab_branch_protection, and update docs

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Accommodate to name changes from library maintainer

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Remove invalid check for CE

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Revert back how merge_access_level and push_access_level are created

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Simplify expansion of arguments

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* Remove several obsolete functions and make acceptance tests independent of implementation functions

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* fix: update default_branch to "main" for gitlab_project tests

* chore: add error handling to resourceGitlabProjectSetToState

* Documentation improvements (gitlabhq#642)

* Documentation improvements

* More Markdown lint fixes

* Add golangci-lint to the pipeline

Fixes #361

* Add protected_branch_ids to gitlab_project_approval_rule (gitlabhq#542)

Signed-off-by: Sune Keller <absukl@almbrand.dk>

* chore: remove incomplete gitlab_project_repository_file resource (gitlabhq#650)

This file was part of gitlabhq#556 but did not include a test, docs, or an entry in gitlab/provider.go, so we are removing it until it can be completed.

* golangci-lint: exclude ResourceData.Set (gitlabhq#652)

The common case when using this method is to ignore the error return. This is because the Terraform test framework checks these errors for primitive types for us.

* CI: Add tfproviderlint workflow

* Ignore preexisting tfproviderlint issues

* chore: run golangci-lint for pull requests and annotate failing checks so we can fix them individually (gitlabhq#658)

* chore: fix markdown linter errors in branch_protection.md (gitlabhq#656)

* modify

Co-authored-by: Denis Doria <denisdoria@gmail.com>
Co-authored-by: Daniel Hill <dan@mamu.co>
Co-authored-by: Patrick Decat <pdecat@gmail.com>
Co-authored-by: Sune Keller <absukl@almbrand.dk>
Co-authored-by: Julien Pivotto <roidelapluie@inuits.eu>
Co-authored-by: Matt Kasa <mkasa@gitlab.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Willian Paixao <willian@ufpa.br>
Co-authored-by: Matt Kasa <mattkasa@users.noreply.github.com>
Co-authored-by: Adam Snyder <armsnyder@gmail.com>
Co-authored-by: Adam Snyder <asnyder@ea.com>

Co-authored-by: Denis Doria <denisdoria@gmail.com>
Co-authored-by: Daniel Hill <dan@mamu.co>
Co-authored-by: Patrick Decat <pdecat@gmail.com>
Co-authored-by: Sune Keller <absukl@almbrand.dk>
Co-authored-by: Julien Pivotto <roidelapluie@inuits.eu>
Co-authored-by: Matt Kasa <mkasa@gitlab.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Willian Paixao <willian@ufpa.br>
Co-authored-by: Matt Kasa <mattkasa@users.noreply.github.com>
Co-authored-by: Adam Snyder <armsnyder@gmail.com>
Co-authored-by: Adam Snyder <asnyder@ea.com>

* CI: Use golangci-lint to run gofmt; remove redundant errcheck script

* gitlab_project resource: make default_branch attribute configurable on creation

- Made default_branch a computed attribute
- Removed the DiffSuppressFunc from default_branch so that we can use it during creation
- Implemented logic to set the default branch in cases where a repository exists (if the project was created with a readme, as a mirror, or from a template)
- Refactored the mirror code to be more explicit, instead of calling the update function from inside the create function. There was an error being returned here, which was being ignored.

* Add common test helpers for setting up test data

* Fix failing test TestAccGitLabProjectApprovalRule_basic

* CI: Increase golangci-lint timeout to 3m

* Adds support for gitlab project badges (gitlabhq#648)

* add project badge support

* fix tests and gitlab sdk references

* change id to projectid:badgeid and add importer

* add gitlab_project_badge documentation

* unify basic test and imporState test for project_badge

* Change project_badge test order

Co-authored-by: Adam Snyder <armsnyder@gmail.com>

* remove unnecessary newlines

* add project_badge import documentation

Co-authored-by: Adam Snyder <armsnyder@gmail.com>

* Add CustomCIPath to resource `gitlab_project` (gitlabhq#662)

* Add CustomCIPath to resource `gitlab_project`

* Delete acc test for simple GitLabProject attribute.
 - Amend existing Acceptance test to reflect this change in the default project

* New branch_protection_id attribute for gitlab_branch_protection

* CI: Run markdown linter on pull requests
...so that main branch builds to not fail unexpectedly after merging a PR from a fork.

* resource/gitlab_project_cluster: Suppress whitespace diffs for kubernetes_ca_cert attribute

* Clarify supported Terraform versions (gitlabhq#677)

* Update EE license

* Update CHANGELOG for 3.7.0

* Fix GitLab project membership example

* Authenticate using a Bearer token to support OAuth tokens

* Change acceptance test token value

The personal access token must be a certain length in order to use it as a Bearer token

* update to two part id

* use two part id for resource

* fmt

* remove unused

* update resource commit

* update flatten commit method

* remove max items

* updated logic for handling 404

* remove required

* added importer

* update refs

* updated so markdown lint would pass

* removed fmt

* md lint suggestions

* switch to set type

* update

* update tests

* Update docs/resources/branch.md

Co-authored-by: Corey Hemminger <hemminger@hotmail.com>

* update docs

* changed map type schema for commit

* syntax'

* fmt

* added check for empty commit

* force error

* force error

* update provider

* updated error check

* update provider lint

* lint suggestions

* fmt

* remove duplication of ci config path

Co-authored-by: Sune Keller <absukl@almbrand.dk>
Co-authored-by: Matt Kasa <mkasa@gitlab.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Willian Paixao <willian@ufpa.br>
Co-authored-by: Matt Kasa <mattkasa@users.noreply.github.com>
Co-authored-by: Adam Snyder <armsnyder@gmail.com>
Co-authored-by: Adam Snyder <asnyder@ea.com>
Co-authored-by: zawazawa0316 <37421794+zawazawa0316@users.noreply.github.com>
Co-authored-by: Denis Doria <denisdoria@gmail.com>
Co-authored-by: Daniel Hill <dan@mamu.co>
Co-authored-by: Patrick Decat <pdecat@gmail.com>
Co-authored-by: Julien Pivotto <roidelapluie@inuits.eu>
Co-authored-by: Filipe Andujar <filipeandujar@gmail.com>
Co-authored-by: Marcos Soutullo Rodriguez <marcos.soutullo91@gmail.com>
Co-authored-by: nicholasklick <nicholas.klick@gmail.com>
Co-authored-by: Nicholas Klick <nklick@gitlab.com>
Co-authored-by: Andrea Scarpino <andrea@scarpino.dev>
Co-authored-by: Ed B <edward.butler.external@atosbpstestworkplace.onmicrosoft.com>
Co-authored-by: Corey Hemminger <hemminger@hotmail.com>
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
2 participants