mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
Merge pull request #96 from tomochain/feature/release-pipeline
Add pipeline for tagged release
This commit is contained in:
commit
4e71b9bf81
2 changed files with 44 additions and 14 deletions
52
.travis.yml
52
.travis.yml
|
|
@ -2,10 +2,10 @@ sudo: required
|
|||
language: go
|
||||
go_import_path: github.com/ethereum/go-ethereum
|
||||
services: skip
|
||||
before_install: skip
|
||||
|
||||
jobs:
|
||||
include:
|
||||
|
||||
- stage: Lint
|
||||
os: linux
|
||||
sudo: false
|
||||
|
|
@ -15,6 +15,7 @@ jobs:
|
|||
submodules: false
|
||||
script:
|
||||
- go run build/ci.go lint
|
||||
|
||||
- stage: Build and test
|
||||
os: linux
|
||||
dist: trusty
|
||||
|
|
@ -38,28 +39,59 @@ jobs:
|
|||
- while sleep 540; do echo "[ still running ]"; done &
|
||||
- go run build/ci.go test -coverage
|
||||
- kill %1
|
||||
- stage: Build and push tomochain/tomochain and tomochain/bootnode containers
|
||||
|
||||
- stage: Github release
|
||||
script:
|
||||
- make tomo
|
||||
- mv build/bin/tomo build/bin/tomo-linux-amd64
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key: $GITHUB_TOKEN
|
||||
file:
|
||||
- "build/bin/tomo-linux-amd64"
|
||||
skip_cleanup: true
|
||||
on:
|
||||
branch: master
|
||||
tags: true
|
||||
|
||||
- stage: Build and push tomochain/tomochain image
|
||||
services:
|
||||
- docker
|
||||
before_install:
|
||||
- docker build -t tomochain/tomochain .
|
||||
- docker run tomochain/tomochain
|
||||
install: skip
|
||||
script: skip
|
||||
deploy:
|
||||
provider: script
|
||||
script: bash docker_push.sh
|
||||
on:
|
||||
branch: master
|
||||
- provider: script
|
||||
script:
|
||||
- bash docker_push.sh latest
|
||||
- bash docker_push.sh $TRAVIS_BUILD_ID
|
||||
on:
|
||||
branch: master
|
||||
tags: false
|
||||
- provider: script
|
||||
script:
|
||||
- bash docker_push.sh latest
|
||||
- bash docker_push.sh $TRAVIS_TAG
|
||||
on:
|
||||
branch: master
|
||||
tags: true
|
||||
|
||||
- stage: Trigger rebuild of tomochain/infra-tomochain image
|
||||
sudo: false
|
||||
install: skip
|
||||
script: bash docker_rebuild.sh
|
||||
|
||||
stages:
|
||||
- name: Lint
|
||||
- name: Build and test
|
||||
- name: Build and push Docker image
|
||||
if: type != pull_request AND branch = master
|
||||
- name: Trigger rebuild of infrastructure image
|
||||
if: type != pull_request AND branch = master
|
||||
- name: Github release
|
||||
if: type != pull_request AND branch = master AND tag = true AND repo = tomochain/tomochain
|
||||
- name: Build and push tomochain/tomochain image
|
||||
if: type != pull_request AND branch = master AND repo = tomochain/tomochain
|
||||
- name: Trigger rebuild of tomochain/infra-tomochain image
|
||||
if: type != pull_request AND branch = master AND repo = tomochain/tomochain
|
||||
|
||||
notifications:
|
||||
slack:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
||||
docker tag tomochain/tomochain tomochain/tomochain:latest
|
||||
docker tag tomochain/tomochain tomochain/tomochain:$TRAVIS_BUILD_ID
|
||||
docker push tomochain/tomochain:latest
|
||||
docker push tomochain/tomochain:$TRAVIS_BUILD_ID
|
||||
docker tag tomochain/tomochain tomochain/tomochain:$1
|
||||
docker push tomochain/tomochain:$1
|
||||
|
|
|
|||
Loading…
Reference in a new issue