Compare commits
24 Commits
841a348dd0
...
no_add
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99f97874ea
|
||
|
|
6c3df1d4cd
|
||
|
|
336b5d3d54
|
||
|
|
cef89303b1
|
||
|
|
842a77fb2b
|
||
|
|
957bb3a5c8
|
||
|
|
de6739f9b6
|
||
|
|
656e26e26f
|
||
|
|
49fbb17672
|
||
|
|
8c8152bbfc
|
||
|
|
3a84926d9f
|
||
|
|
0b125fc88e
|
||
|
|
27342b0a44
|
||
|
|
76ecd25002
|
||
|
|
482d5ecfa3 | ||
|
|
84b8ddb582 | ||
|
|
113bb5888a | ||
|
|
bf5fe6920b | ||
|
|
4b52ed0d2a | ||
|
|
d2c558ccfa | ||
|
|
a01f78b510 | ||
|
|
d80b473fae | ||
|
|
e6b4bc3d94 | ||
|
|
c6cde8db74 |
@@ -3,3 +3,4 @@ target
|
||||
Cargo.lock
|
||||
notes/
|
||||
.lighthouse/
|
||||
/.webhook_bridge/
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,3 @@
|
||||
/target
|
||||
Cargo.lock
|
||||
TODO.org
|
||||
/result
|
||||
|
||||
@@ -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]+$"
|
||||
@@ -1,13 +1,24 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
apiVersion: tekton.dev/v1
|
||||
kind: PipelineRun
|
||||
metadata:
|
||||
name: build-organic
|
||||
name: build
|
||||
labels:
|
||||
pdb: protect
|
||||
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 +31,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 +44,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
|
||||
@@ -43,18 +52,6 @@ spec:
|
||||
- name: TARGET_URL
|
||||
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
|
||||
- name: fetch-repository
|
||||
taskRef:
|
||||
resolver: git
|
||||
params:
|
||||
- name: url
|
||||
value: https://github.com/tektoncd/catalog.git
|
||||
- name: revision
|
||||
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||
- name: pathInRepo
|
||||
value: task/git-clone/0.9/git-clone.yaml
|
||||
workspaces:
|
||||
- name: output
|
||||
workspace: git-source
|
||||
params:
|
||||
- name: url
|
||||
value: $(params.REPO_URL)
|
||||
@@ -62,36 +59,79 @@ spec:
|
||||
value: $(params.PULL_BASE_SHA)
|
||||
- name: deleteExisting
|
||||
value: "true"
|
||||
taskRef:
|
||||
params:
|
||||
- name: url
|
||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||
- name: revision
|
||||
value: "dda7b690195b43e8b9859d1caf5dcbf48588ade1"
|
||||
- name: pathInRepo
|
||||
value: task/git-clone/0.1/git-clone.yaml
|
||||
resolver: git
|
||||
workspaces:
|
||||
- name: output
|
||||
workspace: git-source
|
||||
- name: get-git-commit-time
|
||||
taskSpec:
|
||||
metadata: {}
|
||||
stepTemplate:
|
||||
image: alpine:3.20
|
||||
computeResources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 600Mi
|
||||
workingDir: "$(workspaces.repo.path)"
|
||||
results:
|
||||
- name: unix-time
|
||||
description: The time of the git commit in unix timestamp format.
|
||||
steps:
|
||||
- image: alpine/git:v2.34.2
|
||||
name: detect-tag-step
|
||||
script: |
|
||||
#!/usr/bin/env sh
|
||||
set -euo pipefail
|
||||
echo -n "$(git log -1 --pretty=%ct)" | tee $(results.unix-time.path)
|
||||
workspaces:
|
||||
- name: repo
|
||||
workspace: git-source
|
||||
runAfter:
|
||||
- fetch-repository
|
||||
- name: build-image
|
||||
taskRef:
|
||||
resolver: git
|
||||
params:
|
||||
- name: url
|
||||
value: https://github.com/tektoncd/catalog.git
|
||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||
- name: revision
|
||||
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
|
||||
- name: pathInRepo
|
||||
value: task/kaniko/0.6/kaniko.yaml
|
||||
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
||||
params:
|
||||
- name: IMAGE
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
- name: OUTPUT
|
||||
value: >-
|
||||
type=image,"name=$(params.image-name):latest,$(params.image-name):$(tasks.fetch-repository.results.commit)",push=true,compression=zstd,compression-level=22,oci-mediatypes=true
|
||||
- name: CONTEXT
|
||||
value: $(params.path-to-image-context)
|
||||
- name: DOCKERFILE
|
||||
value: $(params.path-to-dockerfile)
|
||||
- name: BUILDER_IMAGE
|
||||
value: "gcr.io/kaniko-project/executor:v1.12.1"
|
||||
- name: EXTRA_ARGS
|
||||
value:
|
||||
- --target=wasm
|
||||
- --cache=true
|
||||
- --cache-copy-layers
|
||||
- --cache-repo=harbor.fizz.buzz/kanikocache/cache
|
||||
- --use-new-run # Should result in a speed-up
|
||||
- --reproducible # To remove timestamps so layer caching works.
|
||||
- --snapshot-mode=redo
|
||||
- --skip-unused-stages=true
|
||||
- --registry-mirror=dockerhub.dockerhub.svc.cluster.local
|
||||
- "--opt"
|
||||
- "target=$(params.target-name)"
|
||||
- --import-cache
|
||||
- "type=registry,ref=$(params.image-name):buildcache"
|
||||
- --export-cache
|
||||
- "type=registry,ref=$(params.image-name):buildcache,mode=max,compression=zstd,compression-level=22,rewrite-timestamp=true,image-manifest=true,oci-mediatypes=true"
|
||||
- --opt
|
||||
- build-arg:SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)
|
||||
- name: BUILDKITD_TOML
|
||||
value: |
|
||||
debug = true
|
||||
[registry."docker.io"]
|
||||
mirrors = ["dockerhub.dockerhub.svc.cluster.local"]
|
||||
[registry."dockerhub.dockerhub.svc.cluster.local"]
|
||||
http = true
|
||||
insecure = true
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -107,11 +147,10 @@ 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
|
||||
@@ -131,6 +170,8 @@ spec:
|
||||
env:
|
||||
- name: CARGO_TARGET_DIR
|
||||
value: /target
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -141,7 +182,7 @@ spec:
|
||||
- build-image
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
#############
|
||||
- name: run-image-tracing
|
||||
taskSpec:
|
||||
@@ -150,11 +191,10 @@ 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
|
||||
@@ -174,6 +214,8 @@ spec:
|
||||
env:
|
||||
- name: CARGO_TARGET_DIR
|
||||
value: /target
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -184,7 +226,7 @@ spec:
|
||||
- run-image-none
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
#############
|
||||
- name: run-image-compare
|
||||
taskSpec:
|
||||
@@ -193,11 +235,10 @@ 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
|
||||
@@ -217,6 +258,8 @@ spec:
|
||||
env:
|
||||
- name: CARGO_TARGET_DIR
|
||||
value: /target
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -227,7 +270,7 @@ spec:
|
||||
- run-image-tracing
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
#############
|
||||
- name: run-image-default
|
||||
taskSpec:
|
||||
@@ -236,11 +279,10 @@ 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
|
||||
@@ -260,6 +302,8 @@ spec:
|
||||
env:
|
||||
- name: CARGO_TARGET_DIR
|
||||
value: /target
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -270,7 +314,7 @@ spec:
|
||||
- run-image-compare
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
#############
|
||||
- name: run-image-tracing-compare
|
||||
taskSpec:
|
||||
@@ -279,11 +323,10 @@ 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
|
||||
@@ -303,6 +346,8 @@ spec:
|
||||
env:
|
||||
- name: CARGO_TARGET_DIR
|
||||
value: /target
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -313,7 +358,7 @@ spec:
|
||||
- run-image-default
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
#############
|
||||
- name: run-image-compare-foreign
|
||||
taskSpec:
|
||||
@@ -322,11 +367,10 @@ 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
|
||||
@@ -351,6 +395,8 @@ spec:
|
||||
env:
|
||||
- name: CARGO_TARGET_DIR
|
||||
value: /target
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -361,7 +407,7 @@ spec:
|
||||
- run-image-tracing-compare
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
#############
|
||||
- name: run-image-all
|
||||
taskSpec:
|
||||
@@ -370,11 +416,10 @@ 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
|
||||
@@ -399,6 +444,8 @@ spec:
|
||||
env:
|
||||
- name: CARGO_TARGET_DIR
|
||||
value: /target
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -409,7 +456,7 @@ spec:
|
||||
- run-image-compare-foreign
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
#############
|
||||
- name: run-image-wasm
|
||||
taskSpec:
|
||||
@@ -418,11 +465,10 @@ 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
|
||||
@@ -453,6 +499,8 @@ spec:
|
||||
env:
|
||||
- name: CARGO_TARGET_DIR
|
||||
value: /target
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -463,7 +511,7 @@ spec:
|
||||
- run-image-all
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
#############
|
||||
- name: run-image-wasm-test
|
||||
taskSpec:
|
||||
@@ -472,11 +520,10 @@ 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
|
||||
@@ -503,6 +550,8 @@ spec:
|
||||
env:
|
||||
- name: CARGO_TARGET_DIR
|
||||
value: /target
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -513,7 +562,7 @@ spec:
|
||||
- run-image-wasm
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
#############
|
||||
finally:
|
||||
- name: report-success
|
||||
@@ -525,7 +574,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 +603,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
|
||||
@@ -581,17 +630,13 @@ spec:
|
||||
- name: docker-image
|
||||
type: string
|
||||
description: Docker image to run.
|
||||
default: alpine:3.18
|
||||
- name: cache-subdir
|
||||
type: string
|
||||
description: subPath used in the persistent volume for the cargo cache.
|
||||
steptemplate:
|
||||
image: alpine:3.18
|
||||
name: ""
|
||||
resources:
|
||||
default: alpine:3.20
|
||||
stepTemplate:
|
||||
image: alpine:3.20
|
||||
computeResources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 60Mi
|
||||
memory: 600Mi
|
||||
workingDir: /workspace/source
|
||||
workspaces:
|
||||
- name: source
|
||||
@@ -603,21 +648,19 @@ spec:
|
||||
- name: run
|
||||
image: $(params.docker-image)
|
||||
workingDir: "$(workspaces.source.path)"
|
||||
command: ["ls", "$(workspaces.cargo-cache.path)"]
|
||||
# command: [echo, $(params.cache-subdir)]
|
||||
# command: [cargo, cache, --autoclean]
|
||||
command: [cargo, cache, --autoclean]
|
||||
args: []
|
||||
env:
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
- name: cargo-cache
|
||||
workspace: cargo-cache
|
||||
subPath: $(params.cache-subdir)
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
- name: cache-subdir
|
||||
value: none
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
# matrix:
|
||||
# params:
|
||||
# - name: cache-subdir
|
||||
@@ -639,7 +682,7 @@ spec:
|
||||
- name: git-source
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
storageClassName: "nfs-client"
|
||||
storageClassName: "local-path"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
@@ -652,12 +695,12 @@ 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
|
||||
value: docker/organic_development/Dockerfile
|
||||
value: docker/organic_development/
|
||||
@@ -1,17 +1,24 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
apiVersion: tekton.dev/v1
|
||||
kind: PipelineRun
|
||||
metadata:
|
||||
name: rust-foreign-document-test
|
||||
name: foreign-document-test
|
||||
labels:
|
||||
pdb: protect
|
||||
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 +26,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)"
|
||||
@@ -64,18 +52,6 @@ spec:
|
||||
- name: TARGET_URL
|
||||
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
|
||||
- name: fetch-repository
|
||||
taskRef:
|
||||
resolver: git
|
||||
params:
|
||||
- name: url
|
||||
value: https://github.com/tektoncd/catalog.git
|
||||
- name: revision
|
||||
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||
- name: pathInRepo
|
||||
value: task/git-clone/0.9/git-clone.yaml
|
||||
workspaces:
|
||||
- name: output
|
||||
workspace: git-source
|
||||
params:
|
||||
- name: url
|
||||
value: $(params.REPO_URL)
|
||||
@@ -83,36 +59,79 @@ spec:
|
||||
value: $(params.PULL_BASE_SHA)
|
||||
- name: deleteExisting
|
||||
value: "true"
|
||||
taskRef:
|
||||
params:
|
||||
- name: url
|
||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||
- name: revision
|
||||
value: "dda7b690195b43e8b9859d1caf5dcbf48588ade1"
|
||||
- name: pathInRepo
|
||||
value: task/git-clone/0.1/git-clone.yaml
|
||||
resolver: git
|
||||
workspaces:
|
||||
- name: output
|
||||
workspace: git-source
|
||||
- name: get-git-commit-time
|
||||
taskSpec:
|
||||
metadata: {}
|
||||
stepTemplate:
|
||||
image: alpine:3.20
|
||||
computeResources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 600Mi
|
||||
workingDir: "$(workspaces.repo.path)"
|
||||
results:
|
||||
- name: unix-time
|
||||
description: The time of the git commit in unix timestamp format.
|
||||
steps:
|
||||
- image: alpine/git:v2.34.2
|
||||
name: detect-tag-step
|
||||
script: |
|
||||
#!/usr/bin/env sh
|
||||
set -euo pipefail
|
||||
echo -n "$(git log -1 --pretty=%ct)" | tee $(results.unix-time.path)
|
||||
workspaces:
|
||||
- name: repo
|
||||
workspace: git-source
|
||||
runAfter:
|
||||
- fetch-repository
|
||||
- name: build-image
|
||||
taskRef:
|
||||
resolver: git
|
||||
params:
|
||||
- name: url
|
||||
value: https://github.com/tektoncd/catalog.git
|
||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||
- name: revision
|
||||
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
|
||||
- name: pathInRepo
|
||||
value: task/kaniko/0.6/kaniko.yaml
|
||||
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
||||
params:
|
||||
- name: IMAGE
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
- name: OUTPUT
|
||||
value: >-
|
||||
type=image,"name=$(params.image-name):latest,$(params.image-name):$(tasks.fetch-repository.results.commit)",push=true,compression=zstd,compression-level=22,oci-mediatypes=true
|
||||
- name: CONTEXT
|
||||
value: $(params.path-to-image-context)
|
||||
- name: DOCKERFILE
|
||||
value: $(params.path-to-dockerfile)
|
||||
- name: BUILDER_IMAGE
|
||||
value: "gcr.io/kaniko-project/executor:v1.12.1"
|
||||
- name: EXTRA_ARGS
|
||||
value:
|
||||
- --target=foreign-document
|
||||
- --cache=true
|
||||
- --cache-copy-layers
|
||||
- --cache-repo=harbor.fizz.buzz/kanikocache/cache
|
||||
- --use-new-run # Should result in a speed-up
|
||||
- --reproducible # To remove timestamps so layer caching works.
|
||||
- --snapshot-mode=redo
|
||||
- --skip-unused-stages=true
|
||||
- --registry-mirror=dockerhub.dockerhub.svc.cluster.local
|
||||
- "--opt"
|
||||
- "target=$(params.target-name)"
|
||||
- --import-cache
|
||||
- "type=registry,ref=$(params.image-name):buildcache"
|
||||
- --export-cache
|
||||
- "type=registry,ref=$(params.image-name):buildcache,mode=max,compression=zstd,compression-level=22,rewrite-timestamp=true,image-manifest=true,oci-mediatypes=true"
|
||||
- --opt
|
||||
- build-arg:SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)
|
||||
- name: BUILDKITD_TOML
|
||||
value: |
|
||||
debug = true
|
||||
[registry."docker.io"]
|
||||
mirrors = ["dockerhub.dockerhub.svc.cluster.local"]
|
||||
[registry."dockerhub.dockerhub.svc.cluster.local"]
|
||||
http = true
|
||||
insecure = true
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -127,14 +146,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,6 +167,8 @@ spec:
|
||||
env:
|
||||
- name: CARGO_TARGET_DIR
|
||||
value: /target
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -158,7 +178,7 @@ spec:
|
||||
- build-image
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
finally:
|
||||
- name: report-success
|
||||
when:
|
||||
@@ -169,7 +189,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 +218,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 +245,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
|
||||
@@ -246,6 +265,9 @@ spec:
|
||||
workingDir: "$(workspaces.source.path)"
|
||||
command: [cargo, cache, --autoclean]
|
||||
args: []
|
||||
env:
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -253,7 +275,7 @@ spec:
|
||||
workspace: cargo-cache
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
workspaces:
|
||||
- name: git-source
|
||||
- name: docker-credentials
|
||||
@@ -262,7 +284,7 @@ spec:
|
||||
- name: git-source
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
storageClassName: "nfs-client"
|
||||
storageClassName: "local-path"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
@@ -275,11 +297,12 @@ 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
|
||||
value: docker/organic_test/Dockerfile
|
||||
value: docker/organic_test/
|
||||
@@ -1,17 +1,24 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
apiVersion: tekton.dev/v1
|
||||
kind: PipelineRun
|
||||
metadata:
|
||||
name: rust-format
|
||||
labels:
|
||||
pdb: protect
|
||||
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 +31,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)"
|
||||
@@ -47,18 +52,6 @@ spec:
|
||||
- name: TARGET_URL
|
||||
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
|
||||
- name: fetch-repository
|
||||
taskRef:
|
||||
resolver: git
|
||||
params:
|
||||
- name: url
|
||||
value: https://github.com/tektoncd/catalog.git
|
||||
- name: revision
|
||||
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||
- name: pathInRepo
|
||||
value: task/git-clone/0.9/git-clone.yaml
|
||||
workspaces:
|
||||
- name: output
|
||||
workspace: git-source
|
||||
params:
|
||||
- name: url
|
||||
value: $(params.REPO_URL)
|
||||
@@ -66,36 +59,79 @@ spec:
|
||||
value: $(params.PULL_BASE_SHA)
|
||||
- name: deleteExisting
|
||||
value: "true"
|
||||
taskRef:
|
||||
params:
|
||||
- name: url
|
||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||
- name: revision
|
||||
value: "dda7b690195b43e8b9859d1caf5dcbf48588ade1"
|
||||
- name: pathInRepo
|
||||
value: task/git-clone/0.1/git-clone.yaml
|
||||
resolver: git
|
||||
workspaces:
|
||||
- name: output
|
||||
workspace: git-source
|
||||
- name: get-git-commit-time
|
||||
taskSpec:
|
||||
metadata: {}
|
||||
stepTemplate:
|
||||
image: alpine:3.20
|
||||
computeResources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 600Mi
|
||||
workingDir: "$(workspaces.repo.path)"
|
||||
results:
|
||||
- name: unix-time
|
||||
description: The time of the git commit in unix timestamp format.
|
||||
steps:
|
||||
- image: alpine/git:v2.34.2
|
||||
name: detect-tag-step
|
||||
script: |
|
||||
#!/usr/bin/env sh
|
||||
set -euo pipefail
|
||||
echo -n "$(git log -1 --pretty=%ct)" | tee $(results.unix-time.path)
|
||||
workspaces:
|
||||
- name: repo
|
||||
workspace: git-source
|
||||
runAfter:
|
||||
- fetch-repository
|
||||
- name: build-image
|
||||
taskRef:
|
||||
resolver: git
|
||||
params:
|
||||
- name: url
|
||||
value: https://github.com/tektoncd/catalog.git
|
||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||
- name: revision
|
||||
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
|
||||
- name: pathInRepo
|
||||
value: task/kaniko/0.6/kaniko.yaml
|
||||
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
||||
params:
|
||||
- name: IMAGE
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
- name: OUTPUT
|
||||
value: >-
|
||||
type=image,"name=$(params.image-name):latest,$(params.image-name):$(tasks.fetch-repository.results.commit)",push=true,compression=zstd,compression-level=22,oci-mediatypes=true
|
||||
- name: CONTEXT
|
||||
value: $(params.path-to-image-context)
|
||||
- name: DOCKERFILE
|
||||
value: $(params.path-to-dockerfile)
|
||||
- name: BUILDER_IMAGE
|
||||
value: "gcr.io/kaniko-project/executor:v1.12.1"
|
||||
- name: EXTRA_ARGS
|
||||
value:
|
||||
- --target=format
|
||||
- --cache=true
|
||||
- --cache-copy-layers
|
||||
- --cache-repo=harbor.fizz.buzz/kanikocache/cache
|
||||
- --use-new-run # Should result in a speed-up
|
||||
- --reproducible # To remove timestamps so layer caching works.
|
||||
- --snapshot-mode=redo
|
||||
- --skip-unused-stages=true
|
||||
- --registry-mirror=dockerhub.dockerhub.svc.cluster.local
|
||||
- "--opt"
|
||||
- "target=$(params.target-name)"
|
||||
- --import-cache
|
||||
- "type=registry,ref=$(params.image-name):buildcache"
|
||||
- --export-cache
|
||||
- "type=registry,ref=$(params.image-name):buildcache,mode=max,compression=zstd,compression-level=22,rewrite-timestamp=true,image-manifest=true,oci-mediatypes=true"
|
||||
- --opt
|
||||
- build-arg:SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)
|
||||
- name: BUILDKITD_TOML
|
||||
value: |
|
||||
debug = true
|
||||
[registry."docker.io"]
|
||||
mirrors = ["dockerhub.dockerhub.svc.cluster.local"]
|
||||
[registry."dockerhub.dockerhub.svc.cluster.local"]
|
||||
http = true
|
||||
insecure = true
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -110,14 +146,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
|
||||
@@ -134,6 +169,8 @@ spec:
|
||||
env:
|
||||
- name: CARGO_TARGET_DIR
|
||||
value: /target
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -143,13 +180,13 @@ spec:
|
||||
- build-image
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
- name: commit-changes
|
||||
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
|
||||
@@ -185,7 +222,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 +251,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 +278,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
|
||||
@@ -262,6 +298,9 @@ spec:
|
||||
workingDir: "$(workspaces.source.path)"
|
||||
command: [cargo, cache, --autoclean]
|
||||
args: []
|
||||
env:
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -269,7 +308,7 @@ spec:
|
||||
workspace: cargo-cache
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
workspaces:
|
||||
- name: git-source
|
||||
- name: docker-credentials
|
||||
@@ -278,7 +317,7 @@ spec:
|
||||
- name: git-source
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
storageClassName: "nfs-client"
|
||||
storageClassName: "local-path"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
@@ -291,11 +330,12 @@ 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
|
||||
value: docker/organic_development/Dockerfile
|
||||
value: docker/organic_development/
|
||||
@@ -1,17 +1,24 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
apiVersion: tekton.dev/v1
|
||||
kind: PipelineRun
|
||||
metadata:
|
||||
name: rust-clippy
|
||||
labels:
|
||||
pdb: protect
|
||||
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 +31,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)"
|
||||
@@ -47,18 +52,6 @@ spec:
|
||||
- name: TARGET_URL
|
||||
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
|
||||
- name: fetch-repository
|
||||
taskRef:
|
||||
resolver: git
|
||||
params:
|
||||
- name: url
|
||||
value: https://github.com/tektoncd/catalog.git
|
||||
- name: revision
|
||||
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||
- name: pathInRepo
|
||||
value: task/git-clone/0.9/git-clone.yaml
|
||||
workspaces:
|
||||
- name: output
|
||||
workspace: git-source
|
||||
params:
|
||||
- name: url
|
||||
value: $(params.REPO_URL)
|
||||
@@ -66,36 +59,79 @@ spec:
|
||||
value: $(params.PULL_BASE_SHA)
|
||||
- name: deleteExisting
|
||||
value: "true"
|
||||
taskRef:
|
||||
params:
|
||||
- name: url
|
||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||
- name: revision
|
||||
value: "dda7b690195b43e8b9859d1caf5dcbf48588ade1"
|
||||
- name: pathInRepo
|
||||
value: task/git-clone/0.1/git-clone.yaml
|
||||
resolver: git
|
||||
workspaces:
|
||||
- name: output
|
||||
workspace: git-source
|
||||
- name: get-git-commit-time
|
||||
taskSpec:
|
||||
metadata: {}
|
||||
stepTemplate:
|
||||
image: alpine:3.20
|
||||
computeResources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 600Mi
|
||||
workingDir: "$(workspaces.repo.path)"
|
||||
results:
|
||||
- name: unix-time
|
||||
description: The time of the git commit in unix timestamp format.
|
||||
steps:
|
||||
- image: alpine/git:v2.34.2
|
||||
name: detect-tag-step
|
||||
script: |
|
||||
#!/usr/bin/env sh
|
||||
set -euo pipefail
|
||||
echo -n "$(git log -1 --pretty=%ct)" | tee $(results.unix-time.path)
|
||||
workspaces:
|
||||
- name: repo
|
||||
workspace: git-source
|
||||
runAfter:
|
||||
- fetch-repository
|
||||
- name: build-image
|
||||
taskRef:
|
||||
resolver: git
|
||||
params:
|
||||
- name: url
|
||||
value: https://github.com/tektoncd/catalog.git
|
||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||
- name: revision
|
||||
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
|
||||
- name: pathInRepo
|
||||
value: task/kaniko/0.6/kaniko.yaml
|
||||
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
||||
params:
|
||||
- name: IMAGE
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
- name: OUTPUT
|
||||
value: >-
|
||||
type=image,"name=$(params.image-name):latest,$(params.image-name):$(tasks.fetch-repository.results.commit)",push=true,compression=zstd,compression-level=22,oci-mediatypes=true
|
||||
- name: CONTEXT
|
||||
value: $(params.path-to-image-context)
|
||||
- name: DOCKERFILE
|
||||
value: $(params.path-to-dockerfile)
|
||||
- name: BUILDER_IMAGE
|
||||
value: "gcr.io/kaniko-project/executor:v1.12.1"
|
||||
- name: EXTRA_ARGS
|
||||
value:
|
||||
- --target=clippy
|
||||
- --cache=true
|
||||
- --cache-copy-layers
|
||||
- --cache-repo=harbor.fizz.buzz/kanikocache/cache
|
||||
- --use-new-run # Should result in a speed-up
|
||||
- --reproducible # To remove timestamps so layer caching works.
|
||||
- --snapshot-mode=redo
|
||||
- --skip-unused-stages=true
|
||||
- --registry-mirror=dockerhub.dockerhub.svc.cluster.local
|
||||
- "--opt"
|
||||
- "target=$(params.target-name)"
|
||||
- --import-cache
|
||||
- "type=registry,ref=$(params.image-name):buildcache"
|
||||
- --export-cache
|
||||
- "type=registry,ref=$(params.image-name):buildcache,mode=max,compression=zstd,compression-level=22,rewrite-timestamp=true,image-manifest=true,oci-mediatypes=true"
|
||||
- --opt
|
||||
- build-arg:SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)
|
||||
- name: BUILDKITD_TOML
|
||||
value: |
|
||||
debug = true
|
||||
[registry."docker.io"]
|
||||
mirrors = ["dockerhub.dockerhub.svc.cluster.local"]
|
||||
[registry."dockerhub.dockerhub.svc.cluster.local"]
|
||||
http = true
|
||||
insecure = true
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -110,14 +146,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
|
||||
@@ -144,6 +179,8 @@ spec:
|
||||
env:
|
||||
- name: CARGO_TARGET_DIR
|
||||
value: /target
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -153,7 +190,7 @@ spec:
|
||||
- build-image
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
finally:
|
||||
- name: report-success
|
||||
when:
|
||||
@@ -164,7 +201,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 +230,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 +257,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
|
||||
@@ -241,6 +277,9 @@ spec:
|
||||
workingDir: "$(workspaces.source.path)"
|
||||
command: [cargo, cache, --autoclean]
|
||||
args: []
|
||||
env:
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -248,7 +287,7 @@ spec:
|
||||
workspace: cargo-cache
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
workspaces:
|
||||
- name: git-source
|
||||
- name: docker-credentials
|
||||
@@ -257,7 +296,7 @@ spec:
|
||||
- name: git-source
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
storageClassName: "nfs-client"
|
||||
storageClassName: "local-path"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
@@ -270,11 +309,12 @@ 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
|
||||
value: docker/organic_development/Dockerfile
|
||||
value: docker/organic_development/
|
||||
@@ -1,17 +1,24 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
apiVersion: tekton.dev/v1
|
||||
kind: PipelineRun
|
||||
metadata:
|
||||
name: rust-test
|
||||
labels:
|
||||
pdb: protect
|
||||
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 +26,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)"
|
||||
@@ -64,18 +52,6 @@ spec:
|
||||
- name: TARGET_URL
|
||||
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
|
||||
- name: fetch-repository
|
||||
taskRef:
|
||||
resolver: git
|
||||
params:
|
||||
- name: url
|
||||
value: https://github.com/tektoncd/catalog.git
|
||||
- name: revision
|
||||
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||
- name: pathInRepo
|
||||
value: task/git-clone/0.9/git-clone.yaml
|
||||
workspaces:
|
||||
- name: output
|
||||
workspace: git-source
|
||||
params:
|
||||
- name: url
|
||||
value: $(params.REPO_URL)
|
||||
@@ -83,36 +59,79 @@ spec:
|
||||
value: $(params.PULL_BASE_SHA)
|
||||
- name: deleteExisting
|
||||
value: "true"
|
||||
taskRef:
|
||||
params:
|
||||
- name: url
|
||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||
- name: revision
|
||||
value: "dda7b690195b43e8b9859d1caf5dcbf48588ade1"
|
||||
- name: pathInRepo
|
||||
value: task/git-clone/0.1/git-clone.yaml
|
||||
resolver: git
|
||||
workspaces:
|
||||
- name: output
|
||||
workspace: git-source
|
||||
- name: get-git-commit-time
|
||||
taskSpec:
|
||||
metadata: {}
|
||||
stepTemplate:
|
||||
image: alpine:3.20
|
||||
computeResources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 600Mi
|
||||
workingDir: "$(workspaces.repo.path)"
|
||||
results:
|
||||
- name: unix-time
|
||||
description: The time of the git commit in unix timestamp format.
|
||||
steps:
|
||||
- image: alpine/git:v2.34.2
|
||||
name: detect-tag-step
|
||||
script: |
|
||||
#!/usr/bin/env sh
|
||||
set -euo pipefail
|
||||
echo -n "$(git log -1 --pretty=%ct)" | tee $(results.unix-time.path)
|
||||
workspaces:
|
||||
- name: repo
|
||||
workspace: git-source
|
||||
runAfter:
|
||||
- fetch-repository
|
||||
- name: build-image
|
||||
taskRef:
|
||||
resolver: git
|
||||
params:
|
||||
- name: url
|
||||
value: https://github.com/tektoncd/catalog.git
|
||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||
- name: revision
|
||||
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
|
||||
- name: pathInRepo
|
||||
value: task/kaniko/0.6/kaniko.yaml
|
||||
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
||||
params:
|
||||
- name: IMAGE
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
- name: OUTPUT
|
||||
value: >-
|
||||
type=image,"name=$(params.image-name):latest,$(params.image-name):$(tasks.fetch-repository.results.commit)",push=true,compression=zstd,compression-level=22,oci-mediatypes=true
|
||||
- name: CONTEXT
|
||||
value: $(params.path-to-image-context)
|
||||
- name: DOCKERFILE
|
||||
value: $(params.path-to-dockerfile)
|
||||
- name: BUILDER_IMAGE
|
||||
value: "gcr.io/kaniko-project/executor:v1.12.1"
|
||||
- name: EXTRA_ARGS
|
||||
value:
|
||||
- --target=tester
|
||||
- --cache=true
|
||||
- --cache-copy-layers
|
||||
- --cache-repo=harbor.fizz.buzz/kanikocache/cache
|
||||
- --use-new-run # Should result in a speed-up
|
||||
- --reproducible # To remove timestamps so layer caching works.
|
||||
- --snapshot-mode=redo
|
||||
- --skip-unused-stages=true
|
||||
- --registry-mirror=dockerhub.dockerhub.svc.cluster.local
|
||||
- "--opt"
|
||||
- "target=$(params.target-name)"
|
||||
- --import-cache
|
||||
- "type=registry,ref=$(params.image-name):buildcache"
|
||||
- --export-cache
|
||||
- "type=registry,ref=$(params.image-name):buildcache,mode=max,compression=zstd,compression-level=22,rewrite-timestamp=true,image-manifest=true,oci-mediatypes=true"
|
||||
- --opt
|
||||
- build-arg:SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)
|
||||
- name: BUILDKITD_TOML
|
||||
value: |
|
||||
debug = true
|
||||
[registry."docker.io"]
|
||||
mirrors = ["dockerhub.dockerhub.svc.cluster.local"]
|
||||
[registry."dockerhub.dockerhub.svc.cluster.local"]
|
||||
http = true
|
||||
insecure = true
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -120,21 +139,20 @@ spec:
|
||||
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 +164,7 @@ spec:
|
||||
- name: run
|
||||
image: $(params.docker-image)
|
||||
workingDir: "$(workspaces.source.path)"
|
||||
command: ["cargo", "test"]
|
||||
command: [cargo, test]
|
||||
args:
|
||||
[
|
||||
--no-default-features,
|
||||
@@ -160,6 +178,8 @@ spec:
|
||||
env:
|
||||
- name: CARGO_TARGET_DIR
|
||||
value: /target
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -169,7 +189,7 @@ spec:
|
||||
- build-image
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
finally:
|
||||
- name: report-success
|
||||
when:
|
||||
@@ -180,7 +200,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 +229,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 +256,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
|
||||
@@ -257,6 +276,9 @@ spec:
|
||||
workingDir: "$(workspaces.source.path)"
|
||||
command: [cargo, cache, --autoclean]
|
||||
args: []
|
||||
env:
|
||||
- name: RUSTUP_PERMIT_COPY_RENAME
|
||||
value: "true"
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
@@ -264,7 +286,7 @@ spec:
|
||||
workspace: cargo-cache
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
||||
workspaces:
|
||||
- name: git-source
|
||||
- name: docker-credentials
|
||||
@@ -273,7 +295,7 @@ spec:
|
||||
- name: git-source
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
storageClassName: "nfs-client"
|
||||
storageClassName: "local-path"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
@@ -286,11 +308,12 @@ 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
|
||||
value: docker/organic_test/Dockerfile
|
||||
value: docker/organic_test/
|
||||
31
.webhook_bridge/webhook_bridge.toml
Normal file
31
.webhook_bridge/webhook_bridge.toml
Normal 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$", "^no_add$" ]
|
||||
|
||||
# [[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$" ]
|
||||
1446
Cargo.lock
generated
Normal file
1446
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,4 @@
|
||||
# cargo-features = ["profile-rustflags"]
|
||||
cargo-features = ["codegen-backend"]
|
||||
|
||||
[package]
|
||||
name = "organic"
|
||||
@@ -104,9 +103,5 @@ inherits = "release"
|
||||
lto = true
|
||||
strip = true
|
||||
|
||||
[profile.dev]
|
||||
codegen-backend = "cranelift"
|
||||
|
||||
[profile.dev.package."*"]
|
||||
codegen-backend = "llvm"
|
||||
opt-level = 3
|
||||
|
||||
2
build.rs
2
build.rs
@@ -26,7 +26,7 @@ fn main() {
|
||||
dir_entry.file_type().is_file()
|
||||
&& Path::new(dir_entry.file_name())
|
||||
.extension()
|
||||
.map(|ext| ext.to_ascii_lowercase() == "org")
|
||||
.map(|ext| ext.eq_ignore_ascii_case("org"))
|
||||
.unwrap_or(false)
|
||||
}
|
||||
Err(_) => true,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
FROM rustlang/rust:nightly-alpine3.19 AS builder
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG ALPINE_VERSION="3.20"
|
||||
|
||||
FROM rustlang/rust:nightly-alpine$ALPINE_VERSION AS builder
|
||||
|
||||
RUN apk add --no-cache musl-dev
|
||||
RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache
|
||||
RUN --mount=type=tmpfs,target=/tmp --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked cargo install --locked --no-default-features --features ci-autoclean cargo-cache
|
||||
RUN rustup component add rustc-codegen-cranelift
|
||||
|
||||
FROM builder AS format
|
||||
|
||||
@@ -1,37 +1,67 @@
|
||||
FROM alpine:3.19 AS build
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG ALPINE_VERSION="3.20"
|
||||
|
||||
# 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:$ALPINE_VERSION 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_REPO
|
||||
ARG EMACS_VERSION
|
||||
|
||||
RUN <<EOF
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
mkdir -p /root/emacs
|
||||
git -C /root/emacs init --initial-branch=main
|
||||
git -C /root/emacs remote add origin $EMACS_REPO
|
||||
git -C /root/emacs fetch origin $EMACS_VERSION
|
||||
git -C /root/emacs checkout FETCH_HEAD
|
||||
EOF
|
||||
#ADD "$EMACS_REPO#$EMACS_VERSION" /root/emacs
|
||||
WORKDIR /root/emacs
|
||||
RUN mkdir /root/dist
|
||||
RUN ./autogen.sh
|
||||
RUN ./configure --prefix /usr --without-x --without-sound --with-native-compilation=aot
|
||||
RUN make
|
||||
RUN make DESTDIR="/root/dist" install
|
||||
RUN <<EOF
|
||||
mkdir /root/dist
|
||||
./autogen.sh
|
||||
./configure --prefix /usr --without-x --without-sound --with-native-compilation=aot
|
||||
make
|
||||
make DESTDIR="/root/dist" install
|
||||
EOF
|
||||
|
||||
|
||||
FROM build AS build-org-mode
|
||||
ARG ORG_VERSION=abf5156096c06ee5aa05795c3dc5a065f76ada97
|
||||
COPY --from=build-emacs /root/dist/ /
|
||||
ARG ORG_VERSION
|
||||
ARG ORG_MODE_REPO
|
||||
COPY --link --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
|
||||
RUN <<EOF
|
||||
make compile
|
||||
make DESTDIR="/root/dist" install
|
||||
EOF
|
||||
|
||||
|
||||
FROM rustlang/rust:nightly-alpine3.19 AS tester
|
||||
FROM rustlang/rust:nightly-alpine$ALPINE_VERSION 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
|
||||
RUN --mount=type=tmpfs,target=/tmp --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked cargo install --locked --no-default-features --features ci-autoclean cargo-cache
|
||||
RUN rustup component add rustc-codegen-cranelift
|
||||
COPY --from=build-emacs /root/dist/ /
|
||||
COPY --from=build-org-mode /root/dist/ /
|
||||
COPY --link --from=build-emacs /root/dist/ /
|
||||
COPY --link --from=build-org-mode /root/dist/ /
|
||||
|
||||
ENTRYPOINT ["cargo", "test"]
|
||||
|
||||
@@ -102,12 +132,14 @@ RUN mkdir -p $LITERATE_BUILD_EMACS_PATH && git -C $LITERATE_BUILD_EMACS_PATH ini
|
||||
RUN rm $LITERATE_BUILD_EMACS_PATH/unused/aws.org
|
||||
|
||||
FROM tester as foreign-document
|
||||
RUN apk add --no-cache bash coreutils
|
||||
RUN mkdir /foreign_documents
|
||||
COPY --from=foreign-document-gather /foreign_documents/howardabrams /foreign_documents/howardabrams
|
||||
COPY --from=foreign-document-gather /foreign_documents/doomemacs /foreign_documents/doomemacs
|
||||
COPY --from=foreign-document-gather /foreign_documents/worg /foreign_documents/worg
|
||||
COPY --from=foreign-document-gather /foreign_documents/literate_build_emacs /foreign_documents/literate_build_emacs
|
||||
COPY --from=build-org-mode /root/org-mode /foreign_documents/org-mode
|
||||
COPY --from=build-emacs /root/emacs /foreign_documents/emacs
|
||||
RUN <<EOF
|
||||
apk add --no-cache bash coreutils
|
||||
mkdir /foreign_documents
|
||||
EOF
|
||||
COPY --link --from=foreign-document-gather /foreign_documents/howardabrams /foreign_documents/howardabrams
|
||||
COPY --link --from=foreign-document-gather /foreign_documents/doomemacs /foreign_documents/doomemacs
|
||||
COPY --link --from=foreign-document-gather /foreign_documents/worg /foreign_documents/worg
|
||||
COPY --link --from=foreign-document-gather /foreign_documents/literate_build_emacs /foreign_documents/literate_build_emacs
|
||||
COPY --link --from=build-org-mode /root/org-mode /foreign_documents/org-mode
|
||||
COPY --link --from=build-emacs /root/emacs /foreign_documents/emacs
|
||||
ENTRYPOINT ["cargo", "run", "--bin", "foreign_document_test", "--features", "compare,foreign_document_test", "--profile", "release-lto"]
|
||||
|
||||
48
flake.lock
generated
Normal file
48
flake.lock
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1780749050,
|
||||
"narHash": "sha256-3av0pIjlOWQ6rDbNOmpUSvbNnJkGORQKKjb4LtCZsIY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a799d3e3886da994fa307f817a6bc705ae538eeb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1781407245,
|
||||
"narHash": "sha256-VzJq4MmD0uyNDAceudSe1hHqcQMe9Tau0U4S+5iRGh0=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "d5f483210eb016d66102eef22baa128b3b3233fc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
162
flake.nix
Normal file
162
flake.nix
Normal file
@@ -0,0 +1,162 @@
|
||||
{
|
||||
description = "Organic Org parser";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
rust-overlay,
|
||||
}:
|
||||
let
|
||||
forAllSystems =
|
||||
func:
|
||||
builtins.listToAttrs (
|
||||
map (system: {
|
||||
name = system;
|
||||
value = func system;
|
||||
}) nixpkgs.lib.systems.flakeExposed
|
||||
);
|
||||
in
|
||||
{
|
||||
devShells = forAllSystems (
|
||||
system:
|
||||
let
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
rustToolchain = (pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml).override {
|
||||
targets = [ "wasm32-unknown-unknown" ];
|
||||
};
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
nativeBuildInputs = [
|
||||
rustToolchain
|
||||
];
|
||||
buildInputs = with pkgs; [
|
||||
wasm-bindgen-cli
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
appliedOverlay = self.overlays.default pkgs pkgs;
|
||||
in
|
||||
rec {
|
||||
default = all;
|
||||
all = pkgs.symlinkJoin {
|
||||
name = "all";
|
||||
paths = [
|
||||
library
|
||||
devTools
|
||||
wasm_bundler
|
||||
wasm_web
|
||||
];
|
||||
};
|
||||
inherit (appliedOverlay.organic)
|
||||
library
|
||||
devTools
|
||||
wasm_bundler
|
||||
wasm_web
|
||||
;
|
||||
docker_env = pkgs.buildEnv {
|
||||
name = "organic";
|
||||
paths = with pkgs; [
|
||||
appliedOverlay.organic.devTools
|
||||
bash
|
||||
uutils-coreutils-noprefix
|
||||
# toybox # Smaller than uutils-coreutils?
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
overlays.default = final: prev: {
|
||||
organic = final.lib.makeScope final.newScope (
|
||||
organicScope:
|
||||
let
|
||||
build_wasm =
|
||||
{
|
||||
bindgenTarget ? null,
|
||||
}:
|
||||
(organicScope.callPackage ./nix/package.nix {
|
||||
inherit rust-overlay;
|
||||
targetBins = [
|
||||
"wasm"
|
||||
];
|
||||
features = [ "wasm" ];
|
||||
cargoBuildTarget = "wasm32-unknown-unknown";
|
||||
buildType = "wasm";
|
||||
}).overrideAttrs
|
||||
(
|
||||
old:
|
||||
let
|
||||
bindgen_command = [
|
||||
"${final.wasm-bindgen-cli}/bin/wasm-bindgen"
|
||||
"--target"
|
||||
bindgenTarget
|
||||
"--out-dir"
|
||||
"target/wasm32-unknown-unknown/${bindgenTarget}"
|
||||
"target/wasm32-unknown-unknown/wasm/wasm.wasm"
|
||||
];
|
||||
in
|
||||
{
|
||||
postBuild = ''
|
||||
${final.lib.escapeShellArgs bindgen_command}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/${bindgenTarget}
|
||||
cp target/wasm32-unknown-unknown/${bindgenTarget}/* $out/share/${bindgenTarget}
|
||||
'';
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
library =
|
||||
(organicScope.callPackage ./nix/package.nix {
|
||||
inherit rust-overlay;
|
||||
buildLib = true;
|
||||
}).overrideAttrs
|
||||
(
|
||||
old:
|
||||
let
|
||||
in
|
||||
{
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp target/*/release/liborganic.rlib $out/lib/
|
||||
'';
|
||||
}
|
||||
);
|
||||
devTools = organicScope.callPackage ./nix/package.nix {
|
||||
inherit rust-overlay;
|
||||
targetBins = [
|
||||
"parse"
|
||||
"compare"
|
||||
];
|
||||
features = [ "compare" ];
|
||||
};
|
||||
wasm_bundler = build_wasm { bindgenTarget = "bundler"; };
|
||||
wasm_web = build_wasm { bindgenTarget = "web"; };
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
82
nix/package.nix
Normal file
82
nix/package.nix
Normal file
@@ -0,0 +1,82 @@
|
||||
{
|
||||
hello,
|
||||
lib,
|
||||
pkgs,
|
||||
rust-overlay,
|
||||
|
||||
targetBins ? [ ],
|
||||
features ? [ ],
|
||||
cargoBuildTarget ? null,
|
||||
buildType ? null,
|
||||
buildLib ? false,
|
||||
}:
|
||||
let
|
||||
cargoToml = (lib.importTOML ../Cargo.toml);
|
||||
rustPlatformFor =
|
||||
pkgs:
|
||||
let
|
||||
rust-bin = rust-overlay.lib.mkRustBin { } pkgs;
|
||||
rustToolchain = (rust-bin.fromRustupToolchainFile ../rust-toolchain.toml).override (
|
||||
if cargoBuildTarget != null then
|
||||
{
|
||||
targets = [ cargoBuildTarget ];
|
||||
}
|
||||
else
|
||||
{ }
|
||||
);
|
||||
baseRustPlatform = (
|
||||
pkgs.makeRustPlatform {
|
||||
cargo = rustToolchain;
|
||||
rustc = rustToolchain;
|
||||
}
|
||||
);
|
||||
rustPlatform =
|
||||
if cargoBuildTarget != null then
|
||||
baseRustPlatform.overrideScope (
|
||||
final: prev: {
|
||||
cargoBuildHook = prev.cargoBuildHook.overrideDerivation (_: {
|
||||
rustcTargetSpec = cargoBuildTarget;
|
||||
});
|
||||
cargoInstallHook = hello;
|
||||
}
|
||||
)
|
||||
else
|
||||
baseRustPlatform;
|
||||
in
|
||||
rustPlatform;
|
||||
in
|
||||
(rustPlatformFor pkgs).buildRustPackage (
|
||||
# rustPlatform.buildRustPackage (
|
||||
{
|
||||
pname = "organic";
|
||||
version = cargoToml.package.version;
|
||||
src = lib.cleanSource ../.;
|
||||
|
||||
cargoLock.lockFile = ../Cargo.lock;
|
||||
|
||||
cargoBuildFlags = builtins.concatLists [
|
||||
(builtins.concatMap (targetBin: [
|
||||
"--bin"
|
||||
targetBin
|
||||
]) targetBins)
|
||||
(if buildLib then [ "--lib" ] else [ ])
|
||||
(
|
||||
if features != [ ] then
|
||||
[
|
||||
"--features"
|
||||
(builtins.concatStringsSep " " features)
|
||||
]
|
||||
else
|
||||
[ ]
|
||||
)
|
||||
];
|
||||
}
|
||||
// (
|
||||
if buildType != null then
|
||||
{
|
||||
buildType = buildType;
|
||||
}
|
||||
else
|
||||
{ }
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
[[file:simple.org::2]]
|
||||
1
org_mode_samples/object/regular_link/tramp_link.org
Normal file
1
org_mode_samples/object/regular_link/tramp_link.org
Normal file
@@ -0,0 +1 @@
|
||||
[[/ssh:admin@test.example:important/file.pdf]]
|
||||
4
rust-toolchain.toml
Normal file
4
rust-toolchain.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
[toolchain]
|
||||
channel = "nightly-2026-05-23"
|
||||
profile = "default"
|
||||
components = ["clippy", "rustfmt"]
|
||||
@@ -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)]
|
||||
|
||||
@@ -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>),
|
||||
|
||||
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user