Skip to content

Commit

Permalink
Merge pull request #2 from appuio/modulesync-a8c290f
Browse files Browse the repository at this point in the history
[ModuleSync] Update from projectsyn/modulesync-control@a8c290f
  • Loading branch information
glrf authored Oct 4, 2021
2 parents 14120d3 + aa426ab commit d1691df
Show file tree
Hide file tree
Showing 12 changed files with 97 additions and 9 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
;
; File managed by ModuleSync - Do Not Edit
;
; Additional Makefiles can be added to `.sync.yml` in 'Makefile.includes'
;
; This file is for unifying the coding style for different editors and IDEs.
; More information at https://editorconfig.org

Expand All @@ -24,3 +29,10 @@ insert_final_newline = false

[Makefile]
indent_style = tab

; Ignore generated files
[tests/golden/**]
indent_style = unset
indent_size = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
2 changes: 0 additions & 2 deletions .github/changelog-configuration.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{
"pr_template": "- ${{TITLE}} (#${{NUMBER}})",
"categories": [
Expand Down Expand Up @@ -29,4 +28,3 @@
],
"template": "${{CATEGORIZED_COUNT}} changes since ${{FROM_TAG}}\n\n${{CHANGELOG}}"
}

2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- v*

jobs:
build:
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
branches:
- master

env:
COMPONENT_NAME: group-sync-operator

jobs:
linting:
runs-on: ubuntu-latest
Expand All @@ -24,3 +27,25 @@ jobs:
- uses: snow-actions/eclint@v1.0.1
with:
args: 'check'
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.COMPONENT_NAME }}
steps:
- uses: actions/checkout@v2
with:
path: ${{ env.COMPONENT_NAME }}
- name: Compile component
run: make test
golden:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.COMPONENT_NAME }}
steps:
- uses: actions/checkout@v2
with:
path: ${{ env.COMPONENT_NAME }}
- name: Golden diff
run: make golden-diff
21 changes: 19 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
_archive/
_public/
#
# File managed by ModuleSync - Do Not Edit
#
# Additional entries can be added to `.sync.yml` in '.gitignore.additionalEntries'
#

# Commodore
.cache/
helmcharts/
manifests/
vendor/
jsonnetfile.lock.json
crds/
compiled/

# Editors
.vscode/
.idea/

# Antora
_archive/
_public/

# Additional entries
4 changes: 2 additions & 2 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
:global:
componentName: Group Sync Operator
componentName: group-sync-operator
githubUrl: https://github.com/appuio/component-group-sync-operator
feature_goldenTests: true

docs/antora.yml:
name: group-sync-operator
title: group-sync-operator
title: Group Sync Operator
5 changes: 5 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#
# File managed by ModuleSync - Do Not Edit
#

extends: default

rules:
Expand All @@ -12,3 +16,4 @@ ignore: |
manifests/
vendor/
compiled/
tests/golden/
20 changes: 19 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#
# File managed by ModuleSync - Do Not Edit
#
# Additional Makefiles can be added to `.sync.yml` in 'Makefile.includes'
#

MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
Expand Down Expand Up @@ -46,9 +52,21 @@ docs-serve: ## Preview the documentation
$(COMMODORE_CMD)

.PHONY: test
test: commodore_args = -f tests/$(instance).yml --search-paths ./dependencies
test: commodore_args += -f tests/$(instance).yml
test: .compile ## Compile the component

.PHONY: gen-golden
gen-golden: commodore_args += -f tests/$(instance).yml
gen-golden: .compile ## Update the reference version for target `golden-diff`.
@rm -rf tests/golden/$(instance)
@mkdir -p tests/golden/$(instance)
@cp -R compiled/. tests/golden/$(instance)/.

.PHONY: golden-diff
golden-diff: commodore_args += -f tests/$(instance).yml
golden-diff: .compile ## Diff compile output against the reference version. Review output and run `make gen-golden golden-diff` if this target fails.
@git diff --exit-code --minimal --no-index -- tests/golden/$(instance) compiled/

.PHONY: clean
clean: ## Clean the project
rm -rf compiled dependencies vendor helmcharts jsonnetfile*.json || true
7 changes: 7 additions & 0 deletions Makefile.vars.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#
# File managed by ModuleSync - Do Not Edit
#
# Additional Makefiles can be added to `.sync.yml` in 'Makefile.includes'
#

# Commodore takes the root dir name as the component name
COMPONENT_NAME ?= $(shell basename ${PWD} | sed s/component-//)

compiled_path ?= compiled/$(COMPONENT_NAME)/$(COMPONENT_NAME)
root_volume ?= -v "$${PWD}:/$(COMPONENT_NAME)"
compiled_volume ?= -v "$${PWD}/$(compiled_path):/$(COMPONENT_NAME)"
commodore_args ?= --search-paths ./dependencies --search-paths .

DOCKER_CMD ?= docker
DOCKER_ARGS ?= run --rm -u "$$(id -u)" -w /$(COMPONENT_NAME)
Expand Down
6 changes: 6 additions & 0 deletions docs/antora.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#
# File managed by ModuleSync - Do Not Edit
#
# The name and title can be customized in `.sync.yml` with `'docs/antora.yml'.title`, `'docs/antora.yml'.name`
#

name: group-sync-operator
title: group-sync-operator
version: master
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= group-sync-operator
= Group Sync Operator

group-sync-operator is a Commodore component to manage group-sync-operator.

Expand Down
Empty file.

0 comments on commit d1691df

Please sign in to comment.