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
|
language: go
|
||||||
go_import_path: github.com/ethereum/go-ethereum
|
go_import_path: github.com/ethereum/go-ethereum
|
||||||
services: skip
|
services: skip
|
||||||
before_install: skip
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
|
|
||||||
- stage: Lint
|
- stage: Lint
|
||||||
os: linux
|
os: linux
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
@ -15,6 +15,7 @@ jobs:
|
||||||
submodules: false
|
submodules: false
|
||||||
script:
|
script:
|
||||||
- go run build/ci.go lint
|
- go run build/ci.go lint
|
||||||
|
|
||||||
- stage: Build and test
|
- stage: Build and test
|
||||||
os: linux
|
os: linux
|
||||||
dist: trusty
|
dist: trusty
|
||||||
|
|
@ -38,28 +39,59 @@ jobs:
|
||||||
- while sleep 540; do echo "[ still running ]"; done &
|
- while sleep 540; do echo "[ still running ]"; done &
|
||||||
- go run build/ci.go test -coverage
|
- go run build/ci.go test -coverage
|
||||||
- kill %1
|
- 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:
|
services:
|
||||||
- docker
|
- docker
|
||||||
before_install:
|
before_install:
|
||||||
- docker build -t tomochain/tomochain .
|
- docker build -t tomochain/tomochain .
|
||||||
- docker run tomochain/tomochain
|
- docker run tomochain/tomochain
|
||||||
|
install: skip
|
||||||
|
script: skip
|
||||||
deploy:
|
deploy:
|
||||||
provider: script
|
- provider: script
|
||||||
script: bash docker_push.sh
|
script:
|
||||||
on:
|
- bash docker_push.sh latest
|
||||||
branch: master
|
- 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
|
- stage: Trigger rebuild of tomochain/infra-tomochain image
|
||||||
sudo: false
|
sudo: false
|
||||||
|
install: skip
|
||||||
script: bash docker_rebuild.sh
|
script: bash docker_rebuild.sh
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- name: Lint
|
- name: Lint
|
||||||
- name: Build and test
|
- name: Build and test
|
||||||
- name: Build and push Docker image
|
- name: Github release
|
||||||
if: type != pull_request AND branch = master
|
if: type != pull_request AND branch = master AND tag = true AND repo = tomochain/tomochain
|
||||||
- name: Trigger rebuild of infrastructure image
|
- name: Build and push tomochain/tomochain image
|
||||||
if: type != pull_request AND branch = master
|
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:
|
notifications:
|
||||||
slack:
|
slack:
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
||||||
docker tag tomochain/tomochain tomochain/tomochain:latest
|
docker tag tomochain/tomochain tomochain/tomochain:$1
|
||||||
docker tag tomochain/tomochain tomochain/tomochain:$TRAVIS_BUILD_ID
|
docker push tomochain/tomochain:$1
|
||||||
docker push tomochain/tomochain:latest
|
|
||||||
docker push tomochain/tomochain:$TRAVIS_BUILD_ID
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue