Skip to content

Commit

Permalink
Clean up Tekton CI a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
ileixe committed Feb 15, 2022
1 parent 342e490 commit 1356d9a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 3 deletions.
1 change: 1 addition & 0 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
status = ["bors-chrometrace"]
14 changes: 14 additions & 0 deletions tekton/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Configure Tekton CI
===================

- Install `git-clone` task

```bash
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/git-clone/0.5/git-clone.yaml
```

- Install trigger, pipelines and tasks

```bash
kubectl apply -f ./tekton
```
29 changes: 27 additions & 2 deletions tekton/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,29 @@ spec:
body.repository.name in ['tracing-chrometrace']
bindings:
- ref: tekton-ci-github-base
kind: ClusterTriggerBinding
- ref: tekton-ci-webhook-pull-request
kind: ClusterTriggerBinding
template:
ref: tracing-chrometrace
---
apiVersion: triggers.tekton.dev/v1alpha1
kind: Trigger
metadata:
name: tracing-chrometrace-push
namespace: ci-tracing-chrometrace
labels:
ci.tekton.dev/trigger-type: github.push
spec:
interceptors:
- cel:
filter: >-
body.repository.name in ['tracing-chrometrace']
bindings:
- ref: tekton-ci-github-base
kind: ClusterTriggerBinding
- ref: tekton-ci-webhook-push
kind: ClusterTriggerBinding
template:
ref: tracing-chrometrace
---
Expand Down Expand Up @@ -105,9 +127,12 @@ metadata:
name: test
namespace: ci-tracing-chrometrace
spec:
workspaces:
- name: source
steps:
- name: 64dpes
image: ubuntu:20.04
- name: test
image: rustlang/rust:nightly-bullseye-slim
workingDir: $(workspaces.source.path)
script: |
#!/usr/bin/env bash
cargo test --verbose
2 changes: 1 addition & 1 deletion tests/integration_test.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[test]
fn test_layer_init() {
use tracing_chrometrace::ChromeLayer;
use tracing_subscriber::{prelude::*, Registry};
use tracing_subscriber::prelude::*;

tracing_subscriber::registry()
.with(ChromeLayer::default())
Expand Down

0 comments on commit 1356d9a

Please sign in to comment.