E595 Merge pull request #1047 from cloudflare/cbroglie/modules · cloudflare/cfssl@2318616 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2318616

Browse files
authored
Merge pull request #1047 from cloudflare/cbroglie/modules
Migrate to Go modules
2 parents 40f4f51 + 9f1008d commit 2318616

File tree

251 files changed

+9778
-120480
lines changed
  • rice
  • akavel/rsrc
  • cloudflare/go-metrics
  • daaku/go.zipexe
  • getsentry/raven-go
  • google/certificate-transparency-go
  • jessevdk/go-flags
  • kardianos/osext
  • kisom/goutils
  • kylelemons/go-gypsy
  • lib/pq
  • nkovacs/streamquote
  • valyala
  • ziutek/mymysql
  • zmap
  • golang.org/x
  • tag
  • triegen
  • ucd
  • language
  • unicode
  • tools
  • Some content is hidden

    Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

    251 files changed

    +9778
    -120480
    lines changed

    .gitignore

    Lines changed: 2 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1,6 +1,5 @@
    11
    dist/*
    22
    cli/serve/static.rice-box.go
    3-
    .coverprofile
    4-
    coverprofile.txt
    5-
    gopath
    3+
    coverage.txt
    4+
    profile.out
    65
    bin

    .travis.yml

    Lines changed: 10 additions & 34 deletions
    Original file line numberDiff line numberDiff line change
    @@ -3,12 +3,8 @@ language: go
    33

    44
    matrix:
    55
    include:
    6-
    - go: 1.12.7
    7-
    - go: master
    8-
    os: osx
    9-
    env: BUILD_TAGS=
    10-
    allow_failures:
    11-
    - go: master
    6+
    - go: 1.12.x
    7+
    - go: 1.13.x
    128

    139
    # Install g++-4.8 to support std=c++11 for github.com/google/certificate-transparency/go/merkletree
    1410
    addons:
    @@ -24,14 +20,6 @@ install:
    2420
    services:
    2521
    - mysql
    2622
    - postgresql
    27-
    before_install:
    28-
    # CFSSL consists of multiple Go packages, which refer to each other by
    29-
    # their absolute GitHub path, e.g. github.com/cloudflare/crypto/pkcs7.
    30-
    # That means, by default, if someone forks the repo and makes changes across
    31-
    # multiple packages within CFSSL, Travis won't pass for the branch on their
    32-
    # own repo. To fix that, we move the directory
    33-
    - mkdir -p $TRAVIS_BUILD_DIR $GOPATH/src/github.com/cloudflare
    34-
    - test ! -d $GOPATH/src/github.com/cloudflare/cfssl && mv $TRAVIS_BUILD_DIR $GOPATH/src/github.com/cloudflare/cfssl || true
    3523

    3624
    # Only build pull requests, pushes to the master branch, and branches
    3725
    # starting with `test-`. This is a convenient way to push branches to
    @@ -44,41 +32,29 @@ branches:
    4432
    - /^test-.*$/
    4533

    4634
    before_script:
    47-
    - go install ./vendor/golang.org/x/lint/golint
    48-
    - go install ./vendor/github.com/GeertJohan/fgt
    35+
    - make bin/golint
    4936
    # Setup DBs + run migrations
    50-
    - go install ./vendor/bitbucket.org/liamstask/goose/cmd/goose
    5137
    # The sql_mode adjustment is to remove a sql_mode that was added in MySQL 5.7, this mode applies a rule that does:
    5238
    # > The NO_ZERO_DATE mode affects whether the server permits '0000-00-00' as a valid date.
    5339
    # https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_zero_date
    5440
    - if [[ $(uname -s) == 'Linux' ]]; then
    41+
    make bin/goose;
    5542
    psql -c 'create database certdb_development;' -U postgres;
    56-
    goose -path $GOPATH/src/github.com/cloudflare/cfssl/certdb/pg up;
    43+
    ./bin/goose -path certdb/pg up;
    5744
    mysql -e 'create database certdb_development;' -u root;
    5845
    mysql -e 'SET global sql_mode = 0;' -u root;
    59-
    goose -path $GOPATH/src/github.com/cloudflare/cfssl/certdb/mysql up;
    46+
    ./bin/goose -path certdb/mysql up;
    6047
    fi
    48+
    6149
    script:
    6250
    - ./test.sh
    63-
    notifications:
    64-
    email:
    65-
    recipients:
    66-
    - cbroglie@cloudflare.com
    67-
    - gabriel@cloudflare.com
    68-
    - kyle@cloudflare.com
    69-
    - leland@cloudflare.com
    70-
    - mihir@cloudflare.com
    71-
    - mitul@cloudflare.com
    72-
    - nick@cloudflare.com
    73-
    - nicky@cloudflare.com
    74-
    on_success: never
    75-
    on_failure: change
    51+
    7652
    env:
    7753
    global:
    7854
    - secure: "OmaaZ3jhU9VQ/0SYpenUJEfnmKy/MwExkefFRpDbkRSu/hTQpxxALAZV5WEHo7gxLRMRI0pytLo7w+lAd2FlX1CNcyY62MUicta/8P2twsxp+lR3v1bJ7dwk6qsDbO7Nvv3BKPCDQCHUkggbAEJaHEQGdLk4ursNEB1aGimuCEc="
    79-
    - GO15VENDOREXPERIMENT=1
    55+
    - GO111MODULE=on
    8056
    matrix:
    8157
    - BUILD_TAGS="postgresql mysql"
    8258

    8359
    after_success:
    84-
    - bash <(curl -s https://codecov.io/bash) -f coverprofile.txt
    60+
    - bash <(curl -s https://codecov.io/bash)

    Dockerfile

    Lines changed: 7 additions & 11 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1,16 +1,12 @@
    1-
    FROM golang:1.12.7
    1+
    FROM golang:1.13.3@sha256:6a693fbaba7dd8d816f6afce049fb92b280c588e0a677c4c8db26645e613fc15
    22

    3-
    ENV USER root
    3+
    WORKDIR /workdir
    4+
    COPY . /workdir
    45

    5-
    WORKDIR /go/src/github.com/cloudflare/cfssl
    6-
    COPY . .
    7-
    8-
    # restore all deps and build
    9-
    RUN go get github.com/cloudflare/cfssl_trust/... && \
    10-
    go get github.com/GeertJohan/go.rice/rice && \
    11-
    rice embed-go -i=./cli/serve && \
    12-
    cp -R /go/src/github.com/cloudflare/cfssl_trust /etc/cfssl && \
    13-
    go install ./cmd/...
    6+
    RUN git clone https://github.com/cloudflare/cfssl_trust.git /etc/cfssl && \
    7+
    make clean && \
    8+
    make bin/rice && ./bin/rice embed-go -i=./cli/serve && \
    9+
    make all && cp bin/* /usr/bin/
    1410

    1511
    EXPOSE 8888
    1612

    Dockerfile.alpine

    Lines changed: 21 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,21 @@
    1+
    FROM golang:1.13.3-alpine3.10@sha256:40278d43a27b6e0563fcc4dd52c991a25741b1a775402aea342ab9a80158e69e as builder
    2+
    3+
    WORKDIR /workdir
    4+
    COPY . /workdir
    5+
    6+
    RUN set -x && \
    7+
    apk --no-cache add git gcc libc-dev make
    8+
    9+
    RUN git clone https://github.com/cloudflare/cfssl_trust.git /etc/cfssl && \
    10+
    make clean && \
    11+
    make bin/rice && ./bin/rice embed-go -i=./cli/serve && \
    12+
    make all
    13+
    14+
    FROM alpine:3.10
    15+
    COPY --from=builder /etc/cfssl /etc/cfssl
    16+
    COPY --from=builder /workdir/bin/ /usr/bin
    17+
    18+
    EXPOSE 8888
    19+
    20+
    ENTRYPOINT ["cfssl"]
    21+
    CMD ["--help"]

    Dockerfile.build

    Lines changed: 0 additions & 11 deletions
    This file was deleted.

    Dockerfile.minimal

    Lines changed: 0 additions & 30 deletions
    This file was deleted.

    0 commit comments

    Comments
     (0)
    0