Skip to content

Commit 215cbf2

Browse files
committed
Update to use docker-build and to promote develop tag
1 parent 2fc29b2 commit 215cbf2

File tree

1 file changed

+6
-27
lines changed

1 file changed

+6
-27
lines changed

wercker.yml

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,10 @@ build:
3737
goals: clean install
3838
version: 3.5.2
3939
cache_repo: true
40-
- script:
41-
name: Copy built-artifacts into the image
42-
code: |
43-
mkdir /operator
44-
mkdir /operator/lib
45-
cp -R src/scripts/* /operator/
46-
cp operator/target/weblogic-kubernetes-operator-1.0.jar /operator/weblogic-kubernetes-operator.jar
47-
cp operator/target/lib/*.jar /operator/lib/
48-
export IMAGE_TAG_OPERATOR="${IMAGE_TAG_OPERATOR:-${WERCKER_GIT_BRANCH//[_\/]/-}}"
49-
if [ "$IMAGE_TAG_OPERATOR" = "develop" ]; then
50-
export IMAGE_TAG_OPERATOR="latest"
51-
elif [ "$IMAGE_TAG_OPERATOR" = "master" ]; then
52-
export IMAGE_TAG_OPERATOR="1.0"
53-
fi
54-
- script:
55-
name: Remove things we do not want in the Docker image in order to reduce size of image
56-
code: |
57-
rpm -e --nodeps tar
58-
rpm -e --nodeps gzip
59-
yum clean all
60-
rm -rf /var/cache/yum
40+
- internal/docker-build:
41+
dockerfile: Dockerfile
42+
image-name: $REPO_REPOSITORY:$IMAGE_TAG_OPERATOR
43+
no-cache: true
6144
# push the image to Docker using the GIT branch as the tag
6245
# this image needs to be available to the integration-test pipeline for testing
6346
- internal/docker-push:
@@ -177,9 +160,7 @@ integration-test:
177160
178161
export IMAGE_NAME_OPERATOR="${REPO_REPOSITORY}"
179162
export IMAGE_TAG_OPERATOR="${WERCKER_GIT_BRANCH//[_\/]/-}"
180-
if [ "$IMAGE_TAG_OPERATOR" = "develop" ]; then
181-
export IMAGE_TAG_OPERATOR="latest"
182-
elif [ "$IMAGE_TAG_OPERATOR" = "master" ]; then
163+
if [ "$IMAGE_TAG_OPERATOR" = "master" ]; then
183164
export IMAGE_TAG_OPERATOR="1.0"
184165
fi
185166
export IMAGE_PULL_POLICY_OPERATOR="Always"
@@ -277,9 +258,7 @@ integration-test-java:
277258
278259
export IMAGE_NAME_OPERATOR="${REPO_REPOSITORY}"
279260
export IMAGE_TAG_OPERATOR="${WERCKER_GIT_BRANCH//[_\/]/-}"
280-
if [ "$IMAGE_TAG_OPERATOR" = "develop" ]; then
281-
export IMAGE_TAG_OPERATOR="latest"
282-
elif [ "$IMAGE_TAG_OPERATOR" = "master" ]; then
261+
if [ "$IMAGE_TAG_OPERATOR" = "master" ]; then
283262
export IMAGE_TAG_OPERATOR="1.0"
284263
fi
285264
export IMAGE_PULL_POLICY_OPERATOR="Always"

0 commit comments

Comments
 (0)