1
- # Use the latest 2.1 version of CircleCI pipeline process engine.
2
- # See: https://circleci.com/docs/2.0/configuration-reference
3
1
version : 2.1
4
2
5
- # Define a job to be invoked later in a workflow.
6
- # See: https://circleci.com/docs/2.0/configuration-reference/#jobs
7
3
jobs :
8
- # Below is the definition of your job to build and test your app, you can rename and customize it as you want.
9
- build-and-test :
10
- # These next lines define a Docker executor: https://circleci.com/docs/2.0/executor-types/
11
- # You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
12
- # Be sure to update the Docker image tag below to openjdk version of your application.
13
- # A list of available CircleCI Docker Convenience Images are available here: https://circleci.com/developer/images/image/cimg/openjdk
4
+ test :
14
5
docker :
15
6
- image : cimg/openjdk:11.0
16
- # Add steps to the job
17
- # See: https://circleci.com/docs/2.0/configuration-reference/#steps
18
7
steps :
19
- # Checkout the code as the first step.
20
8
- checkout
21
- # Use mvn clean and package as the standard maven build phase
22
- - run :
23
- name : Build
24
- command : mvn -B -DskipTests clean package
25
- # Then run your tests!
9
+
26
10
- run :
27
11
name : Test
28
- command : mvn test
12
+ command : |
13
+ cd kawa-web-collection
14
+ git submodule update --init
15
+ mvn install -DskipTests=true
16
+ cd ..
17
+ mvn test
18
+
19
+ build :
20
+ machine : true
21
+ steps :
22
+ - checkout
23
+
24
+ - run : |
25
+ cd kawa-web-collection
26
+ git submodule update --init
27
+ cd ..
28
+ docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
29
+ docker build -t arvyy/r7rs-index:$CIRCLE_BRANCH -f docker/Dockerfile .
30
+
31
+ - run : docker push arvyy/r7rs-index:$CIRCLE_BRANCH
32
+
29
33
deploy :
30
34
machine : true
31
35
steps :
@@ -34,13 +38,17 @@ jobs:
34
38
command : |
35
39
ssh $SSH_USER@$SSH_HOST "bash ~/update.sh"
36
40
37
- # Invoke jobs via workflows
38
- # See: https://circleci.com/docs/2.0/configuration-reference/#workflows
39
41
workflows :
40
- sample : # This is the name of the workflow, feel free to change it to better match your workflow.
41
- # Inside the workflow, you define the jobs you want to run.
42
+ sample :
42
43
jobs :
43
- - build-and-test
44
+ - test
45
+ - build :
46
+ requires :
47
+ - test
44
48
- deploy :
45
49
requires :
46
- - build-and-test
50
+ - build
51
+ filters :
52
+ branches :
53
+ only :
54
+ - master
0 commit comments