Skip to content

Commit 7d8210e

Browse files
committed
cmd&build: Push ORCs to Oasis ROFL registry by default
1 parent 5fbd6da commit 7d8210e

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ linters-settings:
8080
- github.com/opencontainers/image-spec/specs-go/v1
8181
- oras.land/oras-go/v2
8282
- github.com/wI2L/jsondiff
83+
- github.com/google/uuid
8384
exhaustive:
8485
# Switch statements are to be considered exhaustive if a 'default' case is
8586
# present, even if all enum members aren't listed in the switch.

build/rofl/oci.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const (
2929
)
3030

3131
// DefaultOCIRegistry is the default OCI registry.
32-
const DefaultOCIRegistry = "rofl-orc-registry.prd.oasis.io"
32+
const DefaultOCIRegistry = "rofl.sh"
3333

3434
// PushBundleToOciRepository pushes an ORC bundle to the given remote OCI repository.
3535
//

cmd/rofl/deploy.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ var (
130130
ociDigest, manifestHash, err := buildRofl.PushBundleToOciRepository(orcFilename, deployment.OCIRepository)
131131
switch {
132132
case err == nil:
133+
// Save the OCI repository field to the configuration file so we avoid multiple uploads.
134+
if err := manifest.Save(); err != nil {
135+
cobra.CheckErr(fmt.Sprintf("Failed to update manifest with OCI repository: %s", err))
136+
}
133137
case errors.Is(err, os.ErrNotExist):
134138
cobra.CheckErr(fmt.Sprintf("ROFL app bundle '%s' not found. Run `oasis rofl build` first.", orcFilename))
135139
default:

0 commit comments

Comments
 (0)