Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce organisation impact of semaphore job #2854

Merged
merged 4 commits into from
Jun 21, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 22 additions & 36 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ agent:

auto_cancel:
running:
when: "branch != 'master'"
when: "true"
queued:
when: "branch != 'master'"
when: "true"

queue:
# Run PR builds in parallel excluding automated pin updates from being classed as PRs.
- when: "pull_request =~ '.+' AND branch !~ 'semaphore-auto.*'"
name: "PRs"
processing: parallel

# Run everything else serially on a second queue. This means that master and release branch builds
# will be queued with automated pin updates.
- when: "true"
name: "Automated builds"
processing: serialized

promotions:
- name: Cleanup
Expand Down Expand Up @@ -47,21 +59,24 @@ blocks:
type: e1-standard-4
os_image: ubuntu1804
jobs:
- name: Build
- name: Build and run UT, k8sfv
nelljerram marked this conversation as resolved.
Show resolved Hide resolved
execution_time_limit:
minutes: 20
commands:
- checkout
- cache restore go-pkg-cache
- cache restore go-mod-cache
- >-
make image fv/fv.test bin/test-workload bin/test-connection
make image-all fv/fv.test bin/test-workload bin/test-connection
bin/calico-felix
- 'cache store bin-${SEMAPHORE_GIT_SHA} bin'
- cache store go-pkg-cache .go-pkg-cache
- 'cache store go-mod-cache ${HOME}/go/pkg/mod/cache'
- docker save -o /tmp/calico-felix.tar calico/felix:latest-amd64
- 'cache store felix-image-${SEMAPHORE_GIT_SHA} /tmp/calico-felix.tar'
- make ut
- make k8sfv-test JUST_A_MINUTE=true USE_TYPHA=true
- make k8sfv-test JUST_A_MINUTE=true USE_TYPHA=false
- name: FV Tests
dependencies: ["Build"]
task:
Expand Down Expand Up @@ -100,7 +115,7 @@ blocks:
- ./.semaphore/collect-artifacts
- ./.semaphore/publish-artifacts
- name: BPF UT/FV tests on new kernel
dependencies: []
dependencies: ["Build"]
task:
prologue:
commands:
Expand Down Expand Up @@ -135,8 +150,8 @@ blocks:
- gcloud --quiet compute instances delete ${VM_NAME} --zone=${ZONE}
secrets:
- name: google-service-account-for-gce
- name: Static checks
dependencies: []
- name: Static checks on e1-standard-8
dependencies: ["Build"]
task:
agent:
machine:
Expand All @@ -154,35 +169,6 @@ blocks:
minutes: 15
commands:
- make static-checks
- name: Multi-arch builds, UT, k8sfv-tests
dependencies: []
task:
prologue:
commands:
- checkout
- cache restore go-pkg-cache
- cache restore go-mod-cache
jobs:
- name: Build All
execution_time_limit:
minutes: 60
commands:
- make image-all
- name: UT
execution_time_limit:
minutes: 60
commands:
- make ut
- name: K8sfv with Typha
execution_time_limit:
minutes: 60
commands:
- make k8sfv-test JUST_A_MINUTE=true USE_TYPHA=true
- name: K8sfv without Typha
execution_time_limit:
minutes: 60
commands:
- make k8sfv-test JUST_A_MINUTE=true USE_TYPHA=false
- name: Trigger pin updates
dependencies: []
skip:
Expand Down