forked from extern/nushell
Merge pull request #624 from vsoch/test/nightly-builds
Adding nightly build to CircleCI
This commit is contained in:
commit
1878bb8a54
@ -10,11 +10,15 @@ version: 2.1
|
|||||||
commands:
|
commands:
|
||||||
|
|
||||||
pull_cache:
|
pull_cache:
|
||||||
description: Pulls Quay.io docker images usable for our cache
|
description: Pulls Quay.io docker images (latest) for our cache
|
||||||
|
parameters:
|
||||||
|
tag:
|
||||||
|
type: string
|
||||||
|
default: "devel"
|
||||||
steps:
|
steps:
|
||||||
- run: docker pull quay.io/nushell/nu:latest
|
- run: echo "Tag is << parameters.tag >>"
|
||||||
- run: docker pull quay.io/nushell/nu-base:latest
|
- run: docker pull quay.io/nushell/nu:<< parameters.tag >>
|
||||||
|
- run: docker pull quay.io/nushell/nu-base:<< parameters.tag >>
|
||||||
|
|
||||||
orbs:
|
orbs:
|
||||||
# https://circleci.com/orbs/registry/orb/circleci/docker
|
# https://circleci.com/orbs/registry/orb/circleci/docker
|
||||||
@ -31,7 +35,7 @@ workflows:
|
|||||||
image: nushell/nu-base
|
image: nushell/nu-base
|
||||||
tag: latest
|
tag: latest
|
||||||
dockerfile: docker/Dockerfile.nu-base
|
dockerfile: docker/Dockerfile.nu-base
|
||||||
extra_build_args: --cache-from=quay.io/nushell/nu-base:latest,quay.io/nushell/nu:latest
|
extra_build_args: --cache-from=quay.io/nushell/nu-base:devel
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
ignore:
|
ignore:
|
||||||
@ -53,20 +57,21 @@ workflows:
|
|||||||
build_with_deploy:
|
build_with_deploy:
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
# Deploy versioned and latest images on tags (releases) only.
|
# Deploy versioned and latest images on tags (releases) only - builds --release.
|
||||||
- docker/publish:
|
- docker/publish:
|
||||||
image: nushell/nu-base
|
image: nushell/nu-base
|
||||||
registry: quay.io
|
registry: quay.io
|
||||||
tag: latest
|
tag: latest
|
||||||
dockerfile: docker/Dockerfile.nu-base
|
dockerfile: docker/Dockerfile.nu-base
|
||||||
extra_build_args: --cache-from=quay.io/nushell/nu-base:latest,quay.io/nushell/nu:latest
|
extra_build_args: --cache-from=quay.io/nushell/nu-base:latest,quay.io/nushell/nu:latest --build-arg RELEASE=true
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
ignore: /.*/
|
ignore: /.*/
|
||||||
tags:
|
tags:
|
||||||
only: /^v.*/
|
only: /^v.*/
|
||||||
before_build:
|
before_build:
|
||||||
- pull_cache
|
- run: docker pull quay.io/nushell/nu:latest
|
||||||
|
- run: docker pull quay.io/nushell/nu-base:latest
|
||||||
after_build:
|
after_build:
|
||||||
- run:
|
- run:
|
||||||
name: Build Multistage (smaller) container
|
name: Build Multistage (smaller) container
|
||||||
@ -83,7 +88,7 @@ workflows:
|
|||||||
docker push quay.io/nushell/nu
|
docker push quay.io/nushell/nu
|
||||||
|
|
||||||
|
|
||||||
# publish devel to Docker Hub on merge to master
|
# publish devel to Docker Hub on merge to master (doesn't build --release)
|
||||||
build_with_deploy_devel:
|
build_with_deploy_devel:
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
@ -93,7 +98,7 @@ workflows:
|
|||||||
registry: quay.io
|
registry: quay.io
|
||||||
tag: devel
|
tag: devel
|
||||||
dockerfile: docker/Dockerfile.nu-base
|
dockerfile: docker/Dockerfile.nu-base
|
||||||
extra_build_args: --cache-from=quay.io/nushell/nu-base:latest,quay.io/nushell/nu:latest --build-arg RELEASE=true
|
extra_build_args: --cache-from=quay.io/nushell/nu-base:devel
|
||||||
before_build:
|
before_build:
|
||||||
- pull_cache
|
- pull_cache
|
||||||
filters:
|
filters:
|
||||||
@ -109,3 +114,36 @@ workflows:
|
|||||||
command: |
|
command: |
|
||||||
docker push quay.io/nushell/nu-base:devel
|
docker push quay.io/nushell/nu-base:devel
|
||||||
docker push quay.io/nushell/nu:devel
|
docker push quay.io/nushell/nu:devel
|
||||||
|
|
||||||
|
nightly:
|
||||||
|
jobs:
|
||||||
|
- docker/publish:
|
||||||
|
image: nushell/nu-base
|
||||||
|
registry: quay.io
|
||||||
|
tag: nightly
|
||||||
|
dockerfile: docker/Dockerfile.nu-base
|
||||||
|
extra_build_args: --cache-from=quay.io/nushell/nu-base:nightly --build-arg RELEASE=true
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: master
|
||||||
|
before_build:
|
||||||
|
- run: docker pull quay.io/nushell/nu:nightly
|
||||||
|
- run: docker pull quay.io/nushell/nu-base:nightly
|
||||||
|
after_build:
|
||||||
|
- run:
|
||||||
|
name: Build Multistage (smaller) container
|
||||||
|
command: |
|
||||||
|
docker build -f docker/Dockerfile -t quay.io/nushell/nu:nightly .
|
||||||
|
- run:
|
||||||
|
name: Publish Nightly Nushell Containers
|
||||||
|
command: |
|
||||||
|
docker push quay.io/nushell/nu-base:nightly
|
||||||
|
docker push quay.io/nushell/nu:nightly
|
||||||
|
|
||||||
|
triggers:
|
||||||
|
- schedule:
|
||||||
|
cron: "0 22 * * *"
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
Loading…
Reference in New Issue
Block a user