From bf76de3ab6adf777106eb5964eed1873bbda40d8 Mon Sep 17 00:00:00 2001 From: Vishnu Bharathi Date: Tue, 2 Mar 2021 12:55:32 +0530 Subject: [PATCH] ci: exits in case of an error in Makefile, refactor cli-migrations-v2 image in accordance with hge base image Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com> GitOrigin-RevId: 484147cb31becf6742620219d1c2b96a66bdb667 --- scripts/cli-migrations/Makefile | 2 ++ scripts/cli-migrations/v2/Dockerfile | 13 +++---------- .../cli-migrations/v2/test/validation/metadata.json | 1 + 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/scripts/cli-migrations/Makefile b/scripts/cli-migrations/Makefile index d826b981c2c..74318bcba06 100644 --- a/scripts/cli-migrations/Makefile +++ b/scripts/cli-migrations/Makefile @@ -6,6 +6,8 @@ BINARY ?= $(BUILD_DIR)/_cli_output/binaries/cli-hasura-linux-amd64 IMAGE_TAG ?= cli-migrations BUILD_OUTPUT ?= $(BUILD_DIR)/_cli_migrations_output SERVER_BUILD_OUTPUT := $(BUILD_DIR)/_server_output +SHELL := /bin/bash +.SHELLFLAGS := -ce .PHONY: load-server-image load-server-image: diff --git a/scripts/cli-migrations/v2/Dockerfile b/scripts/cli-migrations/v2/Dockerfile index 3e22331e25c..948ef5b9724 100644 --- a/scripts/cli-migrations/v2/Dockerfile +++ b/scripts/cli-migrations/v2/Dockerfile @@ -1,13 +1,6 @@ -FROM hasura/haskell-docker-packager:20190731 as packager -WORKDIR /tmp -RUN apt-get update && apt-get download libstdc++6 +FROM hasura/graphql-engine:v2.0.0-alpha.2 -FROM hasura/graphql-engine:v1.4.0-alpha.1 - -# install libstdc++6 from .deb file -COPY --from=packager /tmp/libstdc++6* . -RUN busybox dpkg-deb -x libstdc++6*.deb / \ - && rm libstdc++6*.deb +RUN apt-get update && apt-get install -y netcat # set an env var to let the cli know that # update notification is disabled @@ -26,4 +19,4 @@ ENV HASURA_GRAPHQL_CLI_ENVIRONMENT=server-on-docker ENTRYPOINT ["docker-entrypoint.sh"] -CMD ["graphql-engine", "serve"] +CMD ["graphql-engine", "serve"] \ No newline at end of file diff --git a/scripts/cli-migrations/v2/test/validation/metadata.json b/scripts/cli-migrations/v2/test/validation/metadata.json index b89f5f5b87f..65c77eee025 100644 --- a/scripts/cli-migrations/v2/test/validation/metadata.json +++ b/scripts/cli-migrations/v2/test/validation/metadata.json @@ -3,6 +3,7 @@ "sources": [ { "name": "default", + "kind": "postgres", "tables": [], "configuration": { "connection_info": {