Skip to content

Commit

Permalink
Merge pull request #419 from netbootxyz/RC
Browse files Browse the repository at this point in the history
Go Live 1.9.9
  • Loading branch information
antonym authored Dec 14, 2019
2 parents 29afdf6 + a15f591 commit 8d8db7e
Show file tree
Hide file tree
Showing 120 changed files with 3,124 additions and 1,481 deletions.
186 changes: 164 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,165 @@
sudo: true
dist: xenial
language: c
before_install:
- openssl aes-256-cbc -K $encrypted_7d306b01dc1f_key -iv $encrypted_7d306b01dc1f_iv -in script/secrets.tar.enc -out script/secrets.tar -d
- tar xvf script/secrets.tar -C script/
- sudo apt-get update -qq
- sudo apt-get install -qq binutils-dev binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu genisoimage liblzma-dev syslinux syslinux-common isolinux
- sudo pip install awscli tornado
script:
- "./script/prep-release.sh"
deploy:
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $BUCKET_BOOT
local_dir: build
skip_cleanup: true
on:
repo: antonym/netboot.xyz
after_deploy:
- aws configure set preview.cloudfront true
- aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DIST_ID_BOOT --paths "/*"

language: bash

services:
- docker

env:
global:
- DEBIAN_FRONTEND="noninteractive"

jobs:
include:
- stage: test
if: type = pull_request
language: python
install:
- pip install ansible ansible-lint
- ansible-lint --version
script:
- ansible-playbook -i inventory site.yml --syntax-check
- ansible-lint -v roles/netbootxyz

- stage: development
if: branch = development AND type != pull_request
script:
- ./script/build_release dev
after_failure:
- ./script/message failure
deploy:
- provider: s3
edge: true
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $BUCKET_DEV
local_dir: s3out
upload-dir: $TRAVIS_COMMIT
skip_cleanup: true
on:
branch: development
after_deploy:
- ./script/message dev-push

- stage: pull-request
if: type = pull_request
script:
- ./script/build_release pr

- stage: release-candidate
if: branch = RC AND type != pull_request
before_install:
- ./script/pre_install
script:
- ./script/build_release rc
workspaces:
create:
name: githubassets
paths:
- githubout
after_failure:
- ./script/message failure
before_deploy:
- export RELEASE_TAG=$(cat version.txt)-RC
deploy:
- provider: s3
edge: true
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $BUCKET_LIVE
local_dir: s3out-latest
upload-dir: rc
skip_cleanup: true
on:
branch: RC
- provider: s3
edge: true
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $BUCKET_LIVE
local_dir: s3out
upload-dir: $RELEASE_TAG
skip_cleanup: true
on:
branch: RC

- stage: rc-github
if: branch = RC AND type != pull_request
before_install:
- ./script/pre_install
workspaces:
use: githubassets
script: skip
before_deploy:
- export RELEASE_TAG=$(cat version.txt)-RC
- git tag ${RELEASE_TAG}
deploy:
- provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: githubout/*
prerelease: true
skip_cleanup: true
on:
branch: RC
after_deploy:
- aws configure set preview.cloudfront true
- aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DIST_ID_BOOT --paths "rc/*" "rc/ipxe/*"
- ./script/message rc-push

- stage: release
if: branch = master AND type != pull_request
script:
- ./script/build_release release
workspaces:
create:
name: githubassets
paths:
- githubout
after_failure:
- ./script/message failure
before_deploy:
- export RELEASE_TAG=$(cat version.txt)
deploy:
- provider: s3
edge: true
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $BUCKET_LIVE
local_dir: s3out-latest
skip_cleanup: true
on:
branch: master
- provider: s3
edge: true
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $BUCKET_LIVE
local_dir: s3out
upload-dir: $RELEASE_TAG
skip_cleanup: true
on:
branch: master

- stage: release-github
if: branch = master AND type != pull_request
before_install:
- ./script/pre_install
workspaces:
use: githubassets
script: skip
before_deploy:
- export RELEASE_TAG=$(cat version.txt)
- git tag ${RELEASE_TAG}
deploy:
- provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: githubout/*
skip_cleanup: true
on:
branch: master
after_deploy:
- aws configure set preview.cloudfront true
- aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DIST_ID_BOOT --paths "/*" "/ipxe/*"
- ./script/message live-push
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ idea, feel free to open up a Github [issue] or open up a [Pull Request].

## Enjoy and have fun!

[issue]: https://github.com/antonym/netboot.xyz/issues/new
[Pull Request]: https://github.com/antonym/netboot.xyz/pulls
[issue]: https://github.com/netbootxyz/netboot.xyz/issues/new
[Pull Request]: https://github.com/netbootxyz/netboot.xyz/pulls
32 changes: 32 additions & 0 deletions Dockerfile-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM ubuntu:bionic as builder

RUN \
echo "**** install deps ****" && \
apt-get update && \
apt-get install -y \
ansible \
apache2 \
build-essential \
dosfstools \
genisoimage \
git \
liblzma-dev \
python-minimal \
python-yaml \
syslinux

# repo for build
COPY . /ansible

RUN \
echo "**** running ansible ****" && \
cd /ansible && \
ansible-playbook -i inventory site.yml

# runtime stage
FROM alpine:3.10

COPY --from=builder /var/www/html/ /mnt/
COPY docker-build-root/ /

ENTRYPOINT [ "/dumper.sh" ]
Loading

0 comments on commit 8d8db7e

Please sign in to comment.