diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 9649276b..ebd36f4b 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -33,7 +33,9 @@ blocks: - name: Cache Go dependencies commands: - cache restore - - go mod download -x + - go mod tidy + - git diff --exit-code go.mod + - git diff --exit-code go.sum - cache store - name: Build and check commands: @@ -77,3 +79,27 @@ blocks: - name: KubeDNS Suite commands: - "make test-integration-nobuild TESTFLAGS=\"-check.f KubeDNSSuite\"" + + - name: Release + run: + when: "tag =~ '.*'" + task: + secrets: + - name: mesh + + env_vars: + - name: SEIHON_VERSION + value: 0.8.3 + + jobs: + - name: Release + commands: + - curl -sL https://git.io/goreleaser | bash -s -- --timeout="60m" + + - name: Publish Images + commands: + # Install Docker image multi-arch builder + - curl -sfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | sudo bash -s -- -b "/usr/local/bin" ${SEIHON_VERSION} + - seihon --version + - docker run --rm --privileged hypriot/qemu-register + - make publish-images diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d359d654..00000000 --- a/.travis.yml +++ /dev/null @@ -1,67 +0,0 @@ -language: go - -go: - - 1.16.x - -os: linux - -dist: xenial - -git: - depth: false - -notifications: - email: - on_success: never - on_failure: change - -cache: - directories: - - $GOPATH/pkg/mod - -jobs: - fast_finish: true - include: - - go: 1.16.x - env: STABLE=true - -env: - global: - - GO111MODULE=on - -services: - - docker - -script: - - echo "Skipping tests... (Tests are executed on SemaphoreCI)" -install: - - go mod tidy - - git diff --exit-code go.mod - - git diff --exit-code go.sum - - go mod download - -before_deploy: - - echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin; - # Copy Semaphore yml file - - mkdir -p site/.semaphore - - cp ./.semaphore/semaphore.yml site/.semaphore/semaphore.yml - # Install linters - - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin ${GOLANGCI_LINT_VERSION} - - golangci-lint --version - # Install Docker image multi-arch builder - - curl -sfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | bash -s -- -b "${GOPATH}/bin" ${SEIHON_VERSION} - - seihon --version - - docker run --rm --privileged hypriot/qemu-register -deploy: - - provider: script - skip_cleanup: true - script: curl -sL https://git.io/goreleaser | bash -s -- --timeout="60m" - on: - tags: true - condition: $STABLE = true - - provider: script - skip_cleanup: true - script: make publish-images - on: - tags: true - condition: $STABLE = true