Compare commits
5 Commits
faf279292a
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39d838a284
|
||
|
|
1c369e4b25
|
||
|
|
694052d33d
|
||
|
|
71e5bfe4be
|
||
|
|
1350ffdf92
|
@@ -7,7 +7,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
timeouts:
|
timeouts:
|
||||||
pipeline: "2h0m0s"
|
pipeline: "2h0m0s"
|
||||||
tasks: "1h0m0s"
|
tasks: "1h0m40s"
|
||||||
finally: "0h30m0s"
|
finally: "0h30m0s"
|
||||||
taskRunTemplate:
|
taskRunTemplate:
|
||||||
serviceAccountName: build-bot
|
serviceAccountName: build-bot
|
||||||
@@ -103,36 +103,42 @@ spec:
|
|||||||
- name: url
|
- name: url
|
||||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||||
- name: revision
|
- name: revision
|
||||||
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
|
value: 9c6d3bc418dc2f54d73bdfa984bce3eb6c65fd60
|
||||||
- name: pathInRepo
|
- name: pathInRepo
|
||||||
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
value: task/buildah-rootless-daemonless/0.1/buildah-rootless-daemonless.yaml
|
||||||
params:
|
params:
|
||||||
- name: OUTPUT
|
- name: OUTPUT
|
||||||
value: >-
|
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
|
$(params.image-name):$(tasks.fetch-repository.results.commit)
|
||||||
- name: CONTEXT
|
- name: CONTEXT
|
||||||
value: $(params.path-to-image-context)
|
value: $(params.path-to-image-context)
|
||||||
- name: DOCKERFILE
|
- name: DOCKERFILE
|
||||||
value: $(params.path-to-dockerfile)
|
value: $(params.path-to-dockerfile)
|
||||||
- name: EXTRA_ARGS
|
- name: EXTRA_ARGS
|
||||||
value:
|
value:
|
||||||
- "--opt"
|
- "--target"
|
||||||
- "target=$(params.target-name)"
|
- "$(params.target-name)"
|
||||||
- --import-cache
|
- --cache-from
|
||||||
- "type=registry,ref=$(params.image-name):buildcache"
|
- "$(params.image-name)-buildcache"
|
||||||
- --export-cache
|
- --cache-to
|
||||||
- "type=registry,ref=$(params.image-name):buildcache,mode=max,compression=zstd,compression-level=22,rewrite-timestamp=true,image-manifest=true,oci-mediatypes=true"
|
- "$(params.image-name)-buildcache"
|
||||||
- --opt
|
- --build-arg
|
||||||
- build-arg:SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)
|
- "SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)"
|
||||||
- --opt
|
- --build-arg
|
||||||
- "build-arg:NIX_SUBSTITUTERS=http://ncps.nix-pull-through-cache.svc.cluster.local:80 https://cache.nixos.org"
|
- "NIX_SUBSTITUTERS=http://ncps.nix-pull-through-cache.svc.cluster.local:80 https://cache.nixos.org"
|
||||||
- name: BUILDKITD_TOML
|
- name: REGISTRIES_CONF
|
||||||
value: |
|
value: |
|
||||||
debug = true
|
unqualified-search-registries = ["docker.io"]
|
||||||
[registry."docker.io"]
|
|
||||||
mirrors = ["dockerhub.dockerhub.svc.cluster.local"]
|
[[registry]]
|
||||||
[registry."dockerhub.dockerhub.svc.cluster.local"]
|
location = "dockerhub.dockerhub.svc.cluster.local"
|
||||||
http = true
|
insecure = true
|
||||||
|
|
||||||
|
[[registry]]
|
||||||
|
location = "docker.io"
|
||||||
|
|
||||||
|
[[registry.mirror]]
|
||||||
|
location = "dockerhub.dockerhub.svc.cluster.local" # Replace with your mirror URL
|
||||||
insecure = true
|
insecure = true
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: source
|
- name: source
|
||||||
@@ -200,9 +206,48 @@ spec:
|
|||||||
value: failure
|
value: failure
|
||||||
- name: TARGET_URL
|
- name: TARGET_URL
|
||||||
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
|
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
|
||||||
|
- name: cargo-cache-autoclean
|
||||||
|
taskSpec:
|
||||||
|
metadata: {}
|
||||||
|
params:
|
||||||
|
- name: docker-image
|
||||||
|
type: string
|
||||||
|
description: Docker image to run.
|
||||||
|
default: alpine:3.20
|
||||||
|
stepTemplate:
|
||||||
|
image: alpine:3.20
|
||||||
|
computeResources:
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 600Mi
|
||||||
|
workingDir: /workspace/source
|
||||||
|
workspaces:
|
||||||
|
- name: source
|
||||||
|
mountPath: /source
|
||||||
|
- name: cargo-cache
|
||||||
|
mountPath: /usr/local/cargo/registry
|
||||||
|
optional: true
|
||||||
|
steps:
|
||||||
|
- name: run
|
||||||
|
image: $(params.docker-image)
|
||||||
|
workingDir: "$(workspaces.source.path)"
|
||||||
|
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
|
||||||
|
params:
|
||||||
|
- name: docker-image
|
||||||
|
value: "$(tasks.build-image.results.IMAGE_URL[0])"
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: git-source
|
- name: git-source
|
||||||
- name: docker-credentials
|
- name: docker-credentials
|
||||||
|
- name: cargo-cache
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: git-source
|
- name: git-source
|
||||||
volumeClaimTemplate:
|
volumeClaimTemplate:
|
||||||
@@ -214,6 +259,9 @@ spec:
|
|||||||
requests:
|
requests:
|
||||||
storage: 10Gi
|
storage: 10Gi
|
||||||
subPath: rust-source
|
subPath: rust-source
|
||||||
|
- name: cargo-cache
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: natter-cargo-cache-build
|
||||||
- name: docker-credentials
|
- name: docker-credentials
|
||||||
secret:
|
secret:
|
||||||
secretName: harbor-plain
|
secretName: harbor-plain
|
||||||
@@ -225,4 +273,4 @@ spec:
|
|||||||
- name: path-to-image-context
|
- name: path-to-image-context
|
||||||
value: .
|
value: .
|
||||||
- name: path-to-dockerfile
|
- name: path-to-dockerfile
|
||||||
value: docker/natter/
|
value: docker/natter/Dockerfile
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
timeouts:
|
timeouts:
|
||||||
pipeline: "2h0m0s"
|
pipeline: "2h0m0s"
|
||||||
tasks: "1h0m0s"
|
tasks: "1h0m40s"
|
||||||
finally: "0h30m0s"
|
finally: "0h30m0s"
|
||||||
taskRunTemplate:
|
taskRunTemplate:
|
||||||
serviceAccountName: build-bot
|
serviceAccountName: build-bot
|
||||||
@@ -103,34 +103,42 @@ spec:
|
|||||||
- name: url
|
- name: url
|
||||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||||
- name: revision
|
- name: revision
|
||||||
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
|
value: 9c6d3bc418dc2f54d73bdfa984bce3eb6c65fd60
|
||||||
- name: pathInRepo
|
- name: pathInRepo
|
||||||
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
value: task/buildah-rootless-daemonless/0.1/buildah-rootless-daemonless.yaml
|
||||||
params:
|
params:
|
||||||
- name: OUTPUT
|
- name: OUTPUT
|
||||||
value: >-
|
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
|
$(params.image-name):$(tasks.fetch-repository.results.commit)
|
||||||
- name: CONTEXT
|
- name: CONTEXT
|
||||||
value: $(params.path-to-image-context)
|
value: $(params.path-to-image-context)
|
||||||
- name: DOCKERFILE
|
- name: DOCKERFILE
|
||||||
value: $(params.path-to-dockerfile)
|
value: $(params.path-to-dockerfile)
|
||||||
- name: EXTRA_ARGS
|
- name: EXTRA_ARGS
|
||||||
value:
|
value:
|
||||||
- "--opt"
|
- "--target"
|
||||||
- "target=$(params.target-name)"
|
- "$(params.target-name)"
|
||||||
- --import-cache
|
- --cache-from
|
||||||
- "type=registry,ref=$(params.image-name):buildcache"
|
- "$(params.image-name)-buildcache"
|
||||||
- --export-cache
|
- --cache-to
|
||||||
- "type=registry,ref=$(params.image-name):buildcache,mode=max,compression=zstd,compression-level=22,rewrite-timestamp=true,image-manifest=true,oci-mediatypes=true"
|
- "$(params.image-name)-buildcache"
|
||||||
- --opt
|
- --build-arg
|
||||||
- build-arg:SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)
|
- "SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)"
|
||||||
- name: BUILDKITD_TOML
|
- --build-arg
|
||||||
|
- "NIX_SUBSTITUTERS=http://ncps.nix-pull-through-cache.svc.cluster.local:80 https://cache.nixos.org"
|
||||||
|
- name: REGISTRIES_CONF
|
||||||
value: |
|
value: |
|
||||||
debug = true
|
unqualified-search-registries = ["docker.io"]
|
||||||
[registry."docker.io"]
|
|
||||||
mirrors = ["dockerhub.dockerhub.svc.cluster.local"]
|
[[registry]]
|
||||||
[registry."dockerhub.dockerhub.svc.cluster.local"]
|
location = "dockerhub.dockerhub.svc.cluster.local"
|
||||||
http = true
|
insecure = true
|
||||||
|
|
||||||
|
[[registry]]
|
||||||
|
location = "docker.io"
|
||||||
|
|
||||||
|
[[registry.mirror]]
|
||||||
|
location = "dockerhub.dockerhub.svc.cluster.local" # Replace with your mirror URL
|
||||||
insecure = true
|
insecure = true
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: source
|
- name: source
|
||||||
@@ -180,7 +188,7 @@ spec:
|
|||||||
- build-image
|
- build-image
|
||||||
params:
|
params:
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
value: "$(tasks.build-image.results.IMAGE_URL[0])"
|
||||||
- name: run-prettier
|
- name: run-prettier
|
||||||
taskSpec:
|
taskSpec:
|
||||||
metadata: {}
|
metadata: {}
|
||||||
@@ -214,25 +222,25 @@ spec:
|
|||||||
- build-image
|
- build-image
|
||||||
params:
|
params:
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
value: "$(tasks.build-image.results.IMAGE_URL[0])"
|
||||||
- name: commit-changes
|
- name: commit-changes
|
||||||
taskSpec:
|
taskRef:
|
||||||
metadata: {}
|
resolver: git
|
||||||
stepTemplate:
|
params:
|
||||||
image: alpine:3.20
|
- name: url
|
||||||
computeResources:
|
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
|
||||||
requests:
|
- name: revision
|
||||||
cpu: 10m
|
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||||
memory: 600Mi
|
- name: pathInRepo
|
||||||
workingDir: "$(workspaces.source.path)"
|
value: task/git-cli/0.4/git-cli.yaml
|
||||||
steps:
|
params:
|
||||||
- image: alpine/git:v2.34.2
|
- name: GIT_USER_NAME
|
||||||
name: commit-changes-step
|
value: fluxcdbot
|
||||||
script: |
|
- name: GIT_USER_EMAIL
|
||||||
#!/usr/bin/env sh
|
value: "fluxcdbot@users.noreply.github.com"
|
||||||
set -euo pipefail
|
- name: GIT_SCRIPT
|
||||||
git config --global user.email "fluxcdbot@users.noreply.github.com"
|
value: |
|
||||||
git config --global user.name "fluxcdbot"
|
pwd
|
||||||
git config --global --add safe.directory /workspace/source
|
git config --global --add safe.directory /workspace/source
|
||||||
git_status=$(git status --porcelain)
|
git_status=$(git status --porcelain)
|
||||||
if [ -n "$git_status" ]; then
|
if [ -n "$git_status" ]; then
|
||||||
@@ -241,9 +249,6 @@ spec:
|
|||||||
else
|
else
|
||||||
echo "No changes to commit."
|
echo "No changes to commit."
|
||||||
fi
|
fi
|
||||||
env:
|
|
||||||
- name: "GIT_SSH_COMMAND"
|
|
||||||
value: "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
|
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: source
|
- name: source
|
||||||
workspace: git-source
|
workspace: git-source
|
||||||
@@ -346,7 +351,7 @@ spec:
|
|||||||
workspace: cargo-cache
|
workspace: cargo-cache
|
||||||
params:
|
params:
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
value: "$(tasks.build-image.results.IMAGE_URL[0])"
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: git-source
|
- name: git-source
|
||||||
- name: docker-credentials
|
- name: docker-credentials
|
||||||
@@ -376,4 +381,4 @@ spec:
|
|||||||
- name: path-to-image-context
|
- name: path-to-image-context
|
||||||
value: docker/natter_development/
|
value: docker/natter_development/
|
||||||
- name: path-to-dockerfile
|
- name: path-to-dockerfile
|
||||||
value: docker/natter_development/
|
value: docker/natter_development/Dockerfile
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
pdb: protect
|
pdb: protect
|
||||||
spec:
|
spec:
|
||||||
taskRunTemplate:
|
|
||||||
serviceAccountName: build-bot
|
|
||||||
timeouts:
|
timeouts:
|
||||||
pipeline: "2h0m0s"
|
pipeline: "2h0m0s"
|
||||||
tasks: "1h0m40s"
|
tasks: "1h0m40s"
|
||||||
finally: "0h30m0s"
|
finally: "0h30m0s"
|
||||||
|
taskRunTemplate:
|
||||||
|
serviceAccountName: build-bot
|
||||||
pipelineSpec:
|
pipelineSpec:
|
||||||
params:
|
params:
|
||||||
- name: image-name
|
- name: image-name
|
||||||
@@ -103,34 +103,42 @@ spec:
|
|||||||
- name: url
|
- name: url
|
||||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||||
- name: revision
|
- name: revision
|
||||||
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
|
value: 9c6d3bc418dc2f54d73bdfa984bce3eb6c65fd60
|
||||||
- name: pathInRepo
|
- name: pathInRepo
|
||||||
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
value: task/buildah-rootless-daemonless/0.1/buildah-rootless-daemonless.yaml
|
||||||
params:
|
params:
|
||||||
- name: OUTPUT
|
- name: OUTPUT
|
||||||
value: >-
|
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
|
$(params.image-name):$(tasks.fetch-repository.results.commit)
|
||||||
- name: CONTEXT
|
- name: CONTEXT
|
||||||
value: $(params.path-to-image-context)
|
value: $(params.path-to-image-context)
|
||||||
- name: DOCKERFILE
|
- name: DOCKERFILE
|
||||||
value: $(params.path-to-dockerfile)
|
value: $(params.path-to-dockerfile)
|
||||||
- name: EXTRA_ARGS
|
- name: EXTRA_ARGS
|
||||||
value:
|
value:
|
||||||
- "--opt"
|
- "--target"
|
||||||
- "target=$(params.target-name)"
|
- "$(params.target-name)"
|
||||||
- --import-cache
|
- --cache-from
|
||||||
- "type=registry,ref=$(params.image-name):buildcache"
|
- "$(params.image-name)-buildcache"
|
||||||
- --export-cache
|
- --cache-to
|
||||||
- "type=registry,ref=$(params.image-name):buildcache,mode=max,compression=zstd,compression-level=22,rewrite-timestamp=true,image-manifest=true,oci-mediatypes=true"
|
- "$(params.image-name)-buildcache"
|
||||||
- --opt
|
- --build-arg
|
||||||
- build-arg:SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)
|
- "SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)"
|
||||||
- name: BUILDKITD_TOML
|
- --build-arg
|
||||||
|
- "NIX_SUBSTITUTERS=http://ncps.nix-pull-through-cache.svc.cluster.local:80 https://cache.nixos.org"
|
||||||
|
- name: REGISTRIES_CONF
|
||||||
value: |
|
value: |
|
||||||
debug = true
|
unqualified-search-registries = ["docker.io"]
|
||||||
[registry."docker.io"]
|
|
||||||
mirrors = ["dockerhub.dockerhub.svc.cluster.local"]
|
[[registry]]
|
||||||
[registry."dockerhub.dockerhub.svc.cluster.local"]
|
location = "dockerhub.dockerhub.svc.cluster.local"
|
||||||
http = true
|
insecure = true
|
||||||
|
|
||||||
|
[[registry]]
|
||||||
|
location = "docker.io"
|
||||||
|
|
||||||
|
[[registry.mirror]]
|
||||||
|
location = "dockerhub.dockerhub.svc.cluster.local" # Replace with your mirror URL
|
||||||
insecure = true
|
insecure = true
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: source
|
- name: source
|
||||||
@@ -139,7 +147,7 @@ spec:
|
|||||||
workspace: docker-credentials
|
workspace: docker-credentials
|
||||||
runAfter:
|
runAfter:
|
||||||
- fetch-repository
|
- fetch-repository
|
||||||
- name: run-cargo-clippy
|
- name: run-test
|
||||||
taskSpec:
|
taskSpec:
|
||||||
metadata: {}
|
metadata: {}
|
||||||
params:
|
params:
|
||||||
@@ -190,7 +198,7 @@ spec:
|
|||||||
- build-image
|
- build-image
|
||||||
params:
|
params:
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
value: "$(tasks.build-image.results.IMAGE_URL[0])"
|
||||||
finally:
|
finally:
|
||||||
- name: report-success
|
- name: report-success
|
||||||
when:
|
when:
|
||||||
@@ -287,7 +295,7 @@ spec:
|
|||||||
workspace: cargo-cache
|
workspace: cargo-cache
|
||||||
params:
|
params:
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
value: "$(tasks.build-image.results.IMAGE_URL[0])"
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: git-source
|
- name: git-source
|
||||||
- name: docker-credentials
|
- name: docker-credentials
|
||||||
@@ -317,4 +325,4 @@ spec:
|
|||||||
- name: path-to-image-context
|
- name: path-to-image-context
|
||||||
value: docker/natter_development/
|
value: docker/natter_development/
|
||||||
- name: path-to-dockerfile
|
- name: path-to-dockerfile
|
||||||
value: docker/natter_development/
|
value: docker/natter_development/Dockerfile
|
||||||
|
|||||||
@@ -103,34 +103,42 @@ spec:
|
|||||||
- name: url
|
- name: url
|
||||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||||
- name: revision
|
- name: revision
|
||||||
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
|
value: 9c6d3bc418dc2f54d73bdfa984bce3eb6c65fd60
|
||||||
- name: pathInRepo
|
- name: pathInRepo
|
||||||
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
value: task/buildah-rootless-daemonless/0.1/buildah-rootless-daemonless.yaml
|
||||||
params:
|
params:
|
||||||
- name: OUTPUT
|
- name: OUTPUT
|
||||||
value: >-
|
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
|
$(params.image-name):$(tasks.fetch-repository.results.commit)
|
||||||
- name: CONTEXT
|
- name: CONTEXT
|
||||||
value: $(params.path-to-image-context)
|
value: $(params.path-to-image-context)
|
||||||
- name: DOCKERFILE
|
- name: DOCKERFILE
|
||||||
value: $(params.path-to-dockerfile)
|
value: $(params.path-to-dockerfile)
|
||||||
- name: EXTRA_ARGS
|
- name: EXTRA_ARGS
|
||||||
value:
|
value:
|
||||||
- "--opt"
|
- "--target"
|
||||||
- "target=$(params.target-name)"
|
- "$(params.target-name)"
|
||||||
- --import-cache
|
- --cache-from
|
||||||
- "type=registry,ref=$(params.image-name):buildcache"
|
- "$(params.image-name)-buildcache"
|
||||||
- --export-cache
|
- --cache-to
|
||||||
- "type=registry,ref=$(params.image-name):buildcache,mode=max,compression=zstd,compression-level=22,rewrite-timestamp=true,image-manifest=true,oci-mediatypes=true"
|
- "$(params.image-name)-buildcache"
|
||||||
- --opt
|
- --build-arg
|
||||||
- build-arg:SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)
|
- "SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)"
|
||||||
- name: BUILDKITD_TOML
|
- --build-arg
|
||||||
|
- "NIX_SUBSTITUTERS=http://ncps.nix-pull-through-cache.svc.cluster.local:80 https://cache.nixos.org"
|
||||||
|
- name: REGISTRIES_CONF
|
||||||
value: |
|
value: |
|
||||||
debug = true
|
unqualified-search-registries = ["docker.io"]
|
||||||
[registry."docker.io"]
|
|
||||||
mirrors = ["dockerhub.dockerhub.svc.cluster.local"]
|
[[registry]]
|
||||||
[registry."dockerhub.dockerhub.svc.cluster.local"]
|
location = "dockerhub.dockerhub.svc.cluster.local"
|
||||||
http = true
|
insecure = true
|
||||||
|
|
||||||
|
[[registry]]
|
||||||
|
location = "docker.io"
|
||||||
|
|
||||||
|
[[registry.mirror]]
|
||||||
|
location = "dockerhub.dockerhub.svc.cluster.local" # Replace with your mirror URL
|
||||||
insecure = true
|
insecure = true
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: source
|
- name: source
|
||||||
@@ -139,7 +147,7 @@ spec:
|
|||||||
workspace: docker-credentials
|
workspace: docker-credentials
|
||||||
runAfter:
|
runAfter:
|
||||||
- fetch-repository
|
- fetch-repository
|
||||||
- name: run-cargo-test
|
- name: run-test
|
||||||
taskSpec:
|
taskSpec:
|
||||||
metadata: {}
|
metadata: {}
|
||||||
params:
|
params:
|
||||||
@@ -180,7 +188,7 @@ spec:
|
|||||||
- build-image
|
- build-image
|
||||||
params:
|
params:
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
value: "$(tasks.build-image.results.IMAGE_URL[0])"
|
||||||
finally:
|
finally:
|
||||||
- name: report-success
|
- name: report-success
|
||||||
when:
|
when:
|
||||||
@@ -277,7 +285,7 @@ spec:
|
|||||||
workspace: cargo-cache
|
workspace: cargo-cache
|
||||||
params:
|
params:
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(tasks.build-image.results.IMAGE_URL[1])"
|
value: "$(tasks.build-image.results.IMAGE_URL[0])"
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: git-source
|
- name: git-source
|
||||||
- name: docker-credentials
|
- name: docker-credentials
|
||||||
@@ -307,4 +315,4 @@ spec:
|
|||||||
- name: path-to-image-context
|
- name: path-to-image-context
|
||||||
value: docker/natter_development/
|
value: docker/natter_development/
|
||||||
- name: path-to-dockerfile
|
- name: path-to-dockerfile
|
||||||
value: docker/natter_development/
|
value: docker/natter_development/Dockerfile
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
use std::path::NormalizeError;
|
||||||
use std::str::Utf8Error;
|
use std::str::Utf8Error;
|
||||||
use std::string::FromUtf8Error;
|
use std::string::FromUtf8Error;
|
||||||
|
|
||||||
@@ -16,6 +17,7 @@ pub(crate) enum CustomError {
|
|||||||
DusterRender(#[allow(dead_code)] duster::renderer::RenderError),
|
DusterRender(#[allow(dead_code)] duster::renderer::RenderError),
|
||||||
PathStripPrefix(#[allow(dead_code)] std::path::StripPrefixError),
|
PathStripPrefix(#[allow(dead_code)] std::path::StripPrefixError),
|
||||||
UrlParseError(#[allow(dead_code)] url::ParseError),
|
UrlParseError(#[allow(dead_code)] url::ParseError),
|
||||||
|
NormalizeError(#[allow(dead_code)] NormalizeError),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<std::io::Error> for CustomError {
|
impl From<std::io::Error> for CustomError {
|
||||||
@@ -95,3 +97,9 @@ impl From<url::ParseError> for CustomError {
|
|||||||
CustomError::UrlParseError(value)
|
CustomError::UrlParseError(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<NormalizeError> for CustomError {
|
||||||
|
fn from(value: NormalizeError) -> Self {
|
||||||
|
CustomError::NormalizeError(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -74,7 +74,9 @@ impl LinkTarget {
|
|||||||
// If link type is file and the path ends in .svg then make it an image target
|
// If link type is file and the path ends in .svg then make it an image target
|
||||||
if let LinkType::File = link_type
|
if let LinkType::File = link_type
|
||||||
&& (input.to_ascii_lowercase().ends_with(".svg")
|
&& (input.to_ascii_lowercase().ends_with(".svg")
|
||||||
|| input.to_ascii_lowercase().ends_with(".png"))
|
|| input.to_ascii_lowercase().ends_with(".png")
|
||||||
|
|| input.to_ascii_lowercase().ends_with(".avif")
|
||||||
|
|| input.to_ascii_lowercase().ends_with(".webp"))
|
||||||
{
|
{
|
||||||
let src = Self::get_image_src(&input)?;
|
let src = Self::get_image_src(&input)?;
|
||||||
let alt = Self::get_image_alt(&input)?;
|
let alt = Self::get_image_alt(&input)?;
|
||||||
@@ -151,7 +153,7 @@ impl LinkTarget {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
.get_current_folder()?
|
.get_current_folder()?
|
||||||
.join(src)
|
.join(src)
|
||||||
.canonicalize()?;
|
.normalize_lexically()?;
|
||||||
let input_root_directory = render_context.config.get_root_directory();
|
let input_root_directory = render_context.config.get_root_directory();
|
||||||
let relative_path_to_file = path_to_file.strip_prefix(input_root_directory)?;
|
let relative_path_to_file = path_to_file.strip_prefix(input_root_directory)?;
|
||||||
let web_path = get_web_path(
|
let web_path = get_web_path(
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#![feature(normalize_lexically)]
|
||||||
use std::process::ExitCode;
|
use std::process::ExitCode;
|
||||||
|
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
|||||||
Reference in New Issue
Block a user