Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into laurent/e2e-tests-1
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentluce committed Aug 30, 2024
2 parents d2125a3 + 24cb56b commit 02b7f50
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 54 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ jobs:

- name: Publish images to AWS
run: |
nix run ./#publish-kontrol-frontend-container
nix run ./#publish-kontrol-service-container
nix run ./#publish-aws-kontrol-frontend-container
nix run ./#publish-aws-kontrol-service-container
- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -73,8 +73,8 @@ jobs:

- name: Publish images to DockerHub
run: |
nix run ./#publish-kontrol-frontend-container
nix run ./#publish-kontrol-service-container
nix run ./#publish-dockerhub-kontrol-frontend-container
nix run ./#publish-dockerhub-kontrol-service-container
deploy:
name: Update Cluster Deployment
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.1.23](https://github.com/kurtosis-tech/kardinal-kontrol/compare/0.1.22...0.1.23) (2024-08-29)


### Miscellaneous Chores

* release 0.1.23 ([36db36d](https://github.com/kurtosis-tech/kardinal-kontrol/commit/36db36d2f55e746f958f6c8601d8fdbea5d613e7))

## [0.1.22](https://github.com/kurtosis-tech/kardinal-kontrol/compare/0.1.21...0.1.22) (2024-08-27)


Expand Down
106 changes: 57 additions & 49 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@

service_names = ["kontrol-service" "kontrol-frontend"];
architectures = ["amd64" "arm64"];
imageRegistry = "258623609258.dkr.ecr.us-east-1.amazonaws.com";
imageRegistries = {
"aws" = "258623609258.dkr.ecr.us-east-1.amazonaws.com";
"dockerhub" = "docker.io";
};

matchingContainerArch =
if builtins.match "aarch64-.*" system != null
Expand All @@ -49,54 +52,59 @@
packages."public-${packageName}" = package;
};

multiPlatformDockerPusher = acc: service:
pkgs.lib.recursiveUpdate acc {
packages."publish-${service}-container" = let
name = "${imageRegistry}/kurtosistech/${service}";
tagBase = "latest";
images =
map (
arch: rec {
inherit arch;
image = self.containers.${system}.${service}.${arch};
tag = "${tagBase}-${arch}";
}
)
architectures;
loadAndPush = builtins.concatStringsSep "\n" (pkgs.lib.concatMap
({
arch,
image,
tag,
}: [
"$docker load -i ${image}"
"$docker tag ${service}:${tag} ${name}:${tag}"
"$docker push ${name}:${tag}"
])
images);
imageNames =
builtins.concatStringsSep " "
(map ({
arch,
image,
tag,
}: "${name}:${tag}")
images);
in
pkgs.writeTextFile {
inherit name;
text = ''
#!${pkgs.stdenv.shell}
set -euxo pipefail
docker=${pkgs.docker}/bin/docker
${loadAndPush}
$docker manifest create --amend ${name}:${tagBase} ${imageNames}
$docker manifest push ${name}:${tagBase}
'';
executable = true;
destination = "/bin/push";
};
};
multiPlatformDockerPusher = acc: service: let
scriptBuilder = imageRegistry: let
name = "${imageRegistry}/kurtosistech/${service}";
tagBase = "latest";
images =
map (
arch: rec {
inherit arch;
image = self.containers.${system}.${service}.${arch};
tag = "${tagBase}-${arch}";
}
)
architectures;
loadAndPush = builtins.concatStringsSep "\n" (pkgs.lib.concatMap
({
arch,
image,
tag,
}: [
"$docker load -i ${image}"
"$docker tag ${service}:${tag} ${name}:${tag}"
"$docker push ${name}:${tag}"
])
images);
imageNames =
builtins.concatStringsSep " "
(map ({
arch,
image,
tag,
}: "${name}:${tag}")
images);
in
pkgs.writeTextFile {
inherit name;
text = ''
#!${pkgs.stdenv.shell}
set -euxo pipefail
docker=${pkgs.docker}/bin/docker
${loadAndPush}
$docker manifest create --amend ${name}:${tagBase} ${imageNames}
$docker manifest push ${name}:${tagBase}
'';
executable = true;
destination = "/bin/push";
};
packages =
pkgs.lib.concatMapAttrs (name: registry: {
"publish-${name}-${service}-container" = scriptBuilder registry;
})
imageRegistries;
in
pkgs.lib.recursiveUpdate acc {packages = packages;};

getPkgsCrossSystem = targetSystem:
builtins.trace "${targetSystem}" (
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.22
0.1.23

0 comments on commit 02b7f50

Please sign in to comment.