forked from apollographql/apollo-mcp-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodefresh.yml
More file actions
108 lines (99 loc) · 2.39 KB
/
codefresh.yml
File metadata and controls
108 lines (99 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
version: '1.0'
mode: parallel
stages:
- prepare
- code
- container
steps:
clone_repo:
stage: prepare
title: Clone repository
type: git-clone
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
revision: '${{CF_REVISION}}'
working_directory: clone_repo
git: 'github-integration'
setup_rust:
stage: prepare
title: Setup Rust toolchain
image: rust:1.75
working_directory: clone_repo/apollo-mcp-server
commands:
- rustc --version
- cargo --version
- rustup component add rust-analyzer rust-src
- pwd
- ls -la
- find . -name "Cargo.toml" -type f
when:
steps:
- name: clone_repo
on: [ success ]
cargo_check:
stage: code
description: Compile code to check for errors
title: Cargo check
image: rust:1.75
working_directory: clone_repo/apollo-mcp-server
commands:
- cargo check --all
when:
steps:
- name: setup_rust
on: [ success ]
cargo_clippy:
stage: code
description: Check the code for style issues and linting errors
title: Cargo clippy
image: rust:1.75
working_directory: clone_repo/apollo-mcp-server
commands:
- cargo clippy --all -- -D warnings
when:
steps:
- name: cargo_check
on: [ success ]
cargo_test:
stage: code
description: Run all tests and check for errors
title: Cargo test
image: rust:1.75
working_directory: clone_repo/apollo-mcp-server
commands:
- cargo test --all
when:
steps:
- name: cargo_clippy
on: [ success ]
build_container:
stage: container
title: Build container image
type: build
working_directory: clone_repo/apollo-mcp-server
dockerfile: Dockerfile
image_name: apollo-mcp-server
tag: '${{CF_SHORT_REVISION}}'
build_arguments:
- CF_REVISION=${{CF_REVISION}}
- CF_BRANCH=${{CF_BRANCH}}
disable_push: true
when:
steps:
- name: cargo_build_release
on: [ success ]
push_main:
stage: container
title: Push to main registry
type: push
candidate: ${{build_container}}
registry: '${{CONTAINER_REGISTRY_MAIN}}'
image_name: 'container/apollo-mcp-server'
tag: '${{CF_SHORT_REVISION}}'
tags:
- latest
when:
branch:
only: [ main ]
steps:
- name: build_container
on: [ success ]