Skip to content

Commit

Permalink
Add fedora iot-simplified-installer test case
Browse files Browse the repository at this point in the history
  • Loading branch information
yih-redhat committed Sep 25, 2023
2 parents 4b4c93f + 9e3602c commit 7a900c0
Show file tree
Hide file tree
Showing 397 changed files with 278,020 additions and 14,970 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverity_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# https://scan.coverity.com/projects/osbuild-osbuild-composer
- name: Run coverity scan script
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/stale-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Mark and close stale issues and PRs

on:
schedule:
- cron: '0 4 * * *'

jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: osbuild/common-stale-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
18 changes: 9 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: dnf -y install krb5-devel gcc git-core go gpgme-devel

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
# gpgme-devel is needed for container upload dependencies
- name: Install test dependencies
run: sudo apt-get install -y libgpgme-dev
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 1.19
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
run: dnf -y install python3-pylint git-core python3-requests

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand All @@ -113,7 +113,7 @@ jobs:
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand All @@ -164,7 +164,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check for valid snapshot urls
Expand All @@ -174,7 +174,7 @@ jobs:
name: "🐚 Shellcheck"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Run ShellCheck
Expand All @@ -194,7 +194,7 @@ jobs:
- name: Install dependencies
run: sudo dnf install -y rpmlint rpm-build make git-core

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand Down Expand Up @@ -224,7 +224,7 @@ jobs:
name: "🎀 kube-linter"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: redhat-actions/oc-installer@v1
- name: Process template
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger-gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
sudo apt install -y jq
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha }}
fetch-depth: 0
Expand Down
1 change: 1 addition & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ cross-distro.sh:
- vsphere
- edge-commit generic.s3
- edge-container
- oci

API:
stage: test
Expand Down
4 changes: 2 additions & 2 deletions cmd/osbuild-pipeline/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ func main() {
if repo.GPGKey != "" {
keys = []string{repo.GPGKey}
}

checkGPG := repo.CheckGPG
repos[i] = rpmmd.RepoConfig{
Id: repoId,
Name: repoName,
BaseURLs: urls,
Metalink: repo.Metalink,
MirrorList: repo.MirrorList,
GPGKeys: keys,
CheckGPG: &repo.CheckGPG,
CheckGPG: &checkGPG,
CheckRepoGPG: common.ToPtr(false),
IgnoreSSL: common.ToPtr(false),
PackageSets: repo.PackageSets,
Expand Down
7 changes: 6 additions & 1 deletion cmd/osbuild-upload-oci/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,16 @@ var uploadCmd = &cobra.Command{
}
defer file.Close()

imageID, err := uploader.Upload(objectName, bucketName, bucketNamespace, file, compartment, fileName)
err = uploader.Upload(objectName, bucketName, bucketNamespace, file)
if err != nil {
return fmt.Errorf("failed to upload the image: %v", err)
}

imageID, err := uploader.CreateImage(objectName, bucketName, bucketNamespace, compartment, fileName)
if err != nil {
return fmt.Errorf("failed to create the image from storage object: %v", err)
}

fmt.Printf("Image %s was uploaded and created successfully\n", imageID)
return nil
},
Expand Down
5 changes: 5 additions & 0 deletions cmd/osbuild-worker/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ type awsConfig struct {
Bucket string `toml:"bucket"`
}

type ociConfig struct {
Credentials string `toml:"credentials"`
}

type genericS3Config struct {
Credentials string `toml:"credentials"`
Endpoint string `toml:"endpoint"`
Expand Down Expand Up @@ -71,6 +75,7 @@ type workerConfig struct {
GenericS3 *genericS3Config `toml:"generic_s3"`
Authentication *authenticationConfig `toml:"authentication"`
Containers *containersConfig `toml:"containers"`
OCI *ociConfig `toml:"oci"`
// default value: /api/worker/v1
BasePath string `toml:"base_path"`
DNFJson string `toml:"dnf-json"`
Expand Down
6 changes: 6 additions & 0 deletions cmd/osbuild-worker/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ upload_threads = 8
credentials = "/etc/osbuild-worker/aws-creds"
bucket = "buckethead"
[oci]
credentials = "/etc/osbuild-worker/oci-creds"
[generic_s3]
credentials = "/etc/osbuild-worker/s3-creds"
endpoint = "http://s3.example.com"
Expand Down Expand Up @@ -96,6 +99,9 @@ offline_token = "/etc/osbuild-worker/offline_token"
Credentials: "/etc/osbuild-worker/aws-creds",
Bucket: "buckethead",
},
OCI: &ociConfig{
Credentials: "/etc/osbuild-worker/oci-creds",
},
GenericS3: &genericS3Config{
Credentials: "/etc/osbuild-worker/s3-creds",
Endpoint: "http://s3.example.com",
Expand Down
Loading

0 comments on commit 7a900c0

Please sign in to comment.