scs-build-client

module
v0.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2024 License: BSD-3-Clause

README

scs-build

PkgGoDev Build Status Code Coverage Go Report Card

scs-build allows users to build Singularity Image Format (SIF) images via Singularity Container Services or Singularity Enterprise without the need to install and configure Singularity.

The repository also contains the github.com/sylabs/scs-build-client/client Go module, which can be used to integrate support into other applications.

Usage

scs-build is available in DockerHub (sylabsio/scs-build) and standalone binaries are also published with each release.

Obtain an access token from Singularity Container Services or Singularity Enterprise installation, and export it in the environment:

export SYLABS_AUTH_TOKEN=...

To build an image and retrieve it:

# Singularity Container Services (cloud.sylabs.io)
scs-build build recipe.def image.sif

# Singularity Enterprise (replace "cloud.enterprise.local" with your installation host name)
scs-build build --url https://cloud.enterprise.local recipe.def image.sif

To build an image, tag it and publish it directly to the Library:

# Singularity Container Services (cloud.sylabs.io)
scs-build build recipe.def library:<entity>/default/image:latest

# Singularity Enterprise (replace "cloud.enterprise.local" with your installation host name)
scs-build build recipe.def library://cloud.enterprise.local/<entity>/default/image:latest

Build an image, sign it using PGP key matching fingerprint, and publish directly to the library:

# Singularity Container Services (cloud.sylabs.io)
scs-build build recipe.def library://<entity>/default/image:latest --fingerprint ABABABABABA

Build an image, sign it using key 1 from the keyring, and publish directly to the library:

# Singularity Container Services (cloud.sylabs.io)
scs-build build recipe.def library://<entity>/default/image:latest --keyidx 1

Build an image, sign it using existing Singularity PGP keyring, and publish directly to the library:

# Singularity Container Services (cloud.sylabs.io)
scs-build build recipe.def library://<entity>/default/image:latest --keyring ~/.singularity/sypgp/pgp-secret

Be sure to substitute <entity> appropriately (generally your username.)

CI/CD Integration

GitHub Actions

Create a secret named SYLABS_AUTH_TOKEN containing access token obtained from "Access Tokens" in Singularity Container Services.

See examples/github-actions-ci.yaml for an example configuration.

GitLab

Example gitlab-ci.yml is configured to build using file alpine.def contained within the project directory.

This example configuration will store the build artifact (in this case, artifact.sif) within GitLab. Using a library reference (ie. library:myuser/myproject/image) will result in the build artifact automatically being pushed to Singularity Container Services or a local Singularity Enterprise installation.

Go Version Compatibility

This module aims to maintain support for the two most recent stable versions of Go. This corresponds to the Go Release Maintenance Policy and Security Policy, ensuring critical bug fixes and security patches are available for all supported language versions.

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL