forked from convertigo/convertigo-che-assembly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·65 lines (59 loc) · 1.91 KB
/
build.sh
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# See: https://sipb.mit.edu/doc/safe-shell/
set -e
set -u
. ./build.include
init "$@"
MVN_REPO=${HOME}/.m2/repository
sudo mkdir -p ${MVN_REPO}
sudo chown -R $USER ${HOME}/.m2
echo "ls -la"
ls -la
echo "id"
id
docker run -it --rm \
-v "$MVN_REPO:/home/user/.m2/repository" \
-v "$PWD":/home/user/che-build \
-w /home/user/che-build \
--user=$(id -u) \
codenvy/che-dev \
id
echo "ls -la /home/user/"
docker run -it --rm \
-v "$MVN_REPO:/home/user/.m2/repository" \
-v "$PWD":/home/user/che-build \
-w /home/user/che-build \
--user=$(id -u) \
codenvy/che-dev \
ls -la /home/user/
echo "ls -la /home/user/.m2"
docker run -it --rm \
-v "$MVN_REPO:/home/user/.m2/repository" \
-v "$PWD":/home/user/che-build \
-w /home/user/che-build \
--user=$(id -u) \
codenvy/che-dev \
ls -la /home/user/.m2
docker run -it --rm \
-v "$MVN_REPO:/home/user/.m2/repository" \
-v "$PWD":/home/user/che-build \
-w /home/user/che-build \
--user=$(id -u) \
codenvy/che-dev \
mvn clean install
ls -l ${HOME}/.m2
# Run dockerfiles build
./dockerfiles/cli/build.sh
./dockerfiles/init/build.sh
./dockerfiles/server/build.sh
# Push images
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
docker push convertigo/convertigo-che-cli:nightly
docker push convertigo/convertigo-che-init:nightly
docker push convertigo/convertigo-che-server:nightly