GithubHelp home page GithubHelp logo

isabella232 / poc_circleci_buildkit_parent Goto Github PK

View Code? Open in Web Editor NEW

This project forked from esl/poc_circleci_buildkit_parent

0.0 0.0 0.0 1.65 MB

parent repository (public) to verify docker buildkit on circleci check out child repository

License: Apache License 2.0

Elixir 56.73% Dockerfile 39.20% Makefile 4.07%

poc_circleci_buildkit_parent's Introduction

Proof-of-concept CircleCI with buildkit

The goal is to have a circleci build/docker hub push which :

  • retrieves build dependenies from private github repository
  • is expressed entirely within standard Dockerfile
  • is secure
  • Does not copy any SSH keys or passwords into the build container or any other wierd hacks or unsecured HTTP copy
  • The build/test/deploy (to local developer machine registry or production GKE registry is identical)
  • Developer can debug and verifiy build locally or just send it to CircleCI (YOLO)

Initial setup

Create parent and child repositories

  • bryanhuntesl/poc_circleci_buildkit_parent
  • esl/poc_circleci_buildkit_child (private repository)

Create low-privelege (read only) user (bryanhuntesl-lowpriv)

Generate a CircleCI compatible openssh keypair and add to bryanhuntesl-lowpriv Github account :

    openssl genrsa -out ~/.ssh/circleci 2048
    chmod 600 ~/.ssh/circleci
    ssh-keygen -y -f ~/.ssh/circleci > ~/.ssh/circleci.pub
    chmod 600 ~/.ssh/circleci.pub

added keys to low-priv account

Added bryanhuntesl-lowpriv as a collaborator (with read-only access to the esl/poc_circleci_buildkit_child) repository

added keys to low-priv account

Problems

Lot's during setup - the biggest of which was a strange SSH error from ssh-agent :

"#15 1.649 agent key RSA SHA256:94Pe0skfj2es8n6WGkwBXirHCxWi/44htbEDenxfFco returned incorrect signature type"

I couldn't match the message with any of the key signatures displayed in circleci GUI or the key fingerprint I had specified in the add_ssh_keys block:

- add_ssh_keys:
          fingerprints:
            - "58:25:b9:3b:e2:7c:46:89:60:26:10:9f:d0:e2:b6:ac"

The error manifested as such in the build console :

SSH Key Failure

I deleted the default CircleCI keys which presume are the keys they inject into your account (does this mean anyone who can push can wreak arbitrary havok ?? (TO be verified))

Delete default keys to prevent error

And the build succeeded - checking out the private git dependency without having to copy SSH keys into the container or any other problematic/insecure stuff.

Successfully used private keys to build project

poc_circleci_buildkit_parent's People

Contributors

bryanhuntesl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.