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

Modify the pipelines and the contributing guide for WireMock 3.x #148

Merged
merged 5 commits into from
Aug 30, 2023
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
3 changes: 2 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

- [ ] The PR request is well described and justified, including the body and the references
- [ ] The PR title represents the desired changelog entry
- [ ] If the change documents the new _WireMock 3 Beta_ feature, it is submitted against the [3.0.0-beta](https://github.com/wiremock/wiremock.org/tree/3.0.0-beta) branch
- [ ] If the change against WireMock 2 functionality (incompatible with WireMock 3),
it is submitted against the [2.x](https://github.com/wiremock/wiremock.org/tree/2.x) branch
- [ ] The repository's code style is followed (see the contributing guide)

_Details: [Contributor Guide](https://github.com/wiremock/wiremock.org/blob/main/CONTRIBUTING.md)_
12 changes: 5 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Continuous Integration
on:
push:
# Not needed for main, we have CD there
branches: [ "3.0.0-beta" ]
branches: [ "2.x" ]
pull_request:
branches: [ "main", "3.0.0-beta" ]
branches: [ "main", "2.x" ]
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -36,11 +36,11 @@ jobs:
run: bundle exec jekyll build --config '_config.yml' --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: development
- name: Build 3.x with Jekyll
- name: Build 2.x with Jekyll
# Outputs to the './_site' directory by default
run: |
cd .submodules/wiremock.org-3.x
bundle exec jekyll build --config '_config.yml,_config-3.x.yml' --baseurl "${{ steps.pages.outputs.base_path }}/3.x"
cd .submodules/wiremock.org-2.x
bundle exec jekyll build --config '../../_config.yml,../../_config-2.x.yml' --baseurl "${{ steps.pages.outputs.base_path }}/2.x"
env:
JEKYLL_ENV: development
# TODO: Uncomment when cleaned up (if ever)
Expand All @@ -52,5 +52,3 @@ jobs:
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v1


10 changes: 5 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ jobs:
run: bundle exec jekyll build --config '_config.yml' --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Build 3.x with Jekyll
- name: Build 2.x with Jekyll
# Outputs to the './_site' directory by default
run: |
cd .submodules/wiremock.org-3.x
bundle exec jekyll build --config '_config.yml,_config-3.x.yml' --baseurl "${{ steps.pages.outputs.base_path }}"
cd .submodules/wiremock.org-2.x
bundle exec jekyll build --config '../../_config.yml,../../_config-2.x.yml' --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Deploy 3.x to the website
# Outputs to the './_site' directory by default
run: |
ruby .scripts/merge-sitemaps.rb
mkdir _site/3.x
cp -R .submodules/wiremock.org-3.x/tmp/site_3x/* _site/3.x/
mkdir _site/2.x
cp -R .submodules/wiremock.org-2.x/tmp/site_2x/* _site/2.x/
env:
JEKYLL_ENV: production
# TODO: Uncomment when cleaned up (if ever)
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "website-3.0"]
path = .submodules/wiremock.org-3.x
[submodule "website-2.x"]
path = .submodules/wiremock.org-2.x
url = https://github.com/wiremock/wiremock.org.git
branch = 3.0.0-beta
branch = 2.x
1 change: 1 addition & 0 deletions .submodules/wiremock.org-2.x
Submodule wiremock.org-2.x added at b7b9a9
1 change: 0 additions & 1 deletion .submodules/wiremock.org-3.x
Submodule wiremock.org-3.x deleted from 72baa4
24 changes: 15 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@ Do not hesitate to ask there if you hit an obstacle.

## Key locations

### WireMock 3.x
### WireMock 3 docs

WireMock Java 3.x documentation (`wiremock.org/3.x`), including API specifications and other resources is located in the
[`3.0.0-beta` branch](https://github.com/wiremock/wiremock.org/tree/3.0.0-beta)
that i included as a submodule and build by the CD flow.
WireMock Java 3.x documentation, including API specifications and other resources is located in the
[`main` branch](https://github.com/wiremock/wiremock.org/tree/main).

### WireMock 2.x docs archive

WireMock Java 2.x documentation (`wiremock.org/2.x`) documentation archive,
including API specifications and other resources is located in the
[`2.x` branch](https://github.com/wiremock/wiremock.org/tree/2.x)
that is included as a submodule and build by the CD flow.
To update the documentation, submit pull requests against the branch,
and they will be included into the main release line.

Expand Down Expand Up @@ -69,14 +75,14 @@ The websites have slightly different layouts to help users navigate (links, head

Alternative baselines are managed in the `main` branch,
but the content comes from other Git branches.
For example, if the `3.x` baseline is a preview one...
For example, if the `4.x` baseline is a preview one...

- There is a branch in the repository, for example `3.0.0-beta` for `3.x`
- There is a `wiremorg.org/3.x` entry on the website.
- There is a branch in the repository, for example `4.x` for WireMock 4
- There is a `wiremorg.org/4.x` entry on the website.
It is included from the branch via Git submodules and packaging scripts in GitHub Actions
- For this version, there is a `_config-3.x.yml` file that defines configuration overrides for this version
- For this version, there is a `_config-4.x.yml` file that defines configuration overrides for this version
- To build and test the baseline on a local machine, one needs to include the overrides config file into `jekyll build` and `jekyll serve` commands.
For example, `bundle exec jekyll serve --config '_config.yml,_config-3.x.yml'`.
For example, `bundle exec jekyll serve --config '_config.yml,_config-4.x.yml'`.

## Checking for broken links

Expand Down
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
wdm (0.1.1)
webrick (1.8.1)

PLATFORMS
Expand All @@ -125,7 +126,8 @@ DEPENDENCIES
jemoji
json (~> 1.8.6)
nokogiri (>= 1.7.2)
wdm (~> 0.1.0)
webrick (~> 1.7)

BUNDLED WITH
2.3.8
2.4.10
6 changes: 6 additions & 0 deletions _config-2.x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
url: "https://wiremock.org/2.x"
destination: "./tmp/site_2x"
wiremock_version: 2.35.0
wiremock_archive_site: true
wiremock_baseline: 2.x
pageEditPrefix: https://github.com/wiremock/wiremock.org/edit/2.x/
7 changes: 0 additions & 7 deletions _config-3.x.yml

This file was deleted.

10 changes: 5 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ collections:
docs:
output: true
permalink: /docs/:path/
docs-3x:
docs-2x:
output: true
permalink: /docs/3.x/:path/
permalink: /docs/2.x/:path/

# HTML Compression
# - http://jch.penibelst.de/
Expand All @@ -234,9 +234,9 @@ compress_html:
ignore:
envs: development

wiremock_version: 2.35.0
wiremock_beta_version: 3.0.0-beta-15
wiremock_baseline: 2.x
wiremock_version: 3.0.0
#wiremock_beta_version: 3.0.0-beta-15
wiremock_baseline: 3.x
pageEditPrefix: https://github.com/wiremock/wiremock.org/edit/main/

community_slack:
Expand Down
6 changes: 3 additions & 3 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ main:
subnavLinks:
- name: "WireMock"
subnavLink: "/docs/"
- name: "WireMock 3.x (Preview)"
subnavLink: "/3.x/docs/"
wiremock_baseline: 3.x
- name: "Mock API Templates"
subnavLink: "/docs/mock-api-templates"
- name: "WireMock Cloud"
subnavLink: "https://docs.wiremock.io/getting-started/?utm_source=wiremock.org&utm_medium=masthead_doc-links&utm_campaign=2022_baseline"
- name: "External Resources"
subnavLink: "/external-resources"
- name: "WireMock 2.x (Archive)"
subnavLink: "/2.x/docs/"
wiremock_baseline: 3.x

- title: "Need Help?"
link: "/support"
Expand Down