Skip to content

Commit

Permalink
Merge pull request #12 from pantheon-systems/CMSP-319
Browse files Browse the repository at this point in the history
[CMSP-319] Cleanup repo
  • Loading branch information
pwtyler authored Apr 4, 2023
2 parents 3a52126 + 0d28214 commit 385904a
Show file tree
Hide file tree
Showing 61 changed files with 79 additions and 3,966 deletions.
4 changes: 0 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ commands:
- restore_cache:
keys:
- v4-dependencies-{{ checksum "go.sum" }}

# By default, CircleCI uses ssh, and authenticates as a user with read access to projects, but not write access.
# In order for `git push` command to work, we need to have CircleCI use HTTPS with the provided oauth token
# instead of ssh (the token is for pantheon-releases which has write access, but the default circle user does not)
configure-https-git:
steps:
- run: git config --global url."https://$GITHUB_TOKEN:[email protected]/pantheon-systems/".insteadOf "[email protected]:pantheon-systems/"
Expand Down
5 changes: 4 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ changelog:
exclude:
- '^docs:'
- '^test:'
- Merge pull request
- fixup
- Merge branch
- Merge commit
- Merge pull request
- Squashed 'devops/make/'

# make a zip of the source
# https://goreleaser.com/customization/source/
Expand Down
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2023 Pantheon Systems Inc

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
APP := pyml-validator

include devops/make/common.mk
include devops/make/common-kube.mk
include devops/make/common-go.mk
include devops/make/common-go.mk

# extend the update-makefiles task to remove files we don't need
update-makefiles::
make prune-common-make

# strip out everything from common-makefiles that we don't want.
prune-common-make:
@find devops/make -type f \
-not -name common.mk \
-not -name common-go.mk \
-delete
@find devops/make -empty -delete
@git add devops/make
@git commit -C HEAD --amend
41 changes: 31 additions & 10 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,28 +1,49 @@
# Sites.yml | Pantheon.yml Validator
# Pantheon YML Validator

A utility for validating a sites.yml file on a pantheon site during WordPress multisites' search-replace tasks. Asprirationally to include pantheon.yml validation in the future.
A utility for validating a sites.yml file on a Pantheon site during WordPress multisites' search-replace tasks. Asprirationally to include pantheon.yml validation in the future.

# Usage
## Usage

## Sites.yml
### Sites.yml
```
$ pyml-validator sites -f path/to/sites.yml
```

See [this annotated fixture](./fixtures/sites/valid.yml) for an example of a valid sites.yml file.

## Pantheon.yml
Note, validation of pantheon.yml is unimplemented, so any file reads as valid.
## Install

### [Download the latest binary](https://github.com/pantheon-systems/pyml-validator/releases/latest)

Use wget to download, gzipped pre-compiled binaries:
For instance, VERSION=v0.0.11 and BINARY=pyml-validator_linux_amd64

### Compressed via tar.gz
```bash
wget https://github.com/pantheon-systems/pyml-validator/releases/download/${VERSION}/${BINARY}.tar.gz -O - |\
tar xz && mv ${BINARY} /usr/bin/pyml-validator
```

### Plain binary

```bash
wget https://github.com/pantheon-systems/pyml-validator/releases/download/${VERSION}/${BINARY} -O /usr/bin/pyml-validator &&\
chmod +x /usr/bin/pyml-validator
```
$ pyml-validator pantheon -f path/to/pantheon.yml

### Latest version

```bash
wget https://github.com/pantheon-systems/pyml-validator/releases/latest/download/pyml-validator_linux_amd64 -O /usr/bin/pyml-validator &&\
chmod +x /usr/bin/pyml-validator
```

# Testing
## Testing

[![Coverage Status](https://coveralls.io/repos/github/pantheon-systems/pyml-validator/badge.svg?t=PGhafd)](https://coveralls.io/github/pantheon-systems/pyml-validator)

`make test` runs linting and testing.

# Releases
## Releases

Automatically releases on merge to main via autotag + goreleaser. See [Autotag Readme](https://github.com/pantheon-systems/autotag) for details on how the SemVer is determined. Note, with goreleaser, each commit merged will become a line item in the release's Changelog. Take note to use squashing and/or rebase to ensure helpful and informative commit messages.
Automatically releases on merge to main via autotag + goreleaser. See [Autotag Readme](https://github.com/pantheon-systems/autotag) for details on how the SemVer is determined. With goreleaser, each commit merged will become a line item in the release's Changelog. Take note to use squashing and/or rebase to ensure helpful and informative commit messages.
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ var FilePath string

var rootCmd = &cobra.Command{
Use: "pyml-validator",
Short: "Pyml-validator validates pantheon.yml, sites.yml, etc.",
Long: `Pyml-validator is a validator for pantheon.yml or sites.yml.
Short: "Pyml-validator validates sites.yml",
Long: `Pyml-validator is a validator for sites.yml, used for WPMS search-replace.
Ensures that the given config file can be used by the platform.`,
}

Expand Down
10 changes: 0 additions & 10 deletions cmd/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ var sitesCommand = &cobra.Command{
},
}

var pantheonCommand = &cobra.Command{
Use: "pantheon",
Short: "validate pantheon.yml",
Long: `Validate pantheon.yml. For more information, see https://pantheon.io/docs/pantheon-yml`,
RunE: func(cmd *cobra.Command, args []string) error {
return validatorCommand(cmd)
},
}

func init() {
rootCmd.AddCommand(pantheonCommand)
rootCmd.AddCommand(sitesCommand)
}
95 changes: 0 additions & 95 deletions devops/make/.circleci/config.yml

This file was deleted.

18 changes: 0 additions & 18 deletions devops/make/.github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

6 changes: 0 additions & 6 deletions devops/make/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions devops/make/CODEOWNERS

This file was deleted.

3 changes: 0 additions & 3 deletions devops/make/Dockerfile

This file was deleted.

74 changes: 0 additions & 74 deletions devops/make/Makefile

This file was deleted.

Loading

0 comments on commit 385904a

Please sign in to comment.