Skip to content

Commit fe870da

Browse files
committed
fix dhall job
1 parent 9b38540 commit fe870da

File tree

3 files changed

+35
-61
lines changed

3 files changed

+35
-61
lines changed

buildkite/scripts/release/manager.sh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function main_help(){
120120
echo " artifacts: $DEFAULT_ARTIFACTS"
121121
echo " networks: $DEFAULT_NETWORKS"
122122
echo " codenames: $DEFAULT_CODENAMES"
123-
echo " architectures: $DEFAULT_ARCHITECTURE"
123+
echo " architectures: $DEFAULT_ARCHITECTURES"
124124
echo ""
125125
echo "Available values: "
126126
echo " artifacts: mina-logproc,mina-archive,mina-rosetta,mina"
@@ -617,7 +617,7 @@ function publish_help(){
617617
echo "Parameters:"
618618
echo ""
619619
printf " %-25s %s\n" "-h | --help" "show help";
620-
printf " %-25s %s\n" "--archs" "[list string] target architectures list. Default: $DEFAULT_ARCHITECTURE";
620+
printf " %-25s %s\n" "--archs" "[list string] target architectures list. Default: $DEFAULT_ARCHITECTURES";
621621
printf " %-25s %s\n" "--artifacts" "[comma separated list] list of artifacts to publish. e.g mina-logproc,mina-archive,mina-rosetta";
622622
printf " %-25s %s\n" "--networks" "[comma separated list] list of networks to publish. e.g devnet,mainnet";
623623
printf " %-25s %s\n" "--buildkite-build-id" "[string] buildkite build id of release build to publish";
@@ -970,7 +970,7 @@ function promote_help(){
970970
echo "Parameters:"
971971
echo ""
972972
printf " %-25s %s\n" "-h | --help" "show help";
973-
printf " %-25s %s\n" "--arch" "[string] target architecture. Default: $DEFAULT_ARCHITECTURE";
973+
printf " %-25s %s\n" "--arch" "[string] target architecture. Default: $DEFAULT_ARCHITECTURES";
974974
printf " %-25s %s\n" "--artifacts" "[comma separated list] list of artifacts to publish. e.g mina-logproc,mina-archive,mina-rosetta";
975975
printf " %-25s %s\n" "--networks" "[comma separated list] list of networks to publish. e.g devnet,mainnet";
976976
printf " %-25s %s\n" "--source-version" "[path] source version of build to publish";
@@ -1015,7 +1015,7 @@ function promote(){
10151015
local __dry_run=0
10161016
local __debian_repo=$DEBIAN_REPO
10171017
local __debian_sign_key=""
1018-
local __arch="$DEFAULT_ARCHITECTURE"
1018+
local __arch="$DEFAULT_ARCHITECTURES"
10191019

10201020

10211021
while [ ${#} -gt 0 ]; do
@@ -1278,7 +1278,7 @@ function verify_help(){
12781278
echo "Parameters:"
12791279
echo ""
12801280
printf " %-25s %s\n" "-h | --help" "show help";
1281-
printf " %-25s %s\n" "--arch" "[string] target architecture. Default: $DEFAULT_ARCHITECTURE";
1281+
printf " %-25s %s\n" "--arch" "[string] target architecture. Default: $DEFAULT_ARCHITECTURES";
12821282
printf " %-25s %s\n" "--artifacts" "[comma separated list] list of artifacts to publish. e.g mina-logproc,mina-archive,mina-rosetta";
12831283
printf " %-25s %s\n" "--networks" "[comma separated list] list of networks to publish. e.g devnet,mainnet";
12841284
printf " %-25s %s\n" "--version" "[path] target version of build to publish";
@@ -1288,8 +1288,8 @@ function verify_help(){
12881288
printf " %-25s %s\n" "--docker-io" "[bool] publish to docker.io instead of gcr.io";
12891289
printf " %-25s %s\n" "--only-dockers" "[bool] publish only docker images";
12901290
printf " %-25s %s\n" "--only-debians" "[bool] publish only debian packages";
1291-
printf " %-25s %s\n" "--docker-suffix" "[string] suffix to append to docker image tags";
12921291
printf " %-25s %s\n" "--arch" "[string] architecture (amd64 or arm64)";
1292+
printf " %-25s %s\n" "--profile" "[string] build profile to publish. e.g lightnet, mainnet. default: $DEFAULT_PROFILE";
12931293
echo ""
12941294
echo "Example:"
12951295
echo ""
@@ -1326,7 +1326,6 @@ function verify(){
13261326
local __only_debians=0
13271327
local __debian_repo=$DEBIAN_REPO
13281328
local __debian_repo_signed=0
1329-
local __docker_suffix=""
13301329
local __archs="$DEFAULT_ARCHITECTURES"
13311330
local __profile=$DEFAULT_PROFILE
13321331

@@ -1672,7 +1671,7 @@ function persist_help(){
16721671
echo "Parameters:"
16731672
echo ""
16741673
printf " %-25s %s\n" "-h | --help" "show help";
1675-
printf " %-25s %s\n" "--arch" "[string] target architecture. Default: $DEFAULT_ARCHITECTURE";
1674+
printf " %-25s %s\n" "--arch" "[string] target architecture. Default: $DEFAULT_ARCHITECTURES";
16761675
printf " %-25s %s\n" "--backend" "[string] backend to persist artifacts. e.g gs,hetzner";
16771676
printf " %-25s %s\n" "--artifacts" "[comma separated list] list of artifacts to persist. e.g mina-logproc,mina-archive,mina-rosetta";
16781677
printf " %-25s %s\n" "--build_id" "[string] buildkite build id to persist artifacts";
@@ -1699,7 +1698,7 @@ function persist(){
16991698
local __codename
17001699
local __new_version
17011700
local __suite="unstable"
1702-
local __arch="$DEFAULT_ARCHITECTURE"
1701+
local __arch="$DEFAULT_ARCHITECTURES"
17031702

17041703
while [ ${#} -gt 0 ]; do
17051704
error_message="Error: a value is needed for '$1'";

buildkite/src/Command/DockerImage.dhall

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ let DockerPublish = ../Constants/DockerPublish.dhall
2828

2929
let VerifyDockers = ../Command/Packages/VerifyDockers.dhall
3030

31-
let Extensions = ../Lib/Extensions.dhall
32-
3331
let Arch = ../Constants/Arch.dhall
3432

3533
let ReleaseSpec =
@@ -120,25 +118,10 @@ let generateStep =
120118

121119
else " && ./scripts/debian/aptly.sh stop"
122120

123-
let suffix =
124-
Extensions.joinOptionals
125-
"-"
126-
[ merge
127-
{ Mainnet = None Text
128-
, Devnet = None Text
129-
, Dev = None Text
130-
, Lightnet = Some
131-
"${Profiles.toSuffixLowercase spec.deb_profile}"
132-
}
133-
spec.deb_profile
134-
, merge
135-
{ None = None Text
136-
, Instrumented = Some
137-
"${BuildFlags.toSuffixLowercase spec.build_flags}"
138-
}
139-
spec.build_flags
140-
, spec.deb_suffix
141-
]
121+
let profile =
122+
"${Profiles.toSuffixLowercase
123+
spec.deb_profile}${BuildFlags.toLabelSegment
124+
spec.build_flags}"
142125

143126
let debSuffix =
144127
merge
@@ -158,8 +141,8 @@ let generateStep =
158141
, networks = [ spec.network ]
159142
, version = spec.deb_version
160143
, codenames = [ spec.deb_codename ]
161-
, suffix = suffix
162-
, arch = spec.arch
144+
, profile = profile
145+
, archs = [ spec.arch ]
163146
}
164147

165148
else ""

buildkite/src/Command/Packages/VerifyDockers.dhall

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ let Spec =
2323
, version : Text
2424
, codenames : List DebianVersions.DebVersion
2525
, published_to_docker_io : Bool
26-
, suffix : Optional Text
27-
, arch : Arch.Type
26+
, profile : Text
27+
, archs : List Arch.Type
2828
}
2929
, default =
3030
{ artifacts = [] : List Package.Type
@@ -34,8 +34,8 @@ let Spec =
3434
, DebianVersions.DebVersion.Bullseye
3535
]
3636
, published_to_docker_io = False
37-
, suffix = None Text
38-
, arch = Arch.Type.Amd64
37+
, profile = Text
38+
, archs = [ Arch.Type.Amd64 ]
3939
}
4040
}
4141

@@ -69,41 +69,33 @@ let joinCodenames
6969
spec.codenames
7070
)
7171

72+
let joinArchitectures
73+
: Spec.Type -> Text
74+
= \(spec : Spec.Type)
75+
-> join
76+
","
77+
( Prelude.List.map
78+
Arch.Type
79+
Text
80+
(\(arch : Arch.Type) -> Arch.lowerName arch)
81+
spec.archs
82+
)
83+
7284
let verify
7385
: Spec.Type -> Text
7486
= \(spec : Spec.Type)
75-
-> let arch = Arch.toOptional spec.arch
76-
77-
let suffixAndArchFlag =
78-
let archFlag =
79-
Prelude.Optional.map
80-
Text
81-
Text
82-
(\(archValue : Text) -> "--arch ${archValue} ")
83-
arch
84-
85-
let suffixFlag =
86-
Prelude.Optional.map
87-
Text
88-
Text
89-
(\(suffix : Text) -> "--docker-suffix ${suffix} ")
90-
spec.suffix
91-
92-
in Prelude.Optional.default Text "" archFlag
93-
++ Prelude.Optional.default Text "" suffixFlag
87+
-> let archFlag = "--archs " ++ joinArchitectures spec ++ " "
88+
89+
let profileFlag = "--profile ${spec.profile} "
9490

9591
in ". ./buildkite/scripts/export-git-env-vars.sh && "
9692
++ "./buildkite/scripts/release/manager.sh verify "
97-
++ suffixAndArchFlag
9893
++ "--artifacts ${joinArtifacts spec} "
9994
++ "--networks ${joinNetworks spec} "
10095
++ "--version ${spec.version} "
10196
++ "--codenames ${joinCodenames spec} "
102-
++ merge
103-
{ None = ""
104-
, Some = \(suffix : Text) -> "--docker-suffix ${suffix} "
105-
}
106-
spec.suffix
97+
++ profileFlag
98+
++ archFlag
10799
++ "--only-dockers "
108100

109101
in { verify = verify, Spec = Spec }

0 commit comments

Comments
 (0)