-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
40 lines (39 loc) · 1.69 KB
/
wercker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
no-response-timeout: 15
box: combient/java-mvn
build:
steps:
- script:
name: Maven build - MBean Sample application
code: mvn clean package
build-domain-in-home-image:
box:
id: alpine
cmd: /bin/sh
docker: true
steps:
- script:
name: Install curl and docker
code: apk --no-cache add curl docker
- script:
name: Build docker image
code: |
docker login $REGION.ocir.io -u $TENANCY/$OCI_REGISTRY_USERNAME -p $OCI_REGISTRY_PASSWORD
if docker pull $REGION.ocir.io/$TENANCY/$WERCKER_APPLICATION_NAME:latest; then
docker build --file Dockerfile.update \
--build-arg SOURCEIMAGE=$REGION.ocir.io/$TENANCY/$WERCKER_APPLICATION_NAME:latest \
--force-rm=true \
-t $REGION.ocir.io/$TENANCY/$WERCKER_APPLICATION_NAME:$WERCKER_GIT_COMMIT \
-t $REGION.ocir.io/$TENANCY/$WERCKER_APPLICATION_NAME:latest .
else
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
docker build --file Dockerfile.create \
--force-rm=true \
-t $REGION.ocir.io/$TENANCY/$WERCKER_APPLICATION_NAME:$WERCKER_GIT_COMMIT \
-t $REGION.ocir.io/$TENANCY/$WERCKER_APPLICATION_NAME:latest .
fi
- script:
name: Push the image to a repository
code: |
docker login $REGION.ocir.io -u $TENANCY/$OCI_REGISTRY_USERNAME -p $OCI_REGISTRY_PASSWORD
docker push $REGION.ocir.io/$TENANCY/$WERCKER_APPLICATION_NAME:$WERCKER_GIT_COMMIT
docker push $REGION.ocir.io/$TENANCY/$WERCKER_APPLICATION_NAME:latest