Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get cross platform + goreleaser working for devspace #12166

Merged
merged 3 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 24 additions & 15 deletions charts/chainlink-cluster/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,15 @@ pipelines:

run_dependencies --all
ensure_pull_secrets --all
build_images ---var DOCKER_DEFAULT_PLATFORM=linux/amd64 --all -t $(git rev-parse --short HEAD)

build_images --all

kubectl label namespace ${DEVSPACE_NAMESPACE} cleanup.kyverno.io/ttl=${NS_TTL} || true
kubectl label namespace/${DEVSPACE_NAMESPACE} network=crib || true
if [ -n "$1" ]; then
echo "Deploying tag $1"
tag=$1
image=${DEVSPACE_IMAGE}:$tag
else
echo "Deploying current commit tag: $(git rev-parse --short HEAD)"
tag=$(git rev-parse --short HEAD)
image=${DEVSPACE_IMAGE}:$tag
fi

echo "Checking tag: $tag"
tag=$(git rev-parse --short HEAD)
image=${DEVSPACE_IMAGE}:$tag
echo "Checking tag: '$tag'"
repository_name="chainlink-devspace"
desired_tag=$tag

Expand Down Expand Up @@ -97,11 +92,25 @@ commands:
images:
app:
image: ${DEVSPACE_IMAGE}
dockerfile: ../../core/chainlink.devspace.Dockerfile
context: ../..
docker:
disableFallback: true
tags:
- $(git rev-parse --short HEAD)
custom:
skipImageArg: true
command: |-
TOPLEVEL=$(git rev-parse --show-toplevel)
pushd $TOPLEVEL
pwd
goreleaser --version
MACOS_SDK_DIR=$(pwd)/tools/bin/MacOSX12.3.sdk ./tools/bin/goreleaser_wrapper release --snapshot --clean --config .goreleaser.develop.yaml
popd
BUILT_IMAGE=$(cat $TOPLEVEL/dist/artifacts.json | jq -r '.[] | select(.type == "Docker Image" and .goarch == "amd64" and (.name | contains("sha")) and ( .name | contains("root") | not) ) | .name')

echo "Tagging and pushing image"
tag=$(git rev-parse --short HEAD)
TAGGED_IMAGE=${DEVSPACE_IMAGE}:$tag
docker tag $BUILT_IMAGE ${runtime.images.app.image}:${runtime.images.app.tag}
echo "Tagged image: $TAGGED_IMAGE"
docker push $TAGGED_IMAGE
hooks:
- wait:
running: true
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ in
mkShell {
nativeBuildInputs = [
go

goreleaser
postgresql

python3
Expand Down
Loading