diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..bd1e77cb --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,101 @@ +version: 2 +jobs: + build: + docker: + - image: martinthomson/i-d-template:latest + resource_class: small + working_directory: ~/draft + + steps: + - run: + name: "Print Configuration" + command: | + xml2rfc --version + gem list -q kramdown-rfc + echo -n 'mmark '; mmark --version + + - restore_cache: + name: "Restoring cache - Git" + keys: + - v2-cache-git-{{ .Branch }}-{{ .Revision }} + - v2-cache-git-{{ .Branch }} + - v2-cache-git- + + - restore_cache: + name: "Restoring cache - References" + keys: + - v1-cache-references-{{ epoch }} + - v1-cache-references- + + # Workaround for https://discuss.circleci.com/t/22437 + - run: + name: Tag Checkout + command: | + if [ -n "$CIRCLE_TAG" ] && [ -d .git ]; then + remote=$(echo "$CIRCLE_REPOSITORY_URL" | \ + sed -e 's,/^git.github.com:,https://github.com/,') + git fetch -f "$remote" "refs/tags/$CIRCLE_TAG:refs/tags/$CIRCLE_TAG" || \ + (echo 'Removing .git cache for tag build'; rm -rf .git) + fi + + - checkout + + # Build txt and html versions of drafts + - run: + name: "Build Drafts" + command: make + + # Update editor's copy on gh-pages + - run: + name: "Update GitHub Pages" + command: | + if [ "${CIRCLE_TAG#draft-}" == "$CIRCLE_TAG" ]; then + make gh-pages + fi + + # For tagged builds, upload to the datatracker. + - deploy: + name: "Upload to Datatracker" + command: | + if [ "${CIRCLE_TAG#draft-}" != "$CIRCLE_TAG" ]; then + make upload + fi + + # Archive GitHub Issues + - run: + name: "Archive GitHub Issues" + command: "make archive || make archive DISABLE_ARCHIVE_FETCH=true && make gh-archive" + + # Create and store artifacts + - run: + name: "Create Artifacts" + command: "make artifacts CI_ARTIFACTS=/tmp/artifacts" + + - store_artifacts: + path: /tmp/artifacts + + - run: + name: "Prepare for Caching" + command: "git reflog expire --expire=now --all && git gc --prune=now" + + - save_cache: + name: "Saving Cache - Git" + key: v2-cache-git-{{ .Branch }}-{{ .Revision }} + paths: + - ~/draft/.git + + - save_cache: + name: "Saving Cache - Drafts" + key: v1-cache-references-{{ epoch }} + paths: + - ~/.cache/xml2rfc + + +workflows: + version: 2 + build: + jobs: + - build: + filters: + tags: + only: /.*?/ diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..8682023d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +# See http://editorconfig.org + +root = true + +[*.{md,xml,org}] +charset = utf-8 +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..e6ad8e5b --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,3 @@ +# Automatically generated CODEOWNERS +# Regenerate with `make update-codeowners` +draft-ietf-scitt-architecture.md henk.birkholz@sit.fraunhofer.de antdl@microsoft.com fournet@microsoft.com yogesh.deshpande@arm.com diff --git a/.github/workflows/archive.yml b/.github/workflows/archive.yml new file mode 100644 index 00000000..605b6423 --- /dev/null +++ b/.github/workflows/archive.yml @@ -0,0 +1,42 @@ +name: "Archive Issues and Pull Requests" + +on: + schedule: + - cron: '0 0 * * 0,2,4' + repository_dispatch: + types: [archive] + workflow_dispatch: + inputs: + archive_full: + description: 'Recreate the archive from scratch' + default: false + type: boolean + +jobs: + build: + name: "Archive Issues and Pull Requests" + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v2 + + # Note: No caching for this build! + + - name: "Update Archive" + uses: martinthomson/i-d-template@v1 + env: + ARCHIVE_FULL: ${{ inputs.archive_full }} + with: + make: archive + token: ${{ github.token }} + + - name: "Update GitHub Pages" + uses: martinthomson/i-d-template@v1 + with: + make: gh-archive + token: ${{ github.token }} + + - name: "Save Archive" + uses: actions/upload-artifact@v3 + with: + path: archive.json diff --git a/.github/workflows/ghpages.yml b/.github/workflows/ghpages.yml new file mode 100644 index 00000000..a26b9db7 --- /dev/null +++ b/.github/workflows/ghpages.yml @@ -0,0 +1,58 @@ +name: "Update Editor's Copy" + +on: + push: + paths-ignore: + - README.md + - CONTRIBUTING.md + - LICENSE.md + - .gitignore + pull_request: + paths-ignore: + - README.md + - CONTRIBUTING.md + - LICENSE.md + - .gitignore + +jobs: + build: + name: "Update Editor's Copy" + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v3 + + - name: "Setup" + id: setup + run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT" + + - name: "Caching" + uses: actions/cache@v3 + with: + path: | + .refcache + .venv + .gems + node_modules + .targets.mk + key: i-d-${{ steps.setup.outputs.date }} + restore-keys: i-d- + + - name: "Build Drafts" + uses: martinthomson/i-d-template@v1 + with: + token: ${{ github.token }} + + - name: "Update GitHub Pages" + uses: martinthomson/i-d-template@v1 + if: ${{ github.event_name == 'push' }} + with: + make: gh-pages + token: ${{ github.token }} + + - name: "Archive Built Drafts" + uses: actions/upload-artifact@v3 + with: + path: | + draft-*.html + draft-*.txt diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..8e01218e --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,49 @@ +name: "Publish New Draft Version" + +on: + push: + tags: + - "draft-*" + +jobs: + build: + name: "Publish New Draft Version" + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v3 + + # See https://github.com/actions/checkout/issues/290 + - name: "Get Tag Annotations" + run: git fetch -f origin ${{ github.ref }}:${{ github.ref }} + + - name: "Setup" + id: setup + run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT" + + - name: "Caching" + uses: actions/cache@v3 + with: + path: | + .refcache + .venv + .gems + node_modules + .targets.mk + key: i-d-${{ steps.setup.outputs.date }} + restore-keys: i-d- + + - name: "Build Drafts" + uses: martinthomson/i-d-template@v1 + with: + token: ${{ github.token }} + + - name: "Upload to Datatracker" + uses: martinthomson/i-d-template@v1 + with: + make: upload + + - name: "Archive Submitted Drafts" + uses: actions/upload-artifact@v3 + with: + path: "versioned/draft-*-[0-9][0-9].*" diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 00000000..7a670078 --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,36 @@ +name: "Update Generated Files" +# This rule is not run automatically. +# It can be run manually to update all of the files that are part +# of the template, specifically: +# - README.md +# - CONTRIBUTING.md +# - .note.xml +# - .github/CODEOWNERS +# - Makefile +# +# +# This might be useful if you have: +# - added, removed, or renamed drafts (including after adoption) +# - added, removed, or changed draft editors +# - changed the title of drafts +# +# Note that this removes any customizations you have made to +# the affected files. +on: workflow_dispatch + +jobs: + build: + name: "Update Files" + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v2 + + - name: "Update Generated Files" + uses: martinthomson/i-d-template@v1 + with: + make: update-files + token: ${{ github.token }} + + - name: "Push Update" + run: git push diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..aabcd09f --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +*~ +/*-[0-9][0-9].xml +archive.json +draft-ietf-scitt-architecture.xml +Gemfile.lock +/.gems/ +*.html +/lib +/node_modules/ +package-lock.json +*.pdf +*.redxml +/.refcache +report.xml +*.swp +.tags +/.targets.mk +*.txt +*.upload +/.venv/ +/versioned/ +/.vscode/ +!requirements.txt diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..950e482d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,17 @@ +# Contributing + +This repository relates to activities in the Internet Engineering Task Force +([IETF](https://www.ietf.org/)). All material in this repository is considered +Contributions to the IETF Standards Process, as defined in the intellectual +property policies of IETF currently designated as +[BCP 78](https://www.rfc-editor.org/info/bcp78), +[BCP 79](https://www.rfc-editor.org/info/bcp79) and the +[IETF Trust Legal Provisions (TLP) Relating to IETF Documents](http://trustee.ietf.org/trust-legal-provisions.html). + +Any edit, commit, pull request, issue, comment or other change made to this +repository constitutes Contributions to the IETF Standards Process +(https://www.ietf.org/). + +You agree to comply with all applicable IETF policies and procedures, including, +BCP 78, 79, the TLP, and the TLP rules regarding code components (e.g. being +subject to a Simplified BSD License) in Contributions. diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..129c2c11 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,4 @@ +# License + +See the +[guidelines for contributions](https://github.com/ietf-wg-scitt/draft-ietf-scitt-architecture/blob/main/CONTRIBUTING.md). diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..de46d564 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +LIBDIR := lib +include $(LIBDIR)/main.mk + +$(LIBDIR)/main.mk: +ifneq (,$(shell grep "path *= *$(LIBDIR)" .gitmodules 2>/dev/null)) + git submodule sync + git submodule update $(CLONE_ARGS) --init +else + git clone -q --depth 10 $(CLONE_ARGS) \ + -b main https://github.com/martinthomson/i-d-template $(LIBDIR) +endif diff --git a/README.md b/README.md index 524c422f..5c3cf8e4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,30 @@ -# draft-ietf-scitt-architecture -An Architecture for Trustworthy Digital Supply Chain Transparency Services +# An Architecture for Trustworthy and Transparent Digital Supply Chains + +This is the working area for the IETF [SCITT Working Group](https://datatracker.ietf.org/wg/scitt/documents/) Internet-Draft, "An Architecture for Trustworthy and Transparent Digital Supply Chains". + +* [Editor's Copy](https://ietf-wg-scitt.github.io/draft-ietf-scitt-architecture/#go.draft-ietf-scitt-architecture.html) +* [Datatracker Page](https://datatracker.ietf.org/doc/draft-ietf-scitt-architecture) +* [Working Group Draft](https://datatracker.ietf.org/doc/html/draft-ietf-scitt-architecture) +* [Compare Editor's Copy to Working Group Draft](https://ietf-wg-scitt.github.io/draft-ietf-scitt-architecture/#go.draft-ietf-scitt-architecture.diff) + + +## Contributing + +See the +[guidelines for contributions](https://github.com/ietf-wg-scitt/draft-ietf-scitt-architecture/blob/main/CONTRIBUTING.md). + +Contributions can be made by creating pull requests. +The GitHub interface supports creating pull requests using the Edit (✏) button. + + +## Command Line Usage + +Formatted text and HTML versions of the draft can be built using `make`. + +```sh +$ make +``` + +Command line usage requires that you have the necessary software installed. See +[the instructions](https://github.com/martinthomson/i-d-template/blob/main/doc/SETUP.md). +