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

Commit

Permalink
feat(ci-build): Initial travis / semantic release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkoura committed Dec 29, 2019
1 parent b65a5dd commit b20f3a3
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "build"]
path = build
url = https://github.com/nikkoura/semantic-release-ci-docker.git
1 change: 1 addition & 0 deletions build
Submodule build added at 9e08f5
65 changes: 65 additions & 0 deletions travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
language: shell

env:
global:
- IMAGE_BASE_NAME=${IMAGE_BASE_NAME}

jobs:
include:
- stage: "build and test"
name: build-amd64
arch: amd64
workspaces:
create:
name: docker-image-amd64
paths:
- image-amd64.tar
os: linux
language: shell
script:
- IMAGE_VERSION=${TRAVIS_BRANCH} build/build-arch.sh
#TODO: call test script if available
- name: build-arm64
arch: arm64
workspaces:
create:
name: docker-image-arm64
paths:
- image-arm64.tar
os: linux
language: shell
script:
- IMAGE_VERSION=${TRAVIS_BRANCH} build/build-arch.sh
#TODO: call test script if available

- stage: auto-tag
language: node_js
arch: amd64
os: linux
node_js: lts/*
if: tag IS blank AND branch = master AND type != pull_request AND fork = false
script:
- build/autotag.sh

- stage: push
arch: amd64
os: linux
language: shell
if: tag IS present and fork = false
workspaces:
use:
- docker-image-amd64
- docker-image-arm64
script:
- docker image load -i image-amd64.tar
- IMAGE_VERSION=${TRAVIS_TAG} TARGET_ARCH=amd64 build/push-arch.sh
- docker image load -i image-arm64.tar
- IMAGE_VERSION=${TRAVIS_TAG} TARGET_ARCH=arm64 build/push-arch.sh

- stage: manifest
language: shell
arch: amd64
os: linux
if: tag IS present and fork = false
script:
- IMAGE_VERSION=${TRAVIS_TAG} build/manifest.sh

0 comments on commit b20f3a3

Please sign in to comment.