mirror of
https://github.com/Ralim/IronOS.git
synced 2025-07-23 04:13:01 +02:00
Rough pass at builder
This commit is contained in:
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# Ignore all differences in line endings
|
||||
* -crlf
|
3
.gitignore
vendored
3
.gitignore
vendored
@@ -61,3 +61,6 @@ workspace/TS100/Hexfile/
|
||||
workspace/RemoteSystemsTempFiles/
|
||||
workspace/TS100/.settings/
|
||||
workspace/TS100/TS80/
|
||||
ci/artefacts/
|
||||
ci/secrets/unencrypted/
|
||||
codeship.aes
|
||||
|
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM ubuntu:rolling
|
||||
MAINTAINER Ben V. Brown <ralim@ralimtek.com>
|
||||
|
||||
WORKDIR /build
|
||||
# Setup the ARM GCC toolchain
|
||||
|
||||
# Install any needed packages specified in requirements.txt
|
||||
RUN apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y \
|
||||
make \
|
||||
git \
|
||||
bzip2 \
|
||||
git \
|
||||
golang \
|
||||
python3 \
|
||||
wget && \
|
||||
apt-get clean && \
|
||||
wget -qO- https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 | tar -xj
|
||||
|
||||
# Add compiler to the path
|
||||
|
||||
ENV PATH "/build/gcc-arm-none-eabi-9-2019-q4-major/bin:$PATH"
|
||||
# Get the github release tool
|
||||
RUN go get -u github.com/aktau/github-release
|
||||
COPY . /build/source
|
||||
COPY ./ci /build/ci
|
13
ci/buildAll.sh
Normal file
13
ci/buildAll.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
set -u
|
||||
|
||||
mkdir -p /build/ci/artefacts
|
||||
|
||||
# Build STM code
|
||||
cd /build/source/workspace/TS100/
|
||||
bash ./build.sh || exit 1
|
||||
echo "All Firmware built"
|
||||
# Copy out all the final resulting files we would like to store for the next op
|
||||
cp -r /build/source/workspace/TS100/Hexfile/*.hex /build/ci/artefacts/
|
||||
cp -r /build/source/workspace/TS100/Hexfile/*.bin /build/ci/artefacts/
|
16
ci/secrets/decrypt.sh
Normal file
16
ci/secrets/decrypt.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
SECRETS="$DIR/encrypted/*.encrypted"
|
||||
KEY="$DIR/../../codeship.aes"
|
||||
|
||||
mkdir -p $DIR/unencrypted
|
||||
|
||||
for f in $SECRETS
|
||||
do
|
||||
out="${f/.encrypted/.secret}"
|
||||
out="${out/encrypted/unencrypted}"
|
||||
echo $out
|
||||
jet decrypt $f $out --key-path $KEY
|
||||
done
|
||||
|
||||
echo "Done"
|
2
ci/secrets/encrypted/deployment.encrypted
Normal file
2
ci/secrets/encrypted/deployment.encrypted
Normal file
@@ -0,0 +1,2 @@
|
||||
codeship:v2
|
||||
DUgOERb8iPVn95/DKIw9M7sgNjJlIlsaeE4PFV58tmmBu2sD1ooR7Y0L23bimC9a
|
8
codeship-services.yml
Normal file
8
codeship-services.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
builder:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
cached: true
|
||||
encrypted_env_file: ci/secrets/encrypted/deployment.encrypted
|
||||
volumes:
|
||||
- ./ci:/ci
|
11
codeship-steps.yml
Normal file
11
codeship-steps.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
- type: parallel
|
||||
name: Build the firmware
|
||||
steps:
|
||||
- name: build
|
||||
service: builder
|
||||
command: /build/ci/buildAll.sh
|
||||
|
||||
- name: deploy
|
||||
service: builder
|
||||
command: /ci/deployRelease.sh
|
||||
tag: master
|
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
version: '3'
|
||||
services:
|
||||
builder:
|
||||
stdin_open: true
|
||||
tty: true
|
||||
build:
|
||||
context: .
|
||||
command: /bin/bash
|
||||
volumes:
|
||||
- ./ci:/build/ci
|
||||
- ./:/build/source
|
2
start_dev.sh
Normal file
2
start_dev.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
docker-compose run --rm builder
|
Reference in New Issue
Block a user