Skip to content

Commit

Permalink
feat: enable opbeans java release process (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Nov 29, 2019
1 parent 1ace7bf commit 63468a2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .ci/bump-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euxo pipefail

AGENT_VERSION="${1:?"Please set the java agent version"}"

# Update agent dependencies
cd opbeans
./mvnw -B versions:use-dep-version -DdepVersion=${AGENT_VERSION} -Dincludes=co.elastic.apm:apm-agent-api

# Commit changes
git add pom.xml
git commit -m "Bump version ${AGENT_VERSION}"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ hs_err_pid*
# For the BATS testing
bats/
target/
pom.xml.versionsBackup
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

PORT ?= 8000
IMAGE ?= opbeans/opbeans-java
VERSION ?= latest
LTS_ALPINE ?= 12-alpine

Expand All @@ -12,7 +12,7 @@ help: ## Display this help text
all: build test

build: ## Build docker image
@docker build --file Dockerfile --tag=opbeans/opbeans-java:${VERSION} .
@docker build --file Dockerfile --tag=${IMAGE}:${VERSION} .

bats: ## Install bats in the project itself
@git clone https://github.com/sstephenson/bats.git
Expand All @@ -30,7 +30,7 @@ test: prepare-test ## Run the tests
sh -c "npm install tap-xunit -g && cat target/results.tap | tap-xunit --package='co.elastic.opbeans' > target/junit-results.xml"

publish: build ## Publish docker image
@docker push opbeans/opbeans-java:${VERSION}
@docker push "${IMAGE}:${VERSION}"

clean: ## Clean autogenerated files/folders
@rm -rf bats
Expand Down

0 comments on commit 63468a2

Please sign in to comment.