Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Add Jenkinsfile for Geneva pipeline job #36

Merged
merged 1 commit into from
Jan 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// Copyright (c) 2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

edgeXBuildCApp (
project: 'device-grove-c',
dockerBuildFilePath: 'scripts/Dockerfile.alpine-3.9-base',
dockerFilePath: 'scripts/Dockerfile.alpine-3.9',
arch: ['arm64']
)
32 changes: 32 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

.PHONY: build test clean docker

MICROSERVICES=build/release/device-grove-c/device-grove-c
.PHONY: $(MICROSERVICES)

DOCKERS=docker_device_grove_c
.PHONY: $(DOCKERS)

VERSION=$(shell cat ./VERSION || echo 0.0.0)
GIT_SHA=$(shell git rev-parse HEAD)

build: ${MICROSERVICES}

build/release/device-grove-c/device-grove-c:
scripts/build.sh

test:
@echo $(MICROSERVICES)

clean:
rm -f $(MICROSERVICES)

docker: $(DOCKERS)

docker_device_grove_c:
docker build \
-f scripts/Dockerfile.alpine-3.9 \
--label "git_sha=$(GIT_SHA)" \
-t edgexfoundry/docker-device-grove-c:${GIT_SHA} \
-t edgexfoundry/docker-device-grove-c:${VERSION}-dev \
.
3 changes: 2 additions & 1 deletion scripts/Dockerfile.alpine-3.9
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM alpine:3.9 as builder
ARG BASE=alpine:3.9
FROM ${BASE} as builder
MAINTAINER Bindu Rao <bindu@iotechsys.com>
RUN apk add --update --no-cache build-base git gcc cmake make linux-headers yaml-dev libmicrohttpd-dev curl-dev util-linux-dev ncurses-dev

Expand Down
13 changes: 13 additions & 0 deletions scripts/Dockerfile.alpine-3.9-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ARG BASE=alpine:3.9
FROM ${BASE}
MAINTAINER Bindu Rao <bindu@iotechsys.com>
RUN apk add --update --no-cache build-base git gcc cmake make linux-headers yaml-dev libmicrohttpd-dev curl-dev util-linux-dev ncurses-dev

COPY scripts /device-grove/scripts
COPY src /device-grove/src/
COPY VERSION /device-grove
RUN mkdir -p /device-grove/build

WORKDIR /device-grove
RUN /device-grove/scripts/build_deps.sh 1
RUN /device-grove/scripts/build.sh