Skip to content

Commit 13c5e0f

Browse files
authored
Route kiln test through docker-virtual registry and refactor test-script generation (#643)
## Summary - Route `kiln test` image pulls through the internal Broadcom Artifactory docker-virtual registry, eliminating the need for a separate `docker login` before running tile tests. - Rebuild the test-script generation layer (`testPlan` / `suiteStep`) so each suite runs in its own subshell with an independent exit code, colored pass/fail summary, and optional per-suite timestamps. - Add `--verbose` / `--silent` / `--stability` flags; quiet npm by default; set `GOMAXPROCS` inside the container. - Refactor for maintainability: decompose `runTest`, fix naming inconsistencies, and clean up small code smells. ## What changed ### Dockerfile (`internal/test/Dockerfile`) - All `FROM` lines now use `tas-rel-eng-docker-virtual.usw1.packages.broadcom.com` (the same registry as `AuthConfigs`) so `kiln test` can pull base images without a prior `docker login`. - Stable tool layers (Go runtime, `jq`, `nodejs`, `npm`) are ordered before the `ARG ARTIFACTORY_USERNAME` declaration so they survive credential rotation. - `ginkgo@v1.16.5` is pinned; `GOPROXY` credentials are scoped to a single `RUN` step (not exported as `ENV`) to keep that layer stable. - `ops-manifest` gem install credentials are exported to `ENV` for runtime use. ### `kiln test` behaviour - New flags: `--stability` (run only stability tests), `--silent` (suppress kiln info lines), `--verbose` (print container ID and per-suite timestamps). - `--verbose` defaults to `false`; npm runs `--silent` / `ci --silent` by default and uses the louder form only when `--verbose` is passed. - `GOMAXPROCS` is set to the host's CPU count inside the container. - Credentials may be supplied via `-e ARTIFACTORY_USERNAME=... -e ARTIFACTORY_PASSWORD=...` or exported in the shell; `kiln test` exits with an error before contacting Docker if either is missing. ### `internal/test/container.go` refactors - **`RunMetadata` → `RunStability`**: field name now matches the `--stability` flag and "Stability Tests" suite label. - **Decompose `runTest`**: extracted `buildTestImage` (image build + registry auth) and `startAndWaitContainer` (container lifecycle + log drain + signal handling) so `runTest` is a 30-line orchestrator. - **Single credential resolution**: `requiredArtifactoryCredentialsFromMap` reuses the already-decoded `environmentVars` map, eliminating a redundant `decodeEnvironment` call. - **`verbose` as a render parameter**: removed `verbose` from the `testPlan` struct; `testPlan` is now pure data and `script(verbose bool)` makes the rendering concern explicit. - **`GinkgoFlags` typo fixed**: `TileTest.Options.GingkoFlags` → `GinkgoFlags`. - **`errors.New`**: replaced `fmt.Errorf("%s", detail)` in `checkImageBuildResponse`. - **`filepath` consistency**: removed the `"path"` import; `path.Dir/Base` replaced with `filepath.Dir/Base` for host filesystem operations. ### README Updated `kiln test` docs to reflect the new flags (`--stability`, `--ginkgo-flags`, `--manifest`, `--migrations`), the credential flow through `docker-virtual`, and the `DockerVirtualRegistryHost` alignment requirement. ### `kiln test` output excerpt #### `--verbose` flag ``` SUCCESS! -- 520 Passed | 0 Failed | 0 Pending | 4 Skipped Ginkgo ran 1 suite in 8m46.345003494s Test Suite Passed [21:13:42] Completed: Manifest Tests [21:03:23] ✓ Migration Tests Passed [21:04:55] ✓ Stability Tests Passed [21:13:42] ✓ Manifest Tests Passed ``` #### without `--verbose` flag ``` SUCCESS! -- 520 Passed | 0 Failed | 0 Pending | 4 Skipped Ginkgo ran 1 suite in 8m10.665858116s Test Suite Passed ✓ Migration Tests Passed ✓ Stability Tests Passed ✓ Manifest Tests Passed ```
2 parents 2f1c0e2 + 19eebd5 commit 13c5e0f

8 files changed

Lines changed: 755 additions & 128 deletions

File tree

README.md

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -520,56 +520,65 @@ Any variables that Kilnfile needs for the kiln re-bake command should be set in
520520

521521
### `test`
522522

523-
The `test` command exercises to ginkgo tests under the `/<tile>/test/manifest` and `/<tile>/migrations` paths of the `pivotal/tas` repos (where `<tile>` is tas, ist, or tasw).
523+
The `test` command exercises the Ginkgo tests under the `/<tile>/test/manifest` and `/<tile>/migrations` paths of the `pivotal/tas` repos (where `<tile>` is tas, ist, or tasw).
524524

525-
Running these tests requires a docker daemon. It also requires the user to
526-
provide Artifactory credentials via the ARTIFACTORY_USERNAME and
527-
ARTIFACTORY_PASSWORD environment variables to allow the ops-manifest gem to
528-
be installed. The credentials must have access to the `tas-rel-eng-gem-dev-local`
529-
repository within Broadcom's Artifactory.
525+
Running these tests requires a Docker daemon (or Podman API-compatible socket). You must provide **ARTIFACTORY_USERNAME** and **ARTIFACTORY_PASSWORD** using **`-e`** and/or **exported** environment variables. They are used for the **ops-manifest** gem (`tas-rel-eng-gem-dev-local`), for **Go module** downloads during **`go install ginkgo`** (via **`GOPROXY`** / **`GOSUMDB=off`** in the embedded Dockerfile), and Kiln sends the same credentials to the daemon as **registry auth** so base images can be pulled from **docker-virtual** (`tas-rel-eng-docker-virtual.usw1.packages.broadcom.com`) **without a separate `docker login`** for `kiln test`.
526+
527+
The embedded Dockerfile pins **`FROM`** paths on that registry. The registry hostname in Kiln’s **`AuthConfigs`** must stay aligned with those **`FROM`** lines (see **`DockerVirtualRegistryHost`** in `internal/test/container.go`). Passwords with characters that are special in URLs may not behave the same as URL-encoded credentials when interpolated into **`GOPROXY`** inside the Dockerfile.
528+
529+
If either credential is missing, `kiln test` exits with an error before talking to Docker.
530530

531531
If you run into this docker error `could not execute "test": failed to connect to Docker daemon: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running`,
532532
then create a symlink `sudo ln -s ~/.docker/run/docker.sock /var/run/docker.sock`
533533

534-
Here are command line examples:
534+
Examples:
535535

536536
```
537537
$ cd ~/workspace/tas/ist
538538
$ kiln test -e ARTIFACTORY_USERNAME=myuser -e ARTIFACTORY_PASSWORD=secretpassword
539539
```
540540

541541
```
542-
cd ~
543-
$ kiln test --verbose -tp ~/workspace/tas/ist --ginkgo-manifest-flags "-p -nodes 8 -v"
542+
$ export ARTIFACTORY_USERNAME=myuser
543+
$ export ARTIFACTORY_PASSWORD=secretpassword
544+
$ kiln test --verbose -tp ~/workspace/tas/ist --ginkgo-flags "-p -nodes 8 -v"
544545
```
545546

546547
<details>
547548
<summary>Additional test options</summary>
548549

549-
##### `--ginkgo-manifest-flags`
550+
##### `--ginkgo-flags`
551+
552+
The `--ginkgo-flags` flag can be used to pass through Ginkgo test flags. The defaults being passed through are `-r -p -slowSpecThreshold 15`. Pass `help` as a flag to retrieve the available options for the embedded version of ginkgo.
550553

551-
The `--ginkgo-manifest-flags` flag can be used to pass through Ginkgo test flags. The defaults being passed through are `-r -p -slowSpecThreshold 15`. Pass `help` as a flag to retrieve the available options for the embeded version of ginkgo.
554+
#### `--manifest`
552555

553-
#### `--manifest-only`
556+
The `--manifest` flag can be used to run only Manifest tests.
554557

555-
The `--manifest-only` flag can be used to run only Manifest tests. If not passed, `kiln test` will run both Manifest and Migration tests by default.
558+
#### `--migrations`
556559

557-
#### `--migrations-only`
560+
The `--migrations` flag can be used to run only Migration tests.
558561

559-
The `--migrations-only` flag can be used to run only Migration tests. If not passed, `kiln test` will run both Manifest and Migration tests by default.
562+
#### `--stability`
563+
564+
The `--stability` flag can be used to run only Stability tests.
560565

561566
##### `--tile-path`
562567

563-
The `--tile-path` (`-tp`) flag can be set the path the directory you wish to test. It defaults to the current working directory. For example
568+
The `--tile-path` (`-tp`) flag can be set to the directory you wish to test. It defaults to the current working directory. For example:
564569

565570
```
566-
$ kiln test -tp ~/workspace/tas/ist
571+
$ kiln test -e ARTIFACTORY_USERNAME=myuser -e ARTIFACTORY_PASSWORD=secret -tp ~/workspace/tas/ist
567572
```
568573

569574
##### `--verbose`
570575

571576
The `--verbose` (`-v`) flag will log additional debugging info.
572577

578+
##### `--silent`
579+
580+
The `--silent` (`-s`) flag hides Kiln info lines (not Ginkgo output).
581+
573582
</details>
574583

575584
### `fetch`

internal/commands/test_tile.go

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package commands
22

33
import (
44
"context"
5-
_ "embed"
65
"fmt"
76
"io"
87
"os"
@@ -17,15 +16,15 @@ type TileTestFunction func(ctx context.Context, w io.Writer, configuration test.
1716

1817
type TileTest struct {
1918
Options struct {
20-
TilePath string ` long:"tile-path" default:"." description:"Path to the Tile directory (e.g., ~/workspace/tas/ist)."`
21-
Verbose bool `short:"v" long:"verbose" default:"true" description:"Print info lines. This doesn't affect Ginkgo output."`
19+
TilePath string ` long:"tile-path" default:"." description:"Path to the Tile directory (e.g. ~/workspace/tas/ist)."`
20+
Verbose bool `short:"v" long:"verbose" default:"false" description:"Print container ID, per-suite start/end timestamps, and timestamped pass/fail summary. Also enables npm install output. Does not affect Ginkgo or npm test output."`
2221
Silent bool `short:"s" long:"silent" default:"false" description:"Hide info lines. This doesn't affect Ginkgo output."`
2322
Manifest bool ` long:"manifest" default:"false" description:"Focus the Manifest tests."`
2423
Migrations bool ` long:"migrations" default:"false" description:"Focus the Migration tests."`
2524
Stability bool ` long:"stability" default:"false" description:"Focus the Stability tests."`
2625

27-
EnvironmentVars []string `short:"e" long:"environment-variable" description:"Pass environment variable to the test suites. For example --stability -e 'PRODUCT=srt'."`
28-
GingkoFlags string ` long:"ginkgo-flags" default:"-r -p -slowSpecThreshold 15" description:"Flags to pass to the Ginkgo Manifest and Stability test suites."`
26+
EnvironmentVars []string `short:"e" long:"environment-variable" description:"Pass environment variables to the test suites (e.g. -e 'PRODUCT=srt'). Include -e ARTIFACTORY_USERNAME=... and -e ARTIFACTORY_PASSWORD=... unless they are exported."`
27+
GinkgoFlags string ` long:"ginkgo-flags" default:"-r -p -slowSpecThreshold 15" description:"Flags to pass to the Ginkgo Manifest and Stability test suites."`
2928
}
3029
function TileTestFunction
3130
output io.Writer
@@ -64,22 +63,27 @@ func (cmd TileTest) configuration() (test.Configuration, error) {
6463
if _, err := os.Stat(absPath); err != nil {
6564
return test.Configuration{}, fmt.Errorf("failed to get information about --tile-path: %w", err)
6665
}
67-
return test.Configuration{
66+
if _, _, err := test.RequiredArtifactoryCredentials(cmd.Options.EnvironmentVars); err != nil {
67+
return test.Configuration{}, err
68+
}
69+
cfg := test.Configuration{
6870
AbsoluteTileDirectory: absPath,
6971

7072
RunAll: !cmd.Options.Migrations && !cmd.Options.Manifest && !cmd.Options.Stability,
7173
RunManifest: cmd.Options.Manifest,
72-
RunMetadata: cmd.Options.Stability,
74+
RunStability: cmd.Options.Stability,
7375
RunMigrations: cmd.Options.Migrations,
7476

75-
GinkgoFlags: cmd.Options.GingkoFlags,
77+
GinkgoFlags: cmd.Options.GinkgoFlags,
7678
Environment: cmd.Options.EnvironmentVars,
77-
}, absErr
79+
Verbose: cmd.Options.Verbose,
80+
}
81+
return cfg, absErr
7882
}
7983

8084
func (cmd TileTest) Usage() jhanda.Usage {
8185
return jhanda.Usage{
82-
Description: "Run the Manifest, Migrations, and Stability tests for a Tile in a Docker container. Requires a Docker daemon to be running and Artifactory credentials to be provided via the ARTIFACTORY_USERNAME and ARTIFACTORY_PASSWORD environment variables to install the ops-manifest gem.",
86+
Description: "Run the Manifest, Migrations, and Stability tests for a Tile in a Docker container. Requires a Docker daemon. Requires ARTIFACTORY_USERNAME and ARTIFACTORY_PASSWORD (via -e or your environment) for the test image build and ops-manifest gem. Kiln passes the same credentials to the Docker daemon for pulling base images from docker-virtual (no separate docker login needed for kiln test).",
8387
ShortDescription: "Runs unit tests for a Tile.",
8488
Flags: cmd.Options,
8589
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
package commands
2+
3+
import (
4+
"context"
5+
"io"
6+
"testing"
7+
8+
"github.com/stretchr/testify/require"
9+
10+
"github.com/pivotal-cf/kiln/internal/test"
11+
)
12+
13+
func TestTileTest_RequiresArtifactoryCredentials(t *testing.T) {
14+
t.Setenv("ARTIFACTORY_USERNAME", "")
15+
t.Setenv("ARTIFACTORY_PASSWORD", "")
16+
17+
err := NewTileTest().Execute([]string{})
18+
require.Error(t, err)
19+
require.ErrorContains(t, err, "ARTIFACTORY_USERNAME")
20+
require.ErrorContains(t, err, "kiln test")
21+
}
22+
23+
func TestTileTest_RequiresArtifactoryPassword(t *testing.T) {
24+
t.Setenv("ARTIFACTORY_PASSWORD", "")
25+
26+
err := NewTileTest().Execute([]string{"-e", "ARTIFACTORY_USERNAME=onlyuser"})
27+
require.Error(t, err)
28+
require.ErrorContains(t, err, "ARTIFACTORY_PASSWORD")
29+
}
30+
31+
func TestTileTest_PassesArtifactoryViaEnvironmentToConfiguration(t *testing.T) {
32+
var captured test.Configuration
33+
stub := func(_ context.Context, _ io.Writer, c test.Configuration) error {
34+
captured = c
35+
return nil
36+
}
37+
err := NewTileTestWithCollaborators(io.Discard, stub).Execute([]string{
38+
"-e", "ARTIFACTORY_USERNAME=u",
39+
"-e", "ARTIFACTORY_PASSWORD=p",
40+
})
41+
require.NoError(t, err)
42+
require.Contains(t, captured.Environment, "ARTIFACTORY_USERNAME=u")
43+
require.Contains(t, captured.Environment, "ARTIFACTORY_PASSWORD=p")
44+
}
45+
46+
func TestTileTest_UsesProcessEnvArtifactoryCredentials(t *testing.T) {
47+
t.Setenv("ARTIFACTORY_USERNAME", "fromenv")
48+
t.Setenv("ARTIFACTORY_PASSWORD", "frompass")
49+
50+
var captured test.Configuration
51+
stub := func(_ context.Context, _ io.Writer, c test.Configuration) error {
52+
captured = c
53+
return nil
54+
}
55+
err := NewTileTestWithCollaborators(io.Discard, stub).Execute([]string{})
56+
require.NoError(t, err)
57+
require.Empty(t, captured.Environment)
58+
}

internal/commands/test_tile_test.go

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ func init() {
3434
var _ = Describe("kiln test", func() {
3535
var output bytes.Buffer
3636

37+
BeforeEach(func() {
38+
t := GinkgoT()
39+
t.Setenv("ARTIFACTORY_USERNAME", "ginkgo-test-user")
40+
t.Setenv("ARTIFACTORY_PASSWORD", "ginkgo-test-pass")
41+
})
42+
3743
AfterEach(func() {
3844
output.Reset()
3945
})
@@ -161,7 +167,7 @@ var _ = Describe("kiln test", func() {
161167
Expect(w).NotTo(BeNil())
162168

163169
Expect(configuration.RunManifest).To(BeTrue())
164-
Expect(configuration.RunMetadata).To(BeFalse())
170+
Expect(configuration.RunStability).To(BeFalse())
165171
Expect(configuration.RunMigrations).To(BeFalse())
166172
})
167173
})
@@ -183,13 +189,13 @@ var _ = Describe("kiln test", func() {
183189
Expect(w).NotTo(BeNil())
184190

185191
Expect(configuration.RunManifest).To(BeFalse())
186-
Expect(configuration.RunMetadata).To(BeFalse())
192+
Expect(configuration.RunStability).To(BeFalse())
187193
Expect(configuration.RunMigrations).To(BeTrue())
188194
})
189195
})
190196

191197
When("when the stability test is enabled", func() {
192-
It("it sets the RunMetadata configuration flag", func() {
198+
It("it sets the RunStability configuration flag", func() {
193199
args := []string{"--stability"}
194200

195201
fakeTestFunc := fakes.TestTileFunction{}
@@ -205,14 +211,14 @@ var _ = Describe("kiln test", func() {
205211
Expect(w).NotTo(BeNil())
206212

207213
Expect(configuration.RunManifest).To(BeFalse())
208-
Expect(configuration.RunMetadata).To(BeTrue())
214+
Expect(configuration.RunStability).To(BeTrue())
209215
Expect(configuration.RunMigrations).To(BeFalse())
210216
})
211217
})
212218

213-
When("when the stability test is enabled", func() {
214-
It("it sets the RunMetadata configuration flag", func() {
215-
args := []string{"--stability"}
219+
When("when ginkgo/v2 flag arguments are passed", func() {
220+
It("it sets the GinkgoFlags configuration", func() {
221+
args := []string{"--ginkgo-flags=peach pair"}
216222

217223
fakeTestFunc := fakes.TestTileFunction{}
218224
fakeTestFunc.Returns(nil)
@@ -226,29 +232,42 @@ var _ = Describe("kiln test", func() {
226232
Expect(ctx).NotTo(BeNil())
227233
Expect(w).NotTo(BeNil())
228234

229-
Expect(configuration.RunManifest).To(BeFalse())
230-
Expect(configuration.RunMetadata).To(BeTrue())
231-
Expect(configuration.RunMigrations).To(BeFalse())
235+
Expect(configuration.GinkgoFlags).To(Equal("peach pair"))
232236
})
233237
})
234238

235-
When("when ginkgo/v2 flag arguments are passed", func() {
236-
It("it sets the GinkgoFlags configuration", func() {
237-
args := []string{"--ginkgo-flags=peach pair"}
239+
When("when Artifactory credentials are provided via -e", func() {
240+
It("invokes the test function with those variables in Environment", func() {
241+
args := []string{
242+
"-e", "ARTIFACTORY_USERNAME=u",
243+
"-e", "ARTIFACTORY_PASSWORD=p",
244+
}
238245

239246
fakeTestFunc := fakes.TestTileFunction{}
240247
fakeTestFunc.Returns(nil)
241248

242249
err := commands.NewTileTestWithCollaborators(&output, fakeTestFunc.Spy).Execute(args)
243250
Expect(err).NotTo(HaveOccurred())
244251

245-
Expect(fakeTestFunc.CallCount()).To(Equal(1))
252+
_, _, configuration := fakeTestFunc.ArgsForCall(0)
253+
Expect(configuration.Environment).To(ContainElement("ARTIFACTORY_USERNAME=u"))
254+
Expect(configuration.Environment).To(ContainElement("ARTIFACTORY_PASSWORD=p"))
255+
})
256+
})
246257

247-
ctx, w, configuration := fakeTestFunc.ArgsForCall(0)
248-
Expect(ctx).NotTo(BeNil())
249-
Expect(w).NotTo(BeNil())
258+
When("when Artifactory credentials are missing", func() {
259+
It("returns an error before invoking the test function", func() {
260+
t := GinkgoT()
261+
t.Setenv("ARTIFACTORY_USERNAME", "")
262+
t.Setenv("ARTIFACTORY_PASSWORD", "")
250263

251-
Expect(configuration.GinkgoFlags).To(Equal("peach pair"))
264+
fakeTestFunc := fakes.TestTileFunction{}
265+
fakeTestFunc.Returns(nil)
266+
267+
err := commands.NewTileTestWithCollaborators(&output, fakeTestFunc.Spy).Execute([]string{})
268+
Expect(err).To(HaveOccurred())
269+
Expect(err.Error()).To(ContainSubstring("ARTIFACTORY_USERNAME"))
270+
Expect(fakeTestFunc.CallCount()).To(Equal(0))
252271
})
253272
})
254273

internal/test/Dockerfile

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,52 @@
1-
FROM golang AS go-image
2-
FROM docker.io/pivotalcfreleng/kiln:v0.110.0-rc2 AS kiln
1+
# Base images: host must match DockerVirtualRegistryHost in internal/test/container.go (AuthConfigs).
2+
FROM tas-rel-eng-docker-virtual.usw1.packages.broadcom.com/golang AS go-image
3+
FROM tas-rel-eng-docker-virtual.usw1.packages.broadcom.com/pivotalcfreleng/kiln:v0.110.0-rc2 AS kiln
34

4-
FROM ruby:4.0.3 AS builder
5+
FROM tas-rel-eng-docker-virtual.usw1.packages.broadcom.com/ruby:4.0.3 AS builder
56
RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
67

7-
FROM ruby:4.0.3
8+
FROM tas-rel-eng-docker-virtual.usw1.packages.broadcom.com/ruby:4.0.3
89

9-
# Install Go
10+
# ── Stable tools — no credentials; these layers cache across credential rotation ──
11+
12+
# Go runtime
1013
COPY --from=go-image /usr/local/go/ /usr/local/go/
1114
ENV GOROOT=/usr/local/go/
1215
ENV PATH="$GOROOT/bin:/root/go/bin:$PATH"
1316

14-
# Install Kiln
17+
# Kiln binary (used by ops-manifest during manifest tests)
1518
COPY --from=kiln /kiln /usr/local/bin/kiln
1619

17-
# Install JQ
18-
RUN apt-get update && apt-get install jq -y
20+
# System packages (consolidated to one layer; before credentials so they stay cached)
21+
RUN apt-get update \
22+
&& apt-get install --no-install-recommends -y jq nodejs npm \
23+
&& rm -rf /var/lib/apt/lists/*
1924

20-
# Install Ginkgo
21-
RUN go install github.com/onsi/ginkgo/ginkgo@latest
25+
# Go toolchain settings — must appear before any `go install`
26+
# CGO_ENABLED=0: pure-Go build avoids gcc issues on arm64 (e.g. Podman on Apple Silicon).
27+
ENV GOTOOLCHAIN=local
28+
ENV CGO_ENABLED=0
2229

23-
# Install NodeJS
24-
RUN apt-get update && apt-get install nodejs npm -y
30+
# ── Ginkgo — credentials scoped to this RUN only so layers above stay cached ──
31+
# Pinned to v1.16.5 for reproducibility (last stable v1; tiles using ginkgo v2 use their own binary).
2532

26-
# Install OpsManifest from Artifactory
2733
ARG ARTIFACTORY_USERNAME
2834
ARG ARTIFACTORY_PASSWORD
2935

36+
RUN GOPROXY=https://${ARTIFACTORY_USERNAME}:${ARTIFACTORY_PASSWORD}@usw1.packages.broadcom.com/artifactory/api/go/tas-rel-eng-go-virtual \
37+
GOSUMDB=off \
38+
go install github.com/onsi/ginkgo/ginkgo@v1.16.5
39+
40+
# ── ops-manifest gem — credentials exported for gem source registration at build time ──
41+
3042
ENV ARTIFACTORY_USERNAME=${ARTIFACTORY_USERNAME}
3143
ENV ARTIFACTORY_PASSWORD=${ARTIFACTORY_PASSWORD}
3244

3345
RUN gem source -a https://${ARTIFACTORY_USERNAME}:${ARTIFACTORY_PASSWORD}@usw1.packages.broadcom.com/artifactory/api/gems/tas-rel-eng-gem-dev-local/
3446
RUN gem install --verbose ops-manifest -v 0.0.4.pre
3547

3648
RUN which ops-manifest
49+
50+
RUN printf '%s\n%s\n' \
51+
'registry=https://${ARTIFACTORY_USERNAME}:${ARTIFACTORY_PASSWORD}@usw1.packages.broadcom.com/artifactory/api/npm/tis-npm-virtual/' \
52+
'always-auth=true' > /root/.npmrc

0 commit comments

Comments
 (0)