-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from ernestio/f-micro-container-671
Migrate to micro container
- Loading branch information
Showing
7 changed files
with
50 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
machine: | ||
image: circleci/classic:201709-01 | ||
environment: | ||
NATS_URI: nats://127.0.0.1:4222 | ||
ROOTPATH: /home/circleci/.go_workspace/src/github.com/ernestio | ||
NATS_URI_TEST: nats://127.0.0.1:4222 | ||
GOBIN: /home/circleci/.go_workspace/bin | ||
CURRENT_INSTANCE: http://ernest.local:80/ | ||
JWT_SECRET: test | ||
IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" | ||
ERNEST_LOG_FILE: '/tmp/ernest.log' | ||
ERNEST_APPLY_DELAY: 1 | ||
ERNEST_CRYPTO_KEY: mMYlPIvI11z20H1BnBmB223355667788 | ||
working_directory: /home/circleci/.go_workspace/src/github.com/ernestio/monit | ||
steps: | ||
- checkout | ||
- run: | ||
name: Setup Hosts File | ||
command: echo 127.0.0.1 ernest.local | sudo tee -a /etc/hosts | ||
- run: | ||
name: Install Dependencies | ||
command: make dev-deps | ||
- run: | ||
name: Code Analysis | ||
command: make lint | ||
- run: | ||
name: Unit Tests | ||
command: make test | ||
- run: | ||
name: Integration Tests | ||
command: | | ||
git clone -b f-circleci-v2-680 [email protected]:ernestio/toolset.git /tmp/toolset/ | ||
cd /tmp/toolset/ernestci/ && bundle install | ||
ruby /tmp/toolset/ernestci/run.rb $CIRCLE_WORKING_DIRECTORY/.ernest-ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
FROM golang:1.8.2-alpine | ||
|
||
FROM golang:1.9.0-alpine3.6 as compiler | ||
RUN apk add --update git && apk add --update make && rm -rf /var/cache/apk/* | ||
|
||
ADD . /go/src/github.com/${GITHUB_ORG:-ernestio}/monit | ||
WORKDIR /go/src/github.com/${GITHUB_ORG:-ernestio}/monit | ||
RUN make deps && CGO_ENABLED=0 go install -a -ldflags '-s' . | ||
|
||
RUN make deps && go install | ||
|
||
ENTRYPOINT ./entrypoint.sh | ||
FROM scratch | ||
COPY --from=compiler /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
COPY --from=compiler /go/bin/monit . | ||
ENTRYPOINT ["./monit"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters