From 846386c7ff171ab580a4256ee3d084685a1117ae Mon Sep 17 00:00:00 2001 From: Mads Schou-Andreasen Date: Wed, 20 May 2020 00:06:08 +0200 Subject: [PATCH] Revert "gitlab fixes" This reverts commit 8ae46dfda38c8b4f275fc68ff88ad83f41fafa7f. --- .gitignore | 2 -- .gitlab-ci.yml | 61 -------------------------------------------------- Dockerfile | 18 +++------------ 3 files changed, 3 insertions(+), 78 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitignore b/.gitignore index 91f51873..a99c97ca 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,3 @@ packages/ # Ignore IDE folders .idea/ .vscode/ -vendor/* -/vendor/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index b39ef6d6..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,61 +0,0 @@ -variables: - GITLAB_IMAGE: registry.gitlab.com/oceanboltpub/tile38 - -stages: - - build - - push - -.build_images: &build_images - before_script: - - echo $CI_JOB_TOKEN | docker login -u gitlab-ci-token registry.gitlab.com --password-stdin - - docker login -u _json_key --password-stdin https://eu.gcr.io < $GITLAB_DEPLOY_BOT_KEY - image: docker:19.03.0 - services: - - docker:19.03.0-dind - variables: - #DOCKER_HOST: tcp://localhost:2375 - DOCKER_TLS_DIR: "/certs" - DOCKER_DRIVER: overlay2 - stage: build - only: - - master - - development - - merge_requests - tags: - - docker - script: - - docker pull $GITLAB_IMAGE:$EDITION || true - - > - docker build - --build-arg VCS_REF=$CI_COMMIT_SHA - --build-arg VCS_URL=$CI_PROJECT_URL - --tag $GITLAB_IMAGE:$CI_COMMIT_SHA - . - - docker push $GITLAB_IMAGE - - -.push_master: &push_master - before_script: - - echo $CI_JOB_TOKEN | docker login -u gitlab-ci-token registry.gitlab.com --password-stdin - - docker login -u _json_key --password-stdin https://eu.gcr.io < $GITLAB_DEPLOY_BOT_KEY - image: docker:19.03.0 - services: - - docker:19.03.0-dind - stage: push - only: - - master - variables: - # Again, we do not need the source code here. Just playing with Docker. - GIT_STRATEGY: none - #DOCKER_HOST: tcp://localhost:2375 - DOCKER_DRIVER: overlay2 - # Create the certificates inside this directory for both the server - # and client. The certificates used by the client will be created in - # /certs/client so we only need to share this directory with the - # volume mount in `config.toml`. - DOCKER_TLS_CERTDIR: "/certs" - script: - - docker pull $GITLAB_IMAGE:$CI_COMMIT_SHA - - docker tag $GITLAB_IMAGE:$CI_COMMIT_SHA $GITLAB_IMAGE:latest - - docker push $GITLAB_IMAGE:latest -# Here, the goal is to tag the "master" branch as "latest" \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 2c015cfc..18b164f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,9 @@ -FROM golang:1.13 as builder - -# Copy local code to the container image. -WORKDIR /tile38 -COPY . . -COPY ./cmd/tile38-server/main.go . - -# Build the command inside the container. -# (You may fetch or manage dependencies here, -# either manually or with a tool like "godep".) -RUN CGO_ENABLED=0 GOOS=linux go build -v -o tile38-server - FROM alpine:3.8 RUN apk add --no-cache ca-certificates -COPY --from=builder /tile38/tile38-server /usr/local/bin/tile38-server -#ADD tile38-cli /usr/local/bin -#ADD tile38-benchmark /usr/local/bin +ADD tile38-server /usr/local/bin +ADD tile38-cli /usr/local/bin +ADD tile38-benchmark /usr/local/bin RUN addgroup -S tile38 && \ adduser -S -G tile38 tile38 && \