-
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.
- Loading branch information
Showing
7 changed files
with
88 additions
and
0 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,34 @@ | ||
version: 2 | ||
jobs: | ||
create_docker_image: | ||
working_directory: ~/docker-image | ||
machine: true | ||
steps: | ||
- checkout | ||
- run: | ||
name: Docker login | ||
command: DOCKER_USER=${JFROG_USER} DOCKER_PASS=${JFROG_PASS} DOCKER_URL=${JFROG_DOCKER_REPO} make docker-login | ||
- run: | ||
name: Set docker image to workspace | ||
command: mkdir -p workspace && echo "${JFROG_DOCKER_REPO}/${CIRCLE_PROJECT_REPONAME}" > workspace/docker-image | ||
- run: | ||
name: Show docker image | ||
command: cat workspace/docker-image | ||
- run: | ||
name: Docker create image | ||
command: DOCKER_IMAGE=$(cat workspace/docker-image) DOCKER_VERSION=${CIRCLE_TAG:1} make docker-build | ||
- run: | ||
name: Docker push | ||
command: DOCKER_IMAGE=$(cat workspace/docker-image) make docker-push | ||
|
||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- create_docker_image: | ||
context: apitree-aldo-context | ||
filters: | ||
tags: | ||
only: /v[0-9]+(\.[0-9]+)*(-.+)?/ | ||
branches: | ||
ignore: /.*/ |
Empty file.
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,25 @@ | ||
FROM alpine:latest | ||
|
||
LABEL maintainer="Ales Dostal <a.dostal@apitree.cz>" | ||
|
||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
COPY ./src /usr/src/app | ||
|
||
ENV HELM_VERSION="v2.9.0" | ||
|
||
ENV HELM_URL="https://storage.googleapis.com/kubernetes-helm" | ||
ENV HELM_TARBALL="helm-${HELM_VERSION}-linux-amd64.tar.gz" | ||
ENV STABLE_REPO_URL="https://kubernetes-charts.storage.googleapis.com/" | ||
ENV INCUBATOR_REPO_URL="https://kubernetes-charts-incubator.storage.googleapis.com/" | ||
|
||
RUN apk add --update ca-certificates \ | ||
&& apk add --update -t deps wget \ | ||
&& apk add --update make \ | ||
&& wget -q ${HELM_URL}/${HELM_TARBALL} \ | ||
&& tar xzfv ${HELM_TARBALL} \ | ||
&& mv ./linux-amd64/helm /usr/local/bin \ | ||
&& apk del --purge deps \ | ||
&& rm /var/cache/apk/* \ | ||
&& rm -f ${HELM_TARBALL} |
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,22 @@ | ||
default: create-docker | ||
|
||
# only for local testing | ||
test-build: | ||
@echo "Test docker build" | ||
docker build -t apitree-docker-local.jfrog.io/k8s-helm-jfrog:latest . | ||
|
||
# only for local testing | ||
test-go: | ||
docker run -dit apitree-docker-local.jfrog.io/k8s-helm-jfrog:latest | ||
|
||
docker-login: | ||
@echo "Login to docker remote repository" | ||
docker login -u ${DOCKER_USER} -p ${DOCKER_PASS} ${DOCKER_URL} | ||
|
||
docker-build: | ||
@echo "Build docker image" | ||
docker build -t ${DOCKER_IMAGE}:${DOCKER_VERSION} . | ||
|
||
docker-push: | ||
@echo "Push to docker repository" | ||
docker push ${DOCKER_IMAGE} |
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 +1,3 @@ | ||
# k8s-helm-jfrog | ||
|
||
> Docker image for creating helm package to jfrog |
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,4 @@ | ||
default: test | ||
|
||
test: | ||
echo "Hello world" |
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 @@ | ||
test file |