Skip to content

Commit

Permalink
chore(action): replace word Docker with Container
Browse files Browse the repository at this point in the history
  • Loading branch information
AtomicFS committed Jan 31, 2024
1 parent 6386be8 commit fc16825
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
18 changes: 9 additions & 9 deletions action/recipes/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ type CommonOpts struct {
// had been previously checked out.
RepoPath string `json:"repo_path" validate:"required,dirpath"`

// Specifies the (relative) paths to directories where are produced files (inside Docker).
DockerOutputDirs []string `json:"docker_output_dirs" validate:"dive,dirpath"`
// Specifies the (relative) paths to directories where are produced files (inside Container).
ContainerOutputDirs []string `json:"docker_output_dirs" validate:"dive,dirpath"`

// Specifies the (relative) paths to produced files (inside Docker).
DockerOutputFiles []string `json:"docker_output_files" validate:"dive,filepath"`
// Specifies the (relative) paths to produced files (inside Container).
ContainerOutputFiles []string `json:"docker_output_files" validate:"dive,filepath"`

// Specifies the (relative) path to directory into which place the produced files.
// Directories listed in DockerOutputDirs and files listed in DockerOutputFiles
// Directories listed in ContainerOutputDirs and files listed in ContainerOutputFiles
// will be exported here.
// Example:
// Following setting:
// DockerOutputDirs = []string{"Build/"}
// DockerOutputFiles = []string{"coreboot.rom", "defconfig"}
// ContainerOutputDirs = []string{"Build/"}
// ContainerOutputFiles = []string{"coreboot.rom", "defconfig"}
// OutputDir = "myOutput"
// Will result in:
// myOutput/
Expand All @@ -85,7 +85,7 @@ func (opts CommonOpts) GetArtifacts() *[]container.Artifacts {
var artifacts []container.Artifacts

// Directories
for _, pathDir := range opts.DockerOutputDirs {
for _, pathDir := range opts.ContainerOutputDirs {
artifacts = append(artifacts, container.Artifacts{
ContainerPath: filepath.Join(ContainerWorkDir, pathDir),
ContainerDir: true,
Expand All @@ -95,7 +95,7 @@ func (opts CommonOpts) GetArtifacts() *[]container.Artifacts {
}

// Files
for _, pathFile := range opts.DockerOutputFiles {
for _, pathFile := range opts.ContainerOutputFiles {
artifacts = append(artifacts, container.Artifacts{
ContainerPath: filepath.Join(ContainerWorkDir, pathFile),
ContainerDir: false,
Expand Down
2 changes: 1 addition & 1 deletion action/recipes/coreboot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestCoreboot(t *testing.T) {
common := CommonOpts{
Arch: "x86",
OutputDir: "output",
DockerOutputFiles: []string{
ContainerOutputFiles: []string{
"build/coreboot.rom",
"defconfig",
},
Expand Down
4 changes: 2 additions & 2 deletions action/recipes/edk2.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type Edk2Specific struct {
// '-a <architecture>'
// '-p <edk2__platform>'
// '-b <edk2__release_type>'
// '-t <GCC version>' (defined as part of docker toolchain, selected by SdkURL)
// '-t <GCC version>' (defined as part of container toolchain, selected by SdkURL)
DefconfigPath string `json:"defconfig_path" validate:"filepath"`
// Specifies the DSC to use when building EDK2
Expand All @@ -47,7 +47,7 @@ type Edk2Specific struct {
// Edk2Specific is used to store data specific to coreboot.
type Edk2Specific struct {
// Specifies which build command to use
// GCC version is exposed in the docker container as USE_GCC_VERSION environment variable
// GCC version is exposed in the container container as USE_GCC_VERSION environment variable
// Examples:
// "source ./edksetup.sh; build -t GCC5 -a IA32 -p UefiPayloadPkg/UefiPayloadPkg.dsc"
// "python UefiPayloadPkg/UniversalPayloadBuild.py"
Expand Down
6 changes: 3 additions & 3 deletions action/recipes/edk2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ func TestEdk2(t *testing.T) {
defer os.Chdir(pwd) // nolint:errcheck

// Use "" if you want to test containers from github package registry
// Use "../../docker/edk2" if you want to test containers built fresh from Dockerfile
// Use "../../container/edk2" if you want to test containers built fresh from Dockerfile
dockerfilePath := ""
if false {
dockerfilePath, err = filepath.Abs("../../docker/edk2")
dockerfilePath, err = filepath.Abs("../../container/edk2")
assert.NoError(t, err)
}

common := CommonOpts{
SdkURL: "ghcr.io/9elements/firmware-action/edk2-stable202105:main",
Arch: "X64",
OutputDir: "output",
DockerOutputDirs: []string{"Build/"},
ContainerOutputDirs: []string{"Build/"},
}

testCases := []struct {
Expand Down
6 changes: 3 additions & 3 deletions action/recipes/linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ func TestLinux(t *testing.T) {
defer os.Chdir(pwd) // nolint:errcheck

// Use "" if you want to test containers from github package registry
// Use "../../docker/linux" if you want to test containers built fresh from Dockerfile
// Use "../../container/linux" if you want to test containers built fresh from Dockerfile
dockerfilePath := ""
if false {
dockerfilePath, err = filepath.Abs("../../docker/linux")
dockerfilePath, err = filepath.Abs("../../container/linux")
assert.NoError(t, err)
}

linuxOpts := LinuxOpts{
CommonOpts: CommonOpts{
OutputDir: "output",
DockerOutputFiles: []string{
ContainerOutputFiles: []string{
"vmlinux",
"defconfig",
},
Expand Down
18 changes: 9 additions & 9 deletions tests/example_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"arch": "",
"repo_path": "my_super_dooper_awesome_coreboot/",
"defconfig_path": "seabios_defconfig",
"output_dir": "output/",
"docker_output_dirs": null,
"docker_output_files": [
"output_dir": "output-coreboot/",
"container_output_dirs": null,
"container_output_files": [
"build/coreboot.rom",
"defconfig"
],
Expand All @@ -31,9 +31,9 @@
"arch": "x86_64",
"repo_path": "linux-${LINUX_VERSION}/",
"defconfig_path": "ci_defconfig",
"output_dir": "output/",
"docker_output_dirs": null,
"docker_output_files": [
"output_dir": "output-linux/",
"container_output_dirs": null,
"container_output_files": [
"vmlinux",
"defconfig"
],
Expand All @@ -47,11 +47,11 @@
"arch": "X64",
"repo_path": "Edk2/",
"defconfig_path": "edk2_config.cfg",
"output_dir": "output/",
"docker_output_dirs": [
"output_dir": "output-edk2/",
"container_output_dirs": [
"Build/"
],
"docker_output_files": null,
"container_output_files": null,
"build_command": "source ./edksetup.sh; build -a X64 -p UefiPayloadPkg/UefiPayloadPkg.dsc -b DEBUG -t GCC5"
}
}
Expand Down

0 comments on commit fc16825

Please sign in to comment.