Changing build script
This commit is contained in:
parent
ca13729fef
commit
a77792eaa5
2 changed files with 76 additions and 0 deletions
72
.gitlab-ci.yml
Normal file
72
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,72 @@
|
|||
<<<<<<< HEAD
|
||||
stages:
|
||||
- prebuild
|
||||
- build
|
||||
- postbuild
|
||||
prebuild:
|
||||
stage: prebuild
|
||||
rules:
|
||||
- if: '$CI_COMMIT_TAG'
|
||||
tags:
|
||||
- Builder-1
|
||||
script:
|
||||
- docker build --no-cache -f Dockerfile-builder -t builder:latest .
|
||||
|
||||
tileos-sway-amd64:
|
||||
when: manual
|
||||
stage: build
|
||||
variables:
|
||||
DESKTOP: sway
|
||||
tags:
|
||||
- iso-builder
|
||||
script:
|
||||
- eval $(ssh-agent -s)
|
||||
- mkdir ~/.ssh/
|
||||
- echo "$BASE64_TILEOS_ISO_STORAGE_KEY" | base64 -d > ~/.ssh/id_rsa
|
||||
- echo "$TILEOS_ISO_STORAGE_CONFIG" > ~/.ssh/config
|
||||
- chmod 644 ~/.ssh/config
|
||||
- chmod 400 ~/.ssh/id_rsa
|
||||
- docker run --privileged --rm -i -v ${CI_PROJECT_DIR}/output:/builder/builds -v /proc:/proc -e DESKTOP=sway builder:latest /bin/bash -s etc/terraform.conf < build.sh
|
||||
- ssh -o StrictHostKeyChecking=no tileos@tileos rm -rf /media/iso/tile-os/testing/sway/*
|
||||
- scp -o StrictHostKeyChecking=no -p -B ${CI_PROJECT_DIR}/output/amd64/* tileos@tileos:/media/iso/tile-os/testing/sway/
|
||||
|
||||
tileos-river-amd64:
|
||||
rules:
|
||||
- if: '$CI_COMMIT_TAG'
|
||||
when: manual
|
||||
stage: build
|
||||
variables:
|
||||
DESKTOP: sway
|
||||
tags:
|
||||
- Builder-1
|
||||
script:
|
||||
- eval $(ssh-agent -s)
|
||||
- mkdir ~/.ssh/
|
||||
- echo "$BASE64_TILEOS_ISO_STORAGE_KEY" | base64 -d > ~/.ssh/id_rsa
|
||||
- echo "$TILEOS_ISO_STORAGE_CONFIG" > ~/.ssh/config
|
||||
- chmod 644 ~/.ssh/config
|
||||
- chmod 400 ~/.ssh/id_rsa
|
||||
- docker run --privileged --rm -i -v ${CI_PROJECT_DIR}/output:/builder/builds -v /proc:/proc -e DESKTOP=river builder:latest /bin/bash -s etc/terraform.conf < build.sh
|
||||
- ssh -o StrictHostKeyChecking=no tileos@tileos rm -rf /media/iso/tile-os/testing/river/*
|
||||
- scp -o StrictHostKeyChecking=no -p -B ${CI_PROJECT_DIR}/output/amd64/* tileos@tileos:/media/iso/tile-os/testing/river/
|
||||
|
||||
mrproper:
|
||||
rules:
|
||||
- if: '$CI_COMMIT_TAG'
|
||||
stage: postbuild
|
||||
when: on_success
|
||||
tags:
|
||||
- Builder-1
|
||||
needs:
|
||||
- tileos-sway-amd64
|
||||
- tileos-river-amd64
|
||||
script:
|
||||
- docker system prune -a -f
|
||||
=======
|
||||
build:
|
||||
when: manual
|
||||
stage: build
|
||||
script:
|
||||
- docker run --privileged -i -v /proc:/proc -v ${PWD}:/working_dir -w /working_dir -e DESKTOP=sway debian:latest /bin/bash -s etc/terraform.conf < build.sh
|
||||
|
||||
>>>>>>> 4af10dc (Adding CI)
|
4
Dockerfile-builder
Normal file
4
Dockerfile-builder
Normal file
|
@ -0,0 +1,4 @@
|
|||
FROM debian:bookworm
|
||||
RUN echo 'Acquire::http::Proxy "http://10.10.50.23:3142";' > /etc/apt/apt.conf.d/00aptproxy
|
||||
WORKDIR /builder
|
||||
COPY . /builder/
|
Loading…
Add table
Reference in a new issue