Switch to using webhook_bridge instead of lighthouse for triggering the CI.

This commit is contained in:
Tom Alexander 2024-09-29 22:31:22 -04:00
parent 841a348dd0
commit c6cde8db74
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
12 changed files with 188 additions and 205 deletions

View File

@ -1,39 +0,0 @@
apiVersion: config.lighthouse.jenkins-x.io/v1alpha1
kind: TriggerConfig
spec:
postsubmits:
- name: rust-test
source: "pipeline-rust-test.yaml"
# Override https-based url from lighthouse events.
clone_uri: "git@code.fizz.buzz:talexander/organic.git"
branches:
- ^main$
- ^master$
- name: rust-foreign-document-test
source: "pipeline-foreign-document-test.yaml"
# Override https-based url from lighthouse events.
clone_uri: "git@code.fizz.buzz:talexander/organic.git"
branches:
- ^main$
- ^master$
- name: build-organic
source: "pipeline-build-organic.yaml"
# Override https-based url from lighthouse events.
clone_uri: "git@code.fizz.buzz:talexander/organic.git"
branches:
- ^main$
- ^master$
- name: clippy
source: "pipeline-rust-clippy.yaml"
# Override https-based url from lighthouse events.
clone_uri: "git@code.fizz.buzz:talexander/organic.git"
skip_branches:
# We already run on every commit, so running when the semver tags get pushed is causing needless double-processing.
- "^v[0-9]+\\.[0-9]+\\.[0-9]+$"
- name: format
source: "pipeline-format.yaml"
# Override https-based url from lighthouse events.
clone_uri: "git@code.fizz.buzz:talexander/organic.git"
skip_branches:
# We already run on every commit, so running when the semver tags get pushed is causing needless double-processing.
- "^v[0-9]+\\.[0-9]+\\.[0-9]+$"

View File

@ -1,13 +1,22 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: build-organic
name: build
spec:
timeouts:
pipeline: "2h0m0s"
tasks: "1h0m0s"
finally: "0h30m0s"
taskRunTemplate:
serviceAccountName: build-bot
pipelineSpec:
params:
- name: image-name
description: The name for the built image
type: string
- name: target-name
description: The dockerfile target to build
type: string
- name: path-to-image-context
description: The path to the build context
type: string
@ -20,13 +29,11 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml
runAfter:
- fetch-repository
params:
- name: CONTEXT
value: "$(params.JOB_NAME)"
@ -35,7 +42,7 @@ spec:
- name: GITEA_HOST_URL
value: code.fizz.buzz
- name: SHA
value: $(tasks.fetch-repository.results.commit)
value: "$(tasks.fetch-repository.results.commit)"
- name: DESCRIPTION
value: "Build $(params.JOB_NAME) has started"
- name: STATE
@ -47,7 +54,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -67,7 +74,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -83,7 +90,8 @@ spec:
value: "gcr.io/kaniko-project/executor:v1.12.1"
- name: EXTRA_ARGS
value:
- --target=wasm
- "--destination=$(params.image-name)" # Also write the :latest image
- "--target=$(params.target-name)"
- --cache=true
- --cache-copy-layers
- --cache-repo=harbor.fizz.buzz/kanikocache/cache
@ -97,8 +105,6 @@ spec:
workspace: git-source
- name: dockerconfig
workspace: docker-credentials
runAfter:
- fetch-repository
#############
- name: run-image-none
taskSpec:
@ -525,7 +531,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -554,7 +560,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -652,11 +658,11 @@ spec:
- name: docker-credentials
secret:
secretName: harbor-plain
serviceAccountName: build-bot
timeout: 240h0m0s
params:
- name: image-name
value: "harbor.fizz.buzz/private/organic-development-wasm"
- name: target-name
value: "wasm"
- name: path-to-image-context
value: .
- name: path-to-dockerfile

View File

@ -1,17 +1,22 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: rust-foreign-document-test
name: foreign-document-test
spec:
timeouts:
pipeline: "2h0m0s"
tasks: "1h0m40s"
finally: "0h30m0s"
taskRunTemplate:
serviceAccountName: build-bot
pipelineSpec:
timeouts:
pipeline: "2h0m0s"
tasks: "1h0m40s"
finally: "0h30m0s"
params:
- name: image-name
description: The name for the built image
type: string
- name: target-name
description: The dockerfile target to build
type: string
- name: path-to-image-context
description: The path to the build context
type: string
@ -19,35 +24,16 @@ spec:
description: The path to the Dockerfile
type: string
tasks:
- name: do-stuff
taskSpec:
metadata: {}
stepTemplate:
image: alpine:3.18
name: ""
resources:
requests:
cpu: 10m
memory: 60Mi
workingDir: /workspace/source
steps:
- image: alpine:3.18
name: do-stuff-step
script: |
#!/usr/bin/env sh
echo "hello world"
- name: report-pending
taskRef:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml
runAfter:
- fetch-repository
params:
- name: CONTEXT
value: "$(params.JOB_NAME)"
@ -68,7 +54,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -88,7 +74,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -104,7 +90,7 @@ spec:
value: "gcr.io/kaniko-project/executor:v1.12.1"
- name: EXTRA_ARGS
value:
- --target=foreign-document
- "--target=$(params.target-name)"
- --cache=true
- --cache-copy-layers
- --cache-repo=harbor.fizz.buzz/kanikocache/cache
@ -118,8 +104,6 @@ spec:
workspace: git-source
- name: dockerconfig
workspace: docker-credentials
runAfter:
- fetch-repository
- name: run-test
taskSpec:
metadata: {}
@ -127,14 +111,13 @@ spec:
- name: docker-image
type: string
description: Docker image to run.
default: alpine:3.18
default: alpine:3.20
stepTemplate:
image: alpine:3.18
name: ""
resources:
image: alpine:3.20
computeResources:
requests:
cpu: 10m
memory: 60Mi
memory: 600Mi
workingDir: /workspace/source
workspaces:
- name: source
@ -169,7 +152,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -198,7 +181,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -225,14 +208,13 @@ spec:
- name: docker-image
type: string
description: Docker image to run.
default: alpine:3.18
default: alpine:3.20
stepTemplate:
image: alpine:3.18
name: ""
resources:
image: alpine:3.20
computeResources:
requests:
cpu: 10m
memory: 60Mi
memory: 600Mi
workingDir: /workspace/source
workspaces:
- name: source
@ -275,10 +257,11 @@ spec:
- name: docker-credentials
secret:
secretName: harbor-plain
serviceAccountName: build-bot
params:
- name: image-name
value: "harbor.fizz.buzz/private/organic-test-foreign-document"
- name: target-name
value: "foreign-document"
- name: path-to-image-context
value: docker/organic_test/
- name: path-to-dockerfile

View File

@ -1,17 +1,22 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: rust-format
spec:
timeouts:
pipeline: "2h0m0s"
tasks: "1h0m0s"
finally: "0h30m0s"
taskRunTemplate:
serviceAccountName: build-bot
pipelineSpec:
timeouts:
pipeline: "2h0m0s"
tasks: "1h0m40s"
finally: "0h30m0s"
params:
- name: image-name
description: The name for the built image
type: string
- name: target-name
description: The dockerfile target to build
type: string
- name: path-to-image-context
description: The path to the build context
type: string
@ -24,13 +29,11 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml
runAfter:
- fetch-repository
params:
- name: CONTEXT
value: "$(params.JOB_NAME)"
@ -51,7 +54,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -71,7 +74,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -87,7 +90,7 @@ spec:
value: "gcr.io/kaniko-project/executor:v1.12.1"
- name: EXTRA_ARGS
value:
- --target=format
- "--target=$(params.target-name)"
- --cache=true
- --cache-copy-layers
- --cache-repo=harbor.fizz.buzz/kanikocache/cache
@ -101,8 +104,6 @@ spec:
workspace: git-source
- name: dockerconfig
workspace: docker-credentials
runAfter:
- fetch-repository
- name: run-cargo-fmt
taskSpec:
metadata: {}
@ -110,14 +111,13 @@ spec:
- name: docker-image
type: string
description: Docker image to run.
default: alpine:3.18
default: alpine:3.20
stepTemplate:
image: alpine:3.18
name: ""
resources:
image: alpine:3.20
computeResources:
requests:
cpu: 10m
memory: 60Mi
memory: 600Mi
workingDir: /workspace/source
workspaces:
- name: source
@ -149,7 +149,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -185,7 +185,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -214,7 +214,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -241,14 +241,13 @@ spec:
- name: docker-image
type: string
description: Docker image to run.
default: alpine:3.18
default: alpine:3.20
stepTemplate:
image: alpine:3.18
name: ""
resources:
image: alpine:3.20
computeResources:
requests:
cpu: 10m
memory: 60Mi
memory: 600Mi
workingDir: /workspace/source
workspaces:
- name: source
@ -291,10 +290,11 @@ spec:
- name: docker-credentials
secret:
secretName: harbor-plain
serviceAccountName: build-bot
params:
- name: image-name
value: "harbor.fizz.buzz/private/organic-development-format"
- name: target-name
value: "format"
- name: path-to-image-context
value: docker/organic_development/
- name: path-to-dockerfile

View File

@ -1,17 +1,22 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: rust-clippy
spec:
taskRunTemplate:
serviceAccountName: build-bot
timeouts:
pipeline: "2h0m0s"
tasks: "1h0m40s"
finally: "0h30m0s"
pipelineSpec:
timeouts:
pipeline: "2h0m0s"
tasks: "1h0m40s"
finally: "0h30m0s"
params:
- name: image-name
description: The name for the built image
type: string
- name: target-name
description: The dockerfile target to build
type: string
- name: path-to-image-context
description: The path to the build context
type: string
@ -24,13 +29,11 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml
runAfter:
- fetch-repository
params:
- name: CONTEXT
value: "$(params.JOB_NAME)"
@ -51,7 +54,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -71,7 +74,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -87,7 +90,7 @@ spec:
value: "gcr.io/kaniko-project/executor:v1.12.1"
- name: EXTRA_ARGS
value:
- --target=clippy
- "--target=$(params.target-name)"
- --cache=true
- --cache-copy-layers
- --cache-repo=harbor.fizz.buzz/kanikocache/cache
@ -101,8 +104,6 @@ spec:
workspace: git-source
- name: dockerconfig
workspace: docker-credentials
runAfter:
- fetch-repository
- name: run-cargo-clippy
taskSpec:
metadata: {}
@ -110,14 +111,13 @@ spec:
- name: docker-image
type: string
description: Docker image to run.
default: alpine:3.18
default: alpine:3.20
stepTemplate:
image: alpine:3.18
name: ""
resources:
image: alpine:3.20
computeResources:
requests:
cpu: 10m
memory: 60Mi
memory: 600Mi
workingDir: /workspace/source
workspaces:
- name: source
@ -164,7 +164,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -193,7 +193,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -220,14 +220,13 @@ spec:
- name: docker-image
type: string
description: Docker image to run.
default: alpine:3.18
default: alpine:3.20
stepTemplate:
image: alpine:3.18
name: ""
resources:
image: alpine:3.20
computeResources:
requests:
cpu: 10m
memory: 60Mi
memory: 600Mi
workingDir: /workspace/source
workspaces:
- name: source
@ -270,10 +269,11 @@ spec:
- name: docker-credentials
secret:
secretName: harbor-plain
serviceAccountName: build-bot
params:
- name: image-name
value: "harbor.fizz.buzz/private/organic-development-clippy"
- name: target-name
value: "clippy"
- name: path-to-image-context
value: docker/organic_development/
- name: path-to-dockerfile

View File

@ -1,17 +1,22 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: rust-test
spec:
timeouts:
pipeline: "2h0m0s"
tasks: "1h0m40s"
finally: "0h30m0s"
taskRunTemplate:
serviceAccountName: build-bot
pipelineSpec:
timeouts:
pipeline: "2h0m0s"
tasks: "1h0m40s"
finally: "0h30m0s"
params:
- name: image-name
description: The name for the built image
type: string
- name: target-name
description: The dockerfile target to build
type: string
- name: path-to-image-context
description: The path to the build context
type: string
@ -19,35 +24,16 @@ spec:
description: The path to the Dockerfile
type: string
tasks:
- name: do-stuff
taskSpec:
metadata: {}
stepTemplate:
image: alpine:3.18
name: ""
resources:
requests:
cpu: 10m
memory: 60Mi
workingDir: /workspace/source
steps:
- image: alpine:3.18
name: do-stuff-step
script: |
#!/usr/bin/env sh
echo "hello world"
- name: report-pending
taskRef:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml
runAfter:
- fetch-repository
params:
- name: CONTEXT
value: "$(params.JOB_NAME)"
@ -68,7 +54,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -88,7 +74,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -104,7 +90,7 @@ spec:
value: "gcr.io/kaniko-project/executor:v1.12.1"
- name: EXTRA_ARGS
value:
- --target=tester
- "--target=$(params.target-name)"
- --cache=true
- --cache-copy-layers
- --cache-repo=harbor.fizz.buzz/kanikocache/cache
@ -118,23 +104,20 @@ spec:
workspace: git-source
- name: dockerconfig
workspace: docker-credentials
runAfter:
- fetch-repository
- name: run-test
- name: run-cargo-test
taskSpec:
metadata: {}
params:
- name: docker-image
type: string
description: Docker image to run.
default: alpine:3.18
default: alpine:3.20
stepTemplate:
image: alpine:3.18
name: ""
resources:
image: alpine:3.20
computeResources:
requests:
cpu: 10m
memory: 60Mi
memory: 600Mi
workingDir: /workspace/source
workspaces:
- name: source
@ -146,7 +129,7 @@ spec:
- name: run
image: $(params.docker-image)
workingDir: "$(workspaces.source.path)"
command: ["cargo", "test"]
command: [cargo, test]
args:
[
--no-default-features,
@ -180,7 +163,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -209,7 +192,7 @@ spec:
resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
@ -236,14 +219,13 @@ spec:
- name: docker-image
type: string
description: Docker image to run.
default: alpine:3.18
default: alpine:3.20
stepTemplate:
image: alpine:3.18
name: ""
resources:
image: alpine:3.20
computeResources:
requests:
cpu: 10m
memory: 60Mi
memory: 600Mi
workingDir: /workspace/source
workspaces:
- name: source
@ -286,10 +268,11 @@ spec:
- name: docker-credentials
secret:
secretName: harbor-plain
serviceAccountName: build-bot
params:
- name: image-name
value: "harbor.fizz.buzz/private/organic-test"
- name: target-name
value: "tester"
- name: path-to-image-context
value: docker/organic_test/
- name: path-to-dockerfile

View File

@ -0,0 +1,31 @@
version = "0.0.1"
[[push]]
name = "rust-test"
source = "pipeline-rust-test.yaml"
clone_uri = "git@code.fizz.buzz:talexander/organic.git"
skip_branches = [ "^v[0-9]+\\.[0-9]+\\.[0-9]+$" ]
[[push]]
name = "foreign-document-test"
source = "pipeline-foreign-document-test.yaml"
clone_uri = "git@code.fizz.buzz:talexander/organic.git"
branches = [ "^main$", "^master$" ]
[[push]]
name = "clippy"
source = "pipeline-rust-clippy.yaml"
clone_uri = "git@code.fizz.buzz:talexander/organic.git"
skip_branches = [ "^v[0-9]+\\.[0-9]+\\.[0-9]+$" ]
[[push]]
name = "format"
source = "pipeline-format.yaml"
clone_uri = "git@code.fizz.buzz:talexander/organic.git"
skip_branches = [ "^v[0-9]+\\.[0-9]+\\.[0-9]+$" ]
[[push]]
name = "build"
source = "pipeline-build-hash.yaml"
clone_uri = "git@code.fizz.buzz:talexander/organic.git"
branches = [ "^main$", "^master$" ]

View File

@ -1,4 +1,4 @@
FROM rustlang/rust:nightly-alpine3.19 AS builder
FROM rustlang/rust:nightly-alpine3.20 AS builder
RUN apk add --no-cache musl-dev
RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache

View File

@ -1,10 +1,22 @@
FROM alpine:3.19 AS build
# ARG EMACS_REPO=https://git.savannah.gnu.org/git/emacs.git
ARG EMACS_REPO=https://code.fizz.buzz/mirror/emacs.git
ARG EMACS_VERSION=emacs-29.1
# ARG ORG_MODE_REPO=https://git.savannah.gnu.org/git/emacs/org-mode.git
ARG ORG_MODE_REPO=https://code.fizz.buzz/mirror/org-mode.git
ARG ORG_VERSION=abf5156096c06ee5aa05795c3dc5a065f76ada97
FROM alpine:3.20 AS build
RUN apk add --no-cache build-base musl-dev git autoconf make texinfo gnutls-dev ncurses-dev gawk libgccjit-dev
FROM build AS build-emacs
ARG EMACS_VERSION=emacs-29.1
RUN git clone --depth 1 --branch $EMACS_VERSION https://git.savannah.gnu.org/git/emacs.git /root/emacs
ARG EMACS_VERSION
ARG EMACS_REPO
RUN git clone --depth 1 --branch $EMACS_VERSION $EMACS_REPO /root/emacs
WORKDIR /root/emacs
RUN mkdir /root/dist
RUN ./autogen.sh
@ -14,18 +26,19 @@ RUN make DESTDIR="/root/dist" install
FROM build AS build-org-mode
ARG ORG_VERSION=abf5156096c06ee5aa05795c3dc5a065f76ada97
ARG ORG_VERSION
ARG ORG_MODE_REPO
COPY --from=build-emacs /root/dist/ /
RUN mkdir /root/dist
# Savannah does not allow fetching specific revisions, so we're going to have to put unnecessary load on their server by cloning main and then checking out the revision we want.
RUN git clone https://git.savannah.gnu.org/git/emacs/org-mode.git /root/org-mode && git -C /root/org-mode checkout $ORG_VERSION
# RUN mkdir /root/org-mode && git -C /root/org-mode init --initial-branch=main && git -C /root/org-mode remote add origin https://git.savannah.gnu.org/git/emacs/org-mode.git && git -C /root/org-mode fetch origin $ORG_VERSION && git -C /root/org-mode checkout FETCH_HEAD
RUN git clone $ORG_MODE_REPO /root/org-mode && git -C /root/org-mode checkout $ORG_VERSION
# RUN mkdir /root/org-mode && git -C /root/org-mode init --initial-branch=main && git -C /root/org-mode remote add origin $ORG_REPO && git -C /root/org-mode fetch origin $ORG_VERSION && git -C /root/org-mode checkout FETCH_HEAD
WORKDIR /root/org-mode
RUN make compile
RUN make DESTDIR="/root/dist" install
FROM rustlang/rust:nightly-alpine3.19 AS tester
FROM rustlang/rust:nightly-alpine3.20 AS tester
ENV LANG=en_US.UTF-8
RUN apk add --no-cache musl-dev ncurses gnutls libgccjit
RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache

View File

@ -1,7 +1,6 @@
#![feature(exit_status_error)]
#![feature(trait_alias)]
#![feature(path_file_prefix)]
#![feature(is_sorted)]
#![feature(test)]
#![feature(iter_intersperse)]
#![feature(exact_size_is_empty)]

View File

@ -47,6 +47,7 @@ pub struct Section<'s> {
}
#[derive(Debug)]
#[allow(clippy::large_enum_variant)]
pub enum DocumentElement<'s> {
Heading(Heading<'s>),
Section(Section<'s>),

View File

@ -2,6 +2,7 @@
{expect_fail}
#[tokio::test]
#[allow(clippy::needless_return)]
async fn autogen_default_{name}() -> Result<(), Box<dyn std::error::Error>> {{
let org_path = "{path}";
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
@ -11,6 +12,7 @@ async fn autogen_default_{name}() -> Result<(), Box<dyn std::error::Error>> {{
{expect_fail}
#[tokio::test]
#[allow(clippy::needless_return)]
async fn autogen_la_{name}() -> Result<(), Box<dyn std::error::Error>> {{
let org_path = "{path}";
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
@ -24,6 +26,7 @@ async fn autogen_la_{name}() -> Result<(), Box<dyn std::error::Error>> {{
{expect_fail}
#[tokio::test]
#[allow(clippy::needless_return)]
async fn autogen_t1_{name}() -> Result<(), Box<dyn std::error::Error>> {{
let org_path = "{path}";
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
@ -37,6 +40,7 @@ async fn autogen_t1_{name}() -> Result<(), Box<dyn std::error::Error>> {{
{expect_fail}
#[tokio::test]
#[allow(clippy::needless_return)]
async fn autogen_t16_{name}() -> Result<(), Box<dyn std::error::Error>> {{
let org_path = "{path}";
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
@ -50,6 +54,7 @@ async fn autogen_t16_{name}() -> Result<(), Box<dyn std::error::Error>> {{
{expect_fail}
#[tokio::test]
#[allow(clippy::needless_return)]
async fn autogen_odd_{name}() -> Result<(), Box<dyn std::error::Error>> {{
let org_path = "{path}";
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
@ -64,6 +69,7 @@ async fn autogen_odd_{name}() -> Result<(), Box<dyn std::error::Error>> {{
#[cfg(feature = "wasm_test")]
{expect_fail}
#[tokio::test]
#[allow(clippy::needless_return)]
async fn autogen_wasm_{name}() -> Result<(), Box<dyn std::error::Error>> {{
let org_path = "{path}";
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");