Skip to content

Commit

Permalink
updating builds
Browse files Browse the repository at this point in the history
  • Loading branch information
denismakogon committed Jun 5, 2019
1 parent 965aabb commit 9e01a06
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 12 deletions.
44 changes: 37 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1
orbs:
anchore: anchore/[email protected]
jobs:
"fdk":
"test":
docker:
- image: circleci/golang:1.12.4
working_directory: ~/fdk-go
Expand All @@ -22,20 +22,39 @@ jobs:
git branch --set-upstream-to=origin/${CIRCLE_BRANCH} ${CIRCLE_BRANCH}
fi
"go1-12-4_security_check":
"go1_stretch_security_check":
executor: anchore/anchore_engine
working_directory: ~/fdk-go
steps:
- setup_remote_docker:
docker_layer_caching: true
- checkout
- run:
name: Golang 1.12.4 Stretch build
name: Golang 1 Stretch build
command: |
apk add bash
./build-images.sh 1.12.4 stretch
./build-images.sh 1 stretch
- anchore/analyze_local_image:
image_name: "fnproject/golang:1.12.4-stretch fnproject/golang:1.12.4-stretch-dev"
image_name: "fnproject/go:1-stretch fnproject/go:1-stretch-dev"
timeout: '500'
policy_failure: true
policy_bundle_file_path: .circleci/.anchore/policy_bundle.json
- anchore/parse_reports

"go1_alpine_security_check":
executor: anchore/anchore_engine
working_directory: ~/fdk-go
steps:
- setup_remote_docker:
docker_layer_caching: true
- checkout
- run:
name: Golang 1 Alpine 3.8 build
command: |
apk add bash
./build-images.sh 1 alpine
- anchore/analyze_local_image:
image_name: "fnproject/go:1-alpine fnproject/go:1-alpine-dev"
timeout: '500'
policy_failure: true
policy_bundle_file_path: .circleci/.anchore/policy_bundle.json
Expand All @@ -45,5 +64,16 @@ workflows:
version: 2
build:
jobs:
- "fdk"
- "go1-12-4_security_check"
- "test"
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
jobs:
- "test"
- "go1_stretch_security_check"
- "go1_alpine_security_check"
6 changes: 3 additions & 3 deletions build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -xe

goversion=${1:-"1.12.4"}
goversion=${1:-"1"}
ostype=${2:-"alpine"}

pushd images/${goversion}/${ostype}/build-stage/ && docker build -t fnproject/golang:${goversion}-${ostype}-dev . && popd
pushd images/${goversion}/${ostype}/runtime/ && docker build -t fnproject/golang:${goversion}-${ostype} . && popd
pushd images/${goversion}/${ostype}/build-stage && docker build -t fnproject/go:${goversion}-${ostype}-dev . && popd
pushd images/${goversion}/${ostype}/runtime && docker build -t fnproject/go:${goversion}-${ostype} . && popd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.12.4-alpine3.8
FROM golang:1-alpine3.8

RUN apk update && apk upgrade && \
apk add --no-cache wget curl git bzr mercurial build-base
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.12.4-stretch
FROM golang:1-stretch

RUN apt-get update && apt-get upgrade -qy && \
apt-get install wget curl mercurial build-essential gcc -qy && \
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions release_images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

user="fnproject"
image="go"
goversion="1"
stretch="stretch"
alpine="alpine"


docker push ${user}/${image}:${goversion}-${stretch}
docker push ${user}/${image}:${goversion}-${stretch}-dev

docker push ${user}/${image}:${goversion}-${alpine}
docker push ${user}/${image}:${goversion}-${alpine}-dev

0 comments on commit 9e01a06

Please sign in to comment.