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

Also push to dockerhub #58

Merged
merged 3 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,29 @@ name: Build and publish a 🛢️ container

on:
push:
paths-ignore:
- '.github/**'
branches:
- 'master'
tags:
- '*'

env:
TAG: ${{ github.ref_name == 'master' && 'development' || github.ref_name }}

jobs:
build-and-push-container:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: voxpupuli/gha-build-and-publish-a-container@v1
- uses: voxpupuli/gha-build-and-publish-a-container@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
build_arch: linux/amd64,linux/arm64
docker_username: voxpupulibot
docker_password: ${{ secrets.DOCKERHUB_BOT_PASSWORD}}
tags: |
ghcr.io/${{ github.repository }}:${{ env.TAG }}
ghcr.io/${{ github.repository }}:latest
docker.io/${{ github.repository }}:${{ env.TAG }}
docker.io/${{ github.repository }}:latest
10 changes: 6 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
source ENV['GEM_SOURCE'] || "https://rubygems.org"
# frozen_string_literal: true

gem 'serverspec', :require => false
gem 'docker-api', :require => false
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

gem 'docker-api', require: false
gem 'serverspec', require: false

group :release do
gem 'github_changelog_generator', '>= 1.16.1', :require => false
gem 'github_changelog_generator', '>= 1.16.1', require: false
end
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
Puppet Catalog Diff Viewer
===========================
# Puppet Catalog Diff Viewer

[![License](https://img.shields.io/github/license/voxpupuli/puppet-catalog-diff-viewer.svg)](https://github.com/voxpupuli/puppet-catalog-diff-viewer/blob/master/LICENSE)
[![CI](https://github.com/voxpupuli/puppet-catalog-diff-viewer/actions/workflows/ci.yaml/badge.svg)](https://github.com/voxpupuli/puppet-catalog-diff-viewer/actions/workflows/ci.yaml)
[![Donated by Camptocamp](https://img.shields.io/badge/donated%20by-camptocamp-fb7047.svg)](#transfer-notice)


A viewer for json reports produced by [the puppet-catalog-diff tool](https://github.com/voxpupuli/puppet-catalog-diff)

The interface can be tried online at http://voxpupuli.org/puppet-catalog-diff-viewer.
The interface can be tried online at <http://voxpupuli.org/puppet-catalog-diff-viewer>.

Acking diffs
------------
## Acking diffs

This interface allows to ack differences in order to ease the report review. Differences are acked on all nodes that have the same resource with the same diff.

A global acking button is available for sections which allows to ack all diffs in the section at once.

Starring diffs
--------------
## Starring diffs

When using the global acking button, you might want to exclude some diffs from the global acking. Starring diffs does just that. Just as for acks, stars are cross-nodes.

Using with Docker
-----------------
## Using with Docker

```shell
$ docker run -it --rm -p 8080:80 ghcr.io/voxpupuli/puppet-catalog-diff-viewer:development
```

will let you access the catalog diff viewer at [http://localhost:8080](http://localhost:8080).

Server Side storage
-------------------
## Server Side storage

The will automatically populate the drop-down list of available reports, if they can be read from `reportlist.json`.
This file contains a record of the json files in `data`.
Expand Down Expand Up @@ -64,8 +58,7 @@ $ docker run -ti \
ghcr.io/voxpupuli/puppet-catalog-diff-viewer
```

S3 storage
----------
## S3 storage

The viewer can automatically retrieve catalogs from an S3 bucket. In order to use this feature, create a `s3_credentials.js` file with the following variables:

Expand Down Expand Up @@ -141,8 +134,13 @@ Make sure the access key belongs to a user that can perform actions `s3:GetObjec
}
```

Transfer Notice
---------------
## Contributing

### Build a release

see [RELEASE.md](RELEASE.md)

## Transfer Notice

This project was originally authored by [Camptocamp](http://www.camptocamp.com).
The maintainer preferred that Vox Pupuli take ownership of the project for future improvement and maintenance.
Expand Down
29 changes: 29 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# How to release

## On a fork do

```shell
git switch -c release-x.y.z
```

Edit [Rakefile](Rakefile) and set future version.

```shell
bundle config set --local path vendor/bundle
bundle config set --local with 'release'
bundle install

CHANGELOG_GITHUB_TOKEN="token_MC_token-face" bundle exec rake changelog
git add -A
git commit -m 'Release X.Y.Z'
git push origin releae-x.y.z
```

## as a maintainer on upstream do

```shell
git switch master
git pull
git tag $version
git push --tags
```