Skip to content

Commit 7e02209

Browse files
authored
Merge pull request #124 from oasisprotocol/ptrus/feature/cli-0.17.1
docker: Bump oasis-cli to 0.17.1
2 parents 995caf6 + 76c8ca0 commit 7e02209

File tree

3 files changed

+2
-44
lines changed

3 files changed

+2
-44
lines changed

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM golang:1.25-bookworm AS builder
33
WORKDIR /app
44

5-
ARG OASIS_CLI_VERSION=0.17.0
5+
ARG OASIS_CLI_VERSION=0.17.1
66
# ARG OASIS_CLI_BRANCH=master
77

88
# Download or build oasis CLI.

worker/oasiscli/oasiscli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func (r *Runner) Run(ctx context.Context, input RunInput) (*CommandResult, error
122122
if input.DeploymentName == "" {
123123
return nil, fmt.Errorf("deployment name is required for verify deployment command")
124124
}
125-
args = []string{"rofl", "build", "--verify", "--deployment", input.DeploymentName}
125+
args = []string{"rofl", "build", "--verify", "--deployment", input.DeploymentName, "--no-container"}
126126
default:
127127
return nil, fmt.Errorf("unsupported command: %s", input.Command)
128128
}

worker/worker.go

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515

1616
"github.com/hibiken/asynq"
1717
"github.com/redis/go-redis/v9"
18-
"gopkg.in/yaml.v3"
1918

2019
"github.com/oasisprotocol/rofl-app-backend/config"
2120
"github.com/oasisprotocol/rofl-app-backend/tasks"
@@ -429,14 +428,6 @@ func (p *roflProcessor) processVerifyDeploymentsTask(ctx context.Context, taskID
429428
}
430429
result.CommitSHA = strings.TrimSpace(commitSHAStdout)
431430

432-
// Remove the builder field from rofl.yaml if it exists.
433-
// This is necessary because the verify command should not use a custom builder.
434-
if err := removeBuilderFromManifest(filepath.Join(repoDir, "rofl.yaml")); err != nil {
435-
p.logger.Error("failed to remove builder from rofl.yaml", "error", err)
436-
result.Err = fmt.Sprintf("failed to remove builder from rofl.yaml: %v", err)
437-
return result
438-
}
439-
440431
verifyResult, err := p.cli.Run(ctx, oasiscli.RunInput{
441432
Command: oasiscli.CommandVerifyDeployment,
442433
WorkDir: repoDir,
@@ -530,39 +521,6 @@ func runCommand(ctx context.Context, dir, name string, args ...string) (string,
530521
return stdoutBuf.String(), stderrBuf.String(), err
531522
}
532523

533-
// removeBuilderFromManifest removes the builder field from the rofl.yaml manifest file.
534-
// This is necessary when verifying deployments to ensure we use the default builder.
535-
func removeBuilderFromManifest(manifestPath string) error {
536-
// Read the manifest file.
537-
data, err := os.ReadFile(manifestPath) //nolint:gosec // We control the file path.
538-
if err != nil {
539-
return fmt.Errorf("failed to read manifest: %w", err)
540-
}
541-
542-
// Parse the YAML.
543-
var manifest map[string]interface{}
544-
if err := yaml.Unmarshal(data, &manifest); err != nil {
545-
return fmt.Errorf("failed to unmarshal manifest: %w", err)
546-
}
547-
548-
// Remove the builder field if it exists.
549-
if _, exists := manifest["builder"]; exists {
550-
delete(manifest, "builder")
551-
552-
// Write the updated manifest back to the file.
553-
updatedData, err := yaml.Marshal(manifest)
554-
if err != nil {
555-
return fmt.Errorf("failed to marshal manifest: %w", err)
556-
}
557-
558-
if err := os.WriteFile(manifestPath, updatedData, 0o600); err != nil {
559-
return fmt.Errorf("failed to write manifest: %w", err)
560-
}
561-
}
562-
563-
return nil
564-
}
565-
566524
var _ asynq.Logger = (*asynqLogger)(nil)
567525

568526
// asynqLogger is an slog wrapper for the asynq.Logger interface.

0 commit comments

Comments
 (0)