Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/build_and_release_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu

- name: Set up latest stable Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4

- name: Checkout out the repo
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-tags: 1
fetch-depth: 1
Expand All @@ -38,13 +38,13 @@ jobs:
echo "BUILD_USER=$(whoami)" >> $GITHUB_ENV

- name: Docker Login
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Release with goreleaser
uses: goreleaser/goreleaser-action@v6
uses: goreleaser/goreleaser-action@v7
env:
GITHUB_TOKEN: ${{ github.token }}
with:
Expand All @@ -64,16 +64,16 @@ jobs:
echo "digest=$(cat digest.txt)" >> $GITHUB_OUTPUT

- name: Attest power-control binary amd64
uses: actions/attest-build-provenance@v1
uses: actions/attest-build-provenance@v4
with:
subject-path: dist/remote-console_linux_amd64_v3/remote-console
# TODO: ARM builds aren't viable yet
#- name: Attest power-control binary arm64
# uses: actions/attest-build-provenance@v1
# uses: actions/attest-build-provenance@v4
# with:
# subject-path: dist/pcs_linux_arm64_v8.0/power-control
- name: Generate build provenance
uses: actions/attest-build-provenance@v1
uses: actions/attest-build-provenance@v4
with:
subject-name: ghcr.io/openchami/remote-console
subject-digest: ${{ steps.process_goreleaser_output.outputs.digest }}
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/build_ipmi_sim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and publish ipmi-sim

on:
push:
branches:
- main
paths:
- 'ipmi_sim/**'
- 'ipmi_sim/VERSION'
workflow_dispatch:

permissions:
contents: read
packages: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v6

- name: Read version
id: version
run: echo "version=$(cat ipmi_sim/VERSION)" >> "$GITHUB_OUTPUT"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Docker Login
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker metadata
id: meta
uses: docker/metadata-action@v6
with:
images: ghcr.io/openchami/ipmi-sim
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=${{ steps.version.outputs.version }}
type=sha,prefix=,format=short

- name: Build and push
uses: docker/build-push-action@v7
with:
context: ipmi_sim
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
4 changes: 2 additions & 2 deletions .github/workflows/integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Build remote-console binary for Dockerfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Setup Go 1.26
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: 1.26
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
uses: golangci/golangci-lint-action@v9
with:
version: latest
4 changes: 2 additions & 2 deletions .github/workflows/unit_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Run unit tests
Expand Down
90 changes: 33 additions & 57 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2.4
version: 2

project_name: remote-console
before:
Expand Down Expand Up @@ -36,71 +36,36 @@ builds:
-X main.GoVersion={{ .Env.GO_VERSION }} \
-X main.BuildUser={{ .Env.BUILD_USER }} "

dockers:
- image_templates:
- &amd64_linux_image ghcr.io/openchami/{{.ProjectName}}:{{ .Tag }}-amd64
- ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}-amd64
- ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}-amd64
use: buildx
build_flag_templates:
dockers_v2:
- id: remote-console
ids:
- remote-console
dockerfile: Dockerfile
images:
- ghcr.io/openchami/{{.ProjectName}}
tags:
- "{{ .Tag }}"
- "{{ .Major }}"
- "{{ .Major }}.{{ .Minor }}"
- "latest"
platforms:
- linux/amd64
# TODO: Add linux/arm64 when ARM base images and conman packages are available
flags:
- "--pull"
- "--target=ubuntu-goreleaser"
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
goarch: amd64
goamd64: v3
annotations:
"org.opencontainers.image.created": "{{.Date}}"
"org.opencontainers.image.title": "{{.ProjectName}}"
"org.opencontainers.image.revision": "{{.FullCommit}}"
"org.opencontainers.image.version": "{{.Version}}"
extra_files:
- LICENSE
- CHANGELOG.md
- README.md
- configs/
- scripts/

# TODO: more ARM config that isn't viable yet.
#- image_templates:
# - &arm64v8_linux_image ghcr.io/openchami/{{.ProjectName}}:{{ .Tag }}-arm64
# - ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}-arm64
# - ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}-arm64
# use: buildx
# build_flag_templates:
# - "--pull"
# - "--platform=linux/arm64"
# - "--label=org.opencontainers.image.created={{.Date}}"
# - "--label=org.opencontainers.image.title={{.ProjectName}}"
# - "--label=org.opencontainers.image.revision={{.FullCommit}}"
# - "--label=org.opencontainers.image.version={{.Version}}"
# goarch: arm64
# extra_files:
# - LICENSE
# - CHANGELOG.md
# - README.md
# - configs/

docker_manifests:
# TODO: ARM ARM ARM
- name_template: "ghcr.io/openchami/{{.ProjectName}}:latest"
image_templates:
- *amd64_linux_image
#- *arm64v8_linux_image

- name_template: "ghcr.io/openchami/{{.ProjectName}}:{{ .Tag }}"
image_templates:
- *amd64_linux_image
#- *arm64v8_linux_image

- name_template: "ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}"
image_templates:
- *amd64_linux_image
#- *arm64v8_linux_image

- name_template: "ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}"
image_templates:
- *amd64_linux_image
#- *arm64v8_linux_image

archives:
- formats: ["tar.gz"]
# this name template makes the OS and Arch compatible with the results of uname.
Expand All @@ -121,11 +86,22 @@ checksum:
snapshot:
version_template: "{{ incpatch .Version }}-next"
changelog:
use: github
sort: asc
groups:
- title: Features
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: Bug Fixes
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: Others
order: 999
filters:
exclude:
- '^docs:'
- '^test:'
- '^chore:'


# The lines beneath this are called `modelines`. See `:help modeline`
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@

FROM ubuntu:24.04 AS ubuntu-goreleaser

ARG TARGETPLATFORM

RUN apt -y update
RUN apt -y install conman less vim ssh jq tar procps inotify-tools

COPY remote-console /app/
COPY ${TARGETPLATFORM}/remote-console /app/
COPY scripts/conman.conf.tmpl /app/conman.conf.tmpl
COPY scripts/ssh-key-console /usr/bin/
COPY scripts/ssh-pwd-console /usr/bin/
Expand Down
1 change: 1 addition & 0 deletions ipmi_sim/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0