-
-
Notifications
You must be signed in to change notification settings - Fork 698
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #419 from netbootxyz/RC
Go Live 1.9.9
- Loading branch information
Showing
120 changed files
with
3,124 additions
and
1,481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |
Oops, something went wrong.