-
Notifications
You must be signed in to change notification settings - Fork 546
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13782 from MinaProtocol/dkijania/mina-profile-docker
[CI] extract profile settings and build docker based on its values
- Loading branch information
Showing
19 changed files
with
234 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
let Prelude = ../External/Prelude.dhall | ||
let Profiles = ./Profiles.dhall | ||
|
||
let Docker: Type = < Bookworm | Bullseye | Buster | Jammy | Focal > | ||
|
||
let capitalName = \(docker : Docker) -> | ||
merge { | ||
Bookworm = "Bookworm" | ||
, Bullseye = "Bullseye" | ||
, Buster = "Buster" | ||
, Jammy = "Jammy" | ||
, Focal = "Focal" | ||
} docker | ||
|
||
let lowerName = \(docker : Docker) -> | ||
merge { | ||
Bookworm = "bookworm" | ||
, Bullseye = "bullseye" | ||
, Buster = "buster" | ||
, Jammy = "jammy" | ||
, Focal = "focal" | ||
} docker | ||
|
||
let dependsOn = \(docker : Docker) -> \(profile : Profiles.Type) -> \(binary: Text) -> | ||
let profileSuffix = Profiles.toSuffixUppercase profile in | ||
let prefix = "MinaArtifact" in | ||
let suffix = "docker-image" in | ||
merge { | ||
Bookworm = [{ name = "${prefix}${profileSuffix}", key = "${binary}-${lowerName docker}-${suffix}" }] | ||
, Bullseye = [{ name = "${prefix}${capitalName docker}${profileSuffix}", key = "${binary}-${lowerName docker}-${suffix}" }] | ||
, Buster = [{ name = "${prefix}${capitalName docker}${profileSuffix}", key = "${binary}-${lowerName docker}-${suffix}" }] | ||
, Jammy = [{ name = "${prefix}${capitalName docker}${profileSuffix}", key = "${binary}-${lowerName docker}-${suffix}" }] | ||
, Focal = [{ name = "${prefix}${capitalName docker}${profileSuffix}", key = "${binary}-${lowerName docker}-${suffix}" }] | ||
} docker | ||
|
||
in | ||
|
||
{ | ||
Type = Docker | ||
, capitalName = capitalName | ||
, lowerName = lowerName | ||
, dependsOn = dependsOn | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
let Prelude = ../External/Prelude.dhall | ||
|
||
let Profile : Type = < Standard | Lightnet > | ||
|
||
let capitalName = \(profile : Profile) -> | ||
merge { | ||
Standard = "Standard" | ||
, Lightnet = "Lightnet" | ||
} profile | ||
|
||
let lowerName = \(profile : Profile) -> | ||
merge { | ||
Standard = "standard" | ||
, Lightnet = "lightnet" | ||
} profile | ||
|
||
let duneProfile = \(profile : Profile) -> | ||
merge { | ||
Standard = "devnet" | ||
, Lightnet = "lightnet" | ||
} profile | ||
|
||
let toSuffixUppercase = \(profile : Profile) -> | ||
merge { | ||
Standard = "" | ||
, Lightnet = "Lightnet" | ||
} profile | ||
|
||
let toSuffixLowercase = \(profile : Profile) -> | ||
merge { | ||
Standard = "" | ||
, Lightnet = "lightnet" | ||
} profile | ||
|
||
|
||
|
||
in | ||
|
||
{ | ||
Type = Profile | ||
, capitalName = capitalName | ||
, lowerName = lowerName | ||
, duneProfile = duneProfile | ||
, toSuffixUppercase = toSuffixUppercase | ||
, toSuffixLowercase = toSuffixLowercase | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
buildkite/src/Jobs/Release/MinaArtifactBullseyeLightnet.dhall
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
let ArtifactPipelines = ../../Command/MinaArtifact.dhall | ||
let Pipeline = ../../Pipeline/Dsl.dhall | ||
|
||
in | ||
|
||
Pipeline.build ArtifactPipelines.bullseye-lightnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.