From c344efc32d0a08f051cf8f7fd17831985b4ed961 Mon Sep 17 00:00:00 2001 From: Gerald Pinder <4626052+gmpinder@users.noreply.github.com> Date: Thu, 2 May 2024 16:03:35 -0400 Subject: [PATCH] Try new stages feature --- .gitlab-ci.yml | 2 +- config/scripts/install-helix.sh | 17 +++++++++++++++++ recipes/common/bluebuild.yml | 15 +++++++++++++++ recipes/common/helix.yml | 15 +++++++++++++++ recipes/jp-desktop.yml | 5 +++++ 5 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 config/scripts/install-helix.sh create mode 100644 recipes/common/bluebuild.yml create mode 100644 recipes/common/helix.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b4d3294..a8f3bcf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,7 @@ build-image: stage: build interruptible: true image: - name: ghcr.io/blue-build/cli:main + name: ghcr.io/blue-build/cli:108-feat-allow-adding-stages-to-run-builds-for-things-like-compiled-programs entrypoint: [""] services: - docker:dind diff --git a/config/scripts/install-helix.sh b/config/scripts/install-helix.sh new file mode 100644 index 0000000..f086546 --- /dev/null +++ b/config/scripts/install-helix.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail + +apt-get update && apt-get install -y git + +mkdir -p /src/ +cd /src/ + +git clone https://github.com/helix-editor/helix.git +cd helix + +RUSTFLAGS="-C target-feature=-crt-static" +cargo install --path helix-term --locked + +mkdir -p /out/ +mv $CARGO_HOME/bin/hx /out/ diff --git a/recipes/common/bluebuild.yml b/recipes/common/bluebuild.yml new file mode 100644 index 0000000..312b74f --- /dev/null +++ b/recipes/common/bluebuild.yml @@ -0,0 +1,15 @@ +stages: + - name: blue-build + image: rust + modules: + - type: containerfile + snippets: + - | + RUN cargo install blue-build --all-features --target x86_64-unknown-linux-gnu \ + && mkdir -p /out/ \ + && mv $CARGO_HOME/bin/bluebuild /out/bluebuild +modules: + - type: copy + from: blue-build + src: /out/bluebuild + dest: /usr/bin/bluebuild diff --git a/recipes/common/helix.yml b/recipes/common/helix.yml new file mode 100644 index 0000000..2ed9a47 --- /dev/null +++ b/recipes/common/helix.yml @@ -0,0 +1,15 @@ +stages: + - name: helix + image: rust + shell: + - bash + - -c + modules: + - type: script + scripts: + - install-helix.sh +modules: + - type: copy + from: helix + src: /out/helix + dest: /usr/bin/ diff --git a/recipes/jp-desktop.yml b/recipes/jp-desktop.yml index efc2698..3a64a1b 100644 --- a/recipes/jp-desktop.yml +++ b/recipes/jp-desktop.yml @@ -2,5 +2,10 @@ name: jp-desktop base-image: ghcr.io/ublue-os/bazzite-nvidia image-version: 40 description: The image of Wunker OS for JP's desktop gaming. +stages: + - from-file: common/bluebuild.yml + - from-file: common/helix.yml modules: - from-file: common/jp-desktop.yml + - from-file: common/bluebuild.yml + - from-file: common/helix.yml