worker: Configure AWS credentials in the worker
This commit is contained in:
parent
7760ca1c92
commit
010a1f5022
4 changed files with 781 additions and 6 deletions
|
|
@ -97,6 +97,9 @@ func main() {
|
|||
Azure *struct {
|
||||
Credentials string `toml:"credentials"`
|
||||
} `toml:"azure"`
|
||||
AWS *struct {
|
||||
Credentials string `toml:"credentials"`
|
||||
} `toml:"aws"`
|
||||
Authentication *struct {
|
||||
OAuthURL string `toml:"oauth_url"`
|
||||
OfflineTokenPath string `toml:"offline_token"`
|
||||
|
|
@ -232,6 +235,14 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
// If the credentials are not provided in the configuration, then the
|
||||
// worker will look in $HOME/.aws/credentials or at the file pointed by
|
||||
// the "AWS_SHARED_CREDENTIALS_FILE" variable.
|
||||
var awsCredentials = ""
|
||||
if config.AWS != nil {
|
||||
awsCredentials = config.AWS.Credentials
|
||||
}
|
||||
|
||||
jobImpls := map[string]JobImplementation{
|
||||
"osbuild": &OSBuildJobImpl{
|
||||
Store: store,
|
||||
|
|
@ -239,6 +250,7 @@ func main() {
|
|||
KojiServers: kojiServers,
|
||||
GCPCreds: gcpCredentials,
|
||||
AzureCreds: azureCredentials,
|
||||
AWSCreds: awsCredentials,
|
||||
},
|
||||
"osbuild-koji": &OSBuildKojiJobImpl{
|
||||
Store: store,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue