hasura / gitkube

Build and deploy docker images to Kubernetes using git push
Apache License 2.0
3.81k stars 207 forks source link

Gitkube can't resolve Maven Repos #116

Open rtarar opened 5 years ago

rtarar commented 5 years ago

This is a simple kafkaapp built on Micronaut using mvn as build.

I tried the wget wget https://jcenter.bintray.com/io/micronaut/micronaut-bom/1.1.4/micronaut-bom-1.1.4.pom from the gitkubd running on kibe-system and it works fine on the shell.

But when I do a remote push , the build does not succeed see logs below.

Using EKS Rancher

Not sure what the issue is ? I installed Gitkube as per directions on the k8 EKS cluster.

Is there s DNS setting I need to check while installing Gitkube?

Why is the build not resolving the center.bintray.com host?

Dockerfile

# build stage
FROM maven:3.6-jdk-11 as builder
RUN mkdir -p /usr/src/app
COPY . /usr/src/app
WORKDIR /usr/src/app
#below added to test name resolution
RUN wget https://jcenter.bintray.com/io/micronaut/micronaut-bom/1.1.4/micronaut-bom-1.1.4.pom
RUN mvn -X clean package -DskipTests=true

# create Image stage
FROM adoptopenjdk/openjdk11-openj9:jdk-11.0.1.13-alpine-slim
RUN apk --no-cache add curl
COPY --from=builder /usr/src/app/target/kafka-app*.jar app.jar
EXPOSE 9999
RUN sh -c 'touch ./app.jar'
ENTRYPOINT ["java","-jar","./app.jar"]

Logs

Enumerating objects: 54, done.
Counting objects: 100% (54/54), done.
Delta compression using up to 12 threads
Compressing objects: 100% (51/51), done.
Writing objects: 100% (54/54), 55.22 KiB | 11.04 MiB/s, done.
Total 54 (delta 18), reused 0 (delta 0)
remote: Gitkube build system : Fri Aug  2 19:15:19 UTC 2019: Initialising
remote: 
remote: Creating the build directory
remote: Checking out 'master:63a4bb0bcd30998c8a43752a6a35a05a762f98a1' to '/home/default-kafkaapp/build/default-kafkaapp'
remote: 
remote: 1 deployment(s) found in this repo
remote: Trying to build them...
remote: 
remote: Building Docker image for : kafkaapp
remote: 
remote: Building Docker image : 471108701394.dkr.ecr.us-east-1.amazonaws.com/default-kafkaapp-default.kafkaapp-kafkaapp:63a4bb0bcd30998c8a43752a6a35a05a762f98a1
remote: Sending build context to Docker daemon  104.4kB
remote: Step 1/12 : FROM maven:3.6-jdk-11 as builder
remote:  ---> c83305b372a3
remote: Step 2/12 : RUN mkdir -p /usr/src/app
remote:  ---> Using cache
remote:  ---> 5328f735b6a5
remote: Step 3/12 : COPY . /usr/src/app
remote:  ---> Using cache
remote:  ---> 50c8efefaff9
remote: Step 4/12 : WORKDIR /usr/src/app
remote:  ---> Using cache
remote:  ---> 1a909ea6bf06
remote: Step 5/12 : RUN wget https://jcenter.bintray.com/io/micronaut/micronaut-bom/1.1.4/micronaut-bom-1.1.4.pom
remote:  ---> Running in fef19e666c6f
remote: --2019-08-02 19:15:19--  https://jcenter.bintray.com/io/micronaut/micronaut-bom/1.1.4/micronaut-bom-1.1.4.pom
**remote: Resolving jcenter.bintray.com (jcenter.bintray.com)... failed: Temporary failure in name resolution.
remote: wget: unable to resolve host address ‘jcenter.bintray.com’
remote: The command '/bin/sh -c wget https://jcenter.bintray.com/io/micronaut/micronaut-bom/1.1.4/micronaut-bom-1.1.4.pom' returned a non-zero code: 4**
To ssh://aa27fd4efb3bf11e98909125b7a4bec1-1337975074.us-east-1.elb.amazonaws.com/~/git/default-kafkaapp
 **! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'ssh://default-kafkaapp@aa27fd4efb3bf11e98909125b7a4bec1-1337975074.us-east-1.elb.amazonaws.com/~/git/default-kafkaapp'**