SCS Build Client
This project provides a Go client for the Singularity Container Services (SCS) Build Service.
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.
scs-build
Overview
scs-build
is a tool for invoking Sylabs Cloud
and Singularity Enterprise Remote Build without the need for installing and
configuring Singularity. It is intended to be integrated into a CI/CD workflow.
Usage
Build and download artifact
scs-build build --auth-token ${SYLABS_AUTH_TOKEN} docker://alpine alpine_latest.sif
Build and push to default cloud library (cloud.sylabs.io)
scs-build build --auth-token ${SYLABS_AUTH_TOKEN} alpine.def library:user/default/alpine:latest
Build and push to local Singularity Enterprise
scs-build build --auth-token ${SYLABS_AUTH_TOKEN} alpine.def \
library://cloud.enterprise.local/user/default/alpine:latest
Build ephemeral artifact
export SYLABS_AUTH_TOKEN=xxx
scs-build build alpine.def
SYLABS_AUTH_TOKEN
is obtained through "Access Tokens" in Sylabs Cloud web UI.
Build ephemeral artifact in local Singularity Enterprise
export SYLABS_AUTH_TOKEN=xxx
scs-build build --url https://cloud.enterprise.local alpine.def
Build ephemeral artifact using Docker image
export SYLABS_AUTH_TOKEN=xxx
docker run -e SYLABS_AUTH_TOKEN="${SYLABS_AUTH_TOKEN}" scs-build:latest build docker://alpine
CI/CD Integration
GitHub Actions
Be sure to create a secret named SYLABS_AUTH_TOKEN
containing token obtained from "Access Tokens" in Sylabs Cloud.
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 Sylabs Cloud or a local Singularity Enterprise installation.