Skip to content

Commit a551b3a

Browse files
Setup repository for draft-ietf-core-groupcomm-proxy using https://github.com/martinthomson/i-d-template
1 parent 06de1a7 commit a551b3a

13 files changed

+403
-1
lines changed

.circleci/config.yml

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
version: 2
2+
jobs:
3+
build:
4+
docker:
5+
- image: martinthomson/i-d-template:latest
6+
resource_class: small
7+
working_directory: ~/draft
8+
9+
steps:
10+
- run:
11+
name: "Print Configuration"
12+
command: |
13+
xml2rfc --version
14+
gem list -q kramdown-rfc
15+
echo -n 'mmark '; mmark --version
16+
17+
- restore_cache:
18+
name: "Restoring cache - Git"
19+
keys:
20+
- v2-cache-git-{{ .Branch }}-{{ .Revision }}
21+
- v2-cache-git-{{ .Branch }}
22+
- v2-cache-git-
23+
24+
- restore_cache:
25+
name: "Restoring cache - References"
26+
keys:
27+
- v1-cache-references-{{ epoch }}
28+
- v1-cache-references-
29+
30+
# Workaround for https://discuss.circleci.com/t/22437
31+
- run:
32+
name: Tag Checkout
33+
command: |
34+
if [ -n "$CIRCLE_TAG" ] && [ -d .git ]; then
35+
remote=$(echo "$CIRCLE_REPOSITORY_URL" | \
36+
sed -e 's,/^git.github.com:,https://github.com/,')
37+
git fetch -f "$remote" "refs/tags/$CIRCLE_TAG:refs/tags/$CIRCLE_TAG" || \
38+
(echo 'Removing .git cache for tag build'; rm -rf .git)
39+
fi
40+
41+
- checkout
42+
43+
# Build txt and html versions of drafts
44+
- run:
45+
name: "Build Drafts"
46+
command: make
47+
48+
# Update editor's copy on gh-pages
49+
- run:
50+
name: "Update GitHub Pages"
51+
command: |
52+
if [ "${CIRCLE_TAG#draft-}" == "$CIRCLE_TAG" ]; then
53+
make gh-pages
54+
fi
55+
56+
# For tagged builds, upload to the datatracker.
57+
- deploy:
58+
name: "Upload to Datatracker"
59+
command: |
60+
if [ "${CIRCLE_TAG#draft-}" != "$CIRCLE_TAG" ]; then
61+
make upload
62+
fi
63+
64+
# Archive GitHub Issues
65+
- run:
66+
name: "Archive GitHub Issues"
67+
command: "make archive || make archive DISABLE_ARCHIVE_FETCH=true && make gh-archive"
68+
69+
# Create and store artifacts
70+
- run:
71+
name: "Create Artifacts"
72+
command: "make artifacts CI_ARTIFACTS=/tmp/artifacts"
73+
74+
- store_artifacts:
75+
path: /tmp/artifacts
76+
77+
- run:
78+
name: "Prepare for Caching"
79+
command: "git reflog expire --expire=now --all && git gc --prune=now"
80+
81+
- save_cache:
82+
name: "Saving Cache - Git"
83+
key: v2-cache-git-{{ .Branch }}-{{ .Revision }}
84+
paths:
85+
- ~/draft/.git
86+
87+
- save_cache:
88+
name: "Saving Cache - Drafts"
89+
key: v1-cache-references-{{ epoch }}
90+
paths:
91+
- ~/.cache/xml2rfc
92+
93+
94+
workflows:
95+
version: 2
96+
build:
97+
jobs:
98+
- build:
99+
filters:
100+
tags:
101+
only: /.*?/

.editorconfig

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# See http://editorconfig.org
2+
3+
root = true
4+
5+
[*.{md,xml,org}]
6+
charset = utf-8
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true

.github/CODEOWNERS

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Automatically generated CODEOWNERS
2+
# Regenerate with `make update-codeowners`
3+
draft-ietf-core-groupcomm-proxy.md [email protected] [email protected]

.github/workflows/archive.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "Archive Issues and Pull Requests"
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0,2,4'
6+
repository_dispatch:
7+
types: [archive]
8+
workflow_dispatch:
9+
inputs:
10+
archive_full:
11+
description: 'Recreate the archive from scratch'
12+
default: false
13+
type: boolean
14+
15+
jobs:
16+
build:
17+
name: "Archive Issues and Pull Requests"
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: "Checkout"
21+
uses: actions/checkout@v2
22+
23+
# Note: No caching for this build!
24+
25+
- name: "Update Archive"
26+
uses: martinthomson/i-d-template@v1
27+
env:
28+
ARCHIVE_FULL: ${{ inputs.archive_full }}
29+
with:
30+
make: archive
31+
token: ${{ github.token }}
32+
33+
- name: "Update GitHub Pages"
34+
uses: martinthomson/i-d-template@v1
35+
with:
36+
make: gh-archive
37+
token: ${{ github.token }}
38+
39+
- name: "Save Archive"
40+
uses: actions/upload-artifact@v3
41+
with:
42+
path: archive.json

.github/workflows/ghpages.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: "Update Editor's Copy"
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- README.md
7+
- CONTRIBUTING.md
8+
- LICENSE.md
9+
- .gitignore
10+
pull_request:
11+
paths-ignore:
12+
- README.md
13+
- CONTRIBUTING.md
14+
- LICENSE.md
15+
- .gitignore
16+
17+
jobs:
18+
build:
19+
name: "Update Editor's Copy"
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: "Checkout"
23+
uses: actions/checkout@v3
24+
25+
- name: "Setup"
26+
id: setup
27+
run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT"
28+
29+
- name: "Caching"
30+
uses: actions/cache@v3
31+
with:
32+
path: |
33+
.refcache
34+
.venv
35+
.gems
36+
node_modules
37+
.targets.mk
38+
key: i-d-${{ steps.setup.outputs.date }}
39+
restore-keys: i-d-
40+
41+
- name: "Build Drafts"
42+
uses: martinthomson/i-d-template@v1
43+
with:
44+
token: ${{ github.token }}
45+
46+
- name: "Update GitHub Pages"
47+
uses: martinthomson/i-d-template@v1
48+
if: ${{ github.event_name == 'push' }}
49+
with:
50+
make: gh-pages
51+
token: ${{ github.token }}
52+
53+
- name: "Archive Built Drafts"
54+
uses: actions/upload-artifact@v3
55+
with:
56+
path: |
57+
draft-*.html
58+
draft-*.txt

.github/workflows/publish.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: "Publish New Draft Version"
2+
3+
on:
4+
push:
5+
tags:
6+
- "draft-*"
7+
8+
jobs:
9+
build:
10+
name: "Publish New Draft Version"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: "Checkout"
14+
uses: actions/checkout@v3
15+
16+
# See https://github.com/actions/checkout/issues/290
17+
- name: "Get Tag Annotations"
18+
run: git fetch -f origin ${{ github.ref }}:${{ github.ref }}
19+
20+
- name: "Setup"
21+
id: setup
22+
run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT"
23+
24+
- name: "Caching"
25+
uses: actions/cache@v3
26+
with:
27+
path: |
28+
.refcache
29+
.venv
30+
.gems
31+
node_modules
32+
.targets.mk
33+
key: i-d-${{ steps.setup.outputs.date }}
34+
restore-keys: i-d-
35+
36+
- name: "Build Drafts"
37+
uses: martinthomson/i-d-template@v1
38+
with:
39+
token: ${{ github.token }}
40+
41+
- name: "Upload to Datatracker"
42+
uses: martinthomson/i-d-template@v1
43+
with:
44+
make: upload
45+
46+
- name: "Archive Submitted Drafts"
47+
uses: actions/upload-artifact@v3
48+
with:
49+
path: "versioned/draft-*-[0-9][0-9].*"

.github/workflows/update.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "Update Generated Files"
2+
# This rule is not run automatically.
3+
# It can be run manually to update all of the files that are part
4+
# of the template, specifically:
5+
# - README.md
6+
# - CONTRIBUTING.md
7+
# - .note.xml
8+
# - .github/CODEOWNERS
9+
# - Makefile
10+
#
11+
#
12+
# This might be useful if you have:
13+
# - added, removed, or renamed drafts (including after adoption)
14+
# - added, removed, or changed draft editors
15+
# - changed the title of drafts
16+
#
17+
# Note that this removes any customizations you have made to
18+
# the affected files.
19+
on: workflow_dispatch
20+
21+
jobs:
22+
build:
23+
name: "Update Files"
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: "Checkout"
27+
uses: actions/checkout@v2
28+
29+
- name: "Update Generated Files"
30+
uses: martinthomson/i-d-template@v1
31+
with:
32+
make: update-files
33+
token: ${{ github.token }}
34+
35+
- name: "Push Update"
36+
run: git push

.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
*~
2+
/*-[0-9][0-9].xml
3+
archive.json
4+
draft-ietf-core-groupcomm-proxy.xml
5+
Gemfile.lock
6+
/.gems/
7+
*.html
8+
/lib
9+
/node_modules/
10+
package-lock.json
11+
*.pdf
12+
*.redxml
13+
/.refcache
14+
report.xml
15+
*.swp
16+
.tags
17+
/.targets.mk
18+
*.txt
19+
*.upload
20+
/.venv/
21+
/versioned/
22+
/.vscode/
23+
!requirements.txt

.note.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<note title="Discussion Venues" removeInRFC="true">
2+
<t>Discussion of this document takes place on the
3+
Constrained RESTful Environments Working Group mailing list ([email protected]),
4+
which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/core/"/>.</t>
5+
<t>Source for this draft and an issue tracker can be found at
6+
<eref target="https://github.com/core-wg/groupcomm-proxy"/>.</t>
7+
</note>

CONTRIBUTING.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Contributing
2+
3+
This repository relates to activities in the Internet Engineering Task Force
4+
([IETF](https://www.ietf.org/)). All material in this repository is considered
5+
Contributions to the IETF Standards Process, as defined in the intellectual
6+
property policies of IETF currently designated as
7+
[BCP 78](https://www.rfc-editor.org/info/bcp78),
8+
[BCP 79](https://www.rfc-editor.org/info/bcp79) and the
9+
[IETF Trust Legal Provisions (TLP) Relating to IETF Documents](http://trustee.ietf.org/trust-legal-provisions.html).
10+
11+
Any edit, commit, pull request, issue, comment or other change made to this
12+
repository constitutes Contributions to the IETF Standards Process
13+
(https://www.ietf.org/).
14+
15+
You agree to comply with all applicable IETF policies and procedures, including,
16+
BCP 78, 79, the TLP, and the TLP rules regarding code components (e.g. being
17+
subject to a Simplified BSD License) in Contributions.
18+
## Working Group Information
19+
20+
Discussion of this work occurs on the [Constrained RESTful Environments
21+
Working Group mailing list](mailto:[email protected])
22+
([archive](https://mailarchive.ietf.org/arch/browse/core/),
23+
[subscribe](https://www.ietf.org/mailman/listinfo/core)).
24+
In addition to contributions in GitHub, you are encouraged to participate in
25+
discussions there.
26+
27+
**Note**: Some working groups adopt a policy whereby substantive discussion of
28+
technical issues needs to occur on the mailing list.
29+
30+
You might also like to familiarize yourself with other
31+
[Working Group documents](https://datatracker.ietf.org/wg/core/documents/).

LICENSE.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# License
2+
3+
See the
4+
[guidelines for contributions](https://github.com/core-wg/groupcomm-proxy/blob/main/CONTRIBUTING.md).

Makefile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
LIBDIR := lib
2+
include $(LIBDIR)/main.mk
3+
4+
$(LIBDIR)/main.mk:
5+
ifneq (,$(shell grep "path *= *$(LIBDIR)" .gitmodules 2>/dev/null))
6+
git submodule sync
7+
git submodule update $(CLONE_ARGS) --init
8+
else
9+
git clone -q --depth 10 $(CLONE_ARGS) \
10+
-b main https://github.com/martinthomson/i-d-template $(LIBDIR)
11+
endif

0 commit comments

Comments
 (0)