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

invalid yaml #358

Closed
speculatrix opened this issue Sep 17, 2020 · 4 comments · Fixed by #359
Closed

invalid yaml #358

speculatrix opened this issue Sep 17, 2020 · 4 comments · Fixed by #359
Assignees

Comments

@speculatrix
Copy link

speculatrix commented Sep 17, 2020

hello
we test all the files in our puppet files repository with our CI/CD system

yamllint shows that the yaml files are missing the "---" headings, and a problem with a blank line

/tmp/build/32643510/devel-branch/environments/production/modules/gitlab/data/family/RedHat.yaml
2:1 warning missing document start "---" (document-start)
22:1 error too many blank lines (1 > 0) (empty-lines)

yamllint found error in /tmp/build/32643510/devel-branch/environments/production/modules/gitlab/data/family/RedHat.yaml when using config /tmp/build/32643510/ci-scripts/ci/yamllint-config.yaml

===============================================================================
Checking /tmp/build/32643510/devel-branch/environments/production/modules/gitlab/data/family/RedHat/6.yaml
/tmp/build/32643510/devel-branch/environments/production/modules/gitlab/data/family/RedHat/6.yaml
1:1 warning missing document start "---" (document-start)

===============================================================================
Checking /tmp/build/32643510/devel-branch/environments/production/modules/gitlab/data/os/Ubuntu.yaml
/tmp/build/32643510/devel-branch/environments/production/modules/gitlab/data/os/Ubuntu.yaml
1:1 warning missing document start "---" (document-start)

@speculatrix
Copy link
Author

here's diffs

$ git diff gitlab/data/family/Debian.yaml
diff --git a/environments/production/modules/gitlab/data/family/Debian.yaml b/environments/production/modules/gitlab/data/family/Debian.yaml
index 195a57d..3194e3e 100644
--- a/environments/production/modules/gitlab/data/family/Debian.yaml
+++ b/environments/production/modules/gitlab/data/family/Debian.yaml
@@ -1,3 +1,4 @@
+---
 gitlab::repository_configuration:
   'apt::source':
     "gitlab_official_ce":

another

$ git diff gitlab/data/family/RedHat.yaml
diff --git a/environments/production/modules/gitlab/data/family/RedHat.yaml b/environments/production/modules/gitlab/data/family/RedHat.yaml
index 9cdac74..375b624 100644
--- a/environments/production/modules/gitlab/data/family/RedHat.yaml
+++ b/environments/production/modules/gitlab/data/family/RedHat.yaml
@@ -1,3 +1,4 @@
+---
 # From: https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/config_file.repo?os=centos&dist=7&source=script
 gitlab::repository_configuration:
   yumrepo:
@@ -19,4 +20,3 @@ gitlab::repository_configuration:
       gpgcheck: 1
       repo_gpgcheck: 1
       sslverify: 1
-

and the last one

$ git diff gitlab/data/os/Ubuntu.yaml
diff --git a/environments/production/modules/gitlab/data/os/Ubuntu.yaml b/environments/production/modules/gitlab/data/os/Ubuntu.yaml
index b989495..c792132 100644
--- a/environments/production/modules/gitlab/data/os/Ubuntu.yaml
+++ b/environments/production/modules/gitlab/data/os/Ubuntu.yaml
@@ -1,3 +1,4 @@
+---
 gitlab::repository_configuration:
   'apt::source':
     "gitlab_official_ce":

@speculatrix
Copy link
Author

actually, all the yaml files are missing the header line

just install yamllint (pip install yamllint) and test them all

@kenyon
Copy link
Member

kenyon commented Sep 18, 2020

@speculatrix in the future, can you submit pull requests for your fixes? Thanks.

@speculatrix
Copy link
Author

Hi,
I'm happy to leave pull requests, but in this case the changes were so trivial I figured it would be far quicker for one of the developers to do it.

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 a pull request may close this issue.

2 participants