Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Move from Travis to Semaphore CI #770

Merged
merged 3 commits into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
35 changes: 35 additions & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: v1.0
name: CI Build

agent:
machine:
type: e1-standard-2
os_image: ubuntu1804

blocks:
- name: Run tests
task:
env_vars:
- name: GIMME_GO_VERSION
value: "1.14.2"
jobs:
- name: Tests
commands:
- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | bash)" # install specific go version
- |
# https://ignite.readthedocs.io/en/latest/installation.html
sudo apt-get install -y cpu-checker
sudo apt-get install -y --no-install-recommends dmsetup openssh-client git binutils
# Install containerd if it's not present -- prevents breaking docker-ce installations
sudo which containerd || sudo apt-get install -y --no-install-recommends containerd
- kvm-ok
- |
export CNI_VERSION=v0.8.7
export ARCH=$([ $(uname -m) = "x86_64" ] && echo amd64 || echo arm64)
sudo mkdir -p /opt/cni/bin
curl -sSL https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-linux-${ARCH}-${CNI_VERSION}.tgz | sudo tar -xz -C /opt/cni/bin
- checkout
- make ignite ignite-spawn ignited bin/amd64/Dockerfile GO_MAKE_TARGET=local
- make test
- make root-test
- make e2e-nobuild # this depends on Semaphore CI's support for nested virtualization
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ test-in-docker:

# Run tests that require root.
root-test:
sudo $(shell which go) test -mod=vendor -v $(TEST_REQUIRES_ROOT_PACKAGES) -count=$(TEST_COUNT)
sudo -E $(shell which go) test -mod=vendor -v $(TEST_REQUIRES_ROOT_PACKAGES) -count=$(TEST_COUNT)

graph:
hack/graph.sh
Expand Down Expand Up @@ -278,7 +278,7 @@ bin/docs/builder-image.tar:
e2e: build-all e2e-nobuild

e2e-nobuild:
sudo IGNITE_E2E_HOME=$(shell pwd) \
sudo -E IGNITE_E2E_HOME=$(shell pwd) \
$(shell which go) test \
$(TEST_E2E_PACKAGES) -v -mod=vendor \
-count $(E2E_COUNT) \
Expand Down
2 changes: 1 addition & 1 deletion cmd/ignite/run/testdata/output/ps-filtered-table.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VM ID IMAGE KERNEL SIZE CPUS MEMORY CREATED STATUS IPS PORTS NAME
bfc80c948b1e2419 foo/bar:latest foo/bar:latest 0 B 0 0 B 20y ago Stopped vm2
bfc80c948b1e2419 foo/bar:latest foo/bar:latest 0 B 0 0 B 21y ago Stopped vm2
6 changes: 3 additions & 3 deletions cmd/ignite/run/testdata/output/ps-table.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VM ID IMAGE KERNEL SIZE CPUS MEMORY CREATED STATUS IPS PORTS NAME
20e1d566ce318ada foo/bar:latest foo/bar:latest 0 B 0 0 B 20y ago Stopped vm1
bfc80c948b1e2419 foo/bar:latest foo/bar:latest 0 B 0 0 B 20y ago Stopped vm2
cddc37ba657766e3 foo/bar:latest foo/bar:latest 0 B 0 0 B 20y ago Stopped vm3
20e1d566ce318ada foo/bar:latest foo/bar:latest 0 B 0 0 B 21y ago Stopped vm1
bfc80c948b1e2419 foo/bar:latest foo/bar:latest 0 B 0 0 B 21y ago Stopped vm2
cddc37ba657766e3 foo/bar:latest foo/bar:latest 0 B 0 0 B 21y ago Stopped vm3