Skip to content

Commit

Permalink
Faster builds on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
vihangpatil authored Nov 20, 2019
2 parents 468669d + 5aa45c0 commit b83612b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
27 changes: 16 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
version: 2
version: 2.1
jobs:
### JOBS FOR on-feature-branch-commit PIPELINE
build-test-repo:
# machine is needed to run Gradle build and to run docker compose tests
machine:
image: ubuntu-1604:201903-01
resource_class: large
environment:
JAVA_HOME: /usr/lib/jvm/zulu13.28.11-ca-jdk13.0.1-linux_x64

Expand All @@ -18,7 +19,7 @@ jobs:
sudo tar -zxf /tmp/zulu13.28.11-ca-jdk13.0.1-linux_x64.tar.gz -C /usr/lib/jvm
- run:
# checking for merge conflicts and merging locally if none exist
name: merging ${CIRCLE_BRANCH} into develop locally
name: merging into develop locally
command: |
git config --global user.email "${GIT_USER_EMAIL}"
git config --global user.name "${GIT_USER_NAME}"
Expand Down Expand Up @@ -65,13 +66,14 @@ jobs:
- .

# generating selfsigned certs. Needed for docker compose tests
- run:
name: Generate self signed certs
command: |
scripts/generate-selfsigned-ssl-certs.sh ocs.dev.ostelco.org
cp certs/ocs.dev.ostelco.org/nginx.crt ocsgw/cert/ocs.crt
scripts/generate-selfsigned-ssl-certs.sh metrics.dev.ostelco.org
cp certs/metrics.dev.ostelco.org/nginx.crt ocsgw/cert/metrics.crt
# - run:
# name: Generate self signed certs
# command: |
# scripts/generate-selfsigned-ssl-certs.sh ocs.dev.ostelco.org
# cp certs/ocs.dev.ostelco.org/nginx.crt ocsgw/cert/ocs.crt
# scripts/generate-selfsigned-ssl-certs.sh metrics.dev.ostelco.org
# cp certs/metrics.dev.ostelco.org/nginx.crt ocsgw/cert/metrics.crt

- run:
name: Acceptance Tests
command: docker-compose up --build --abort-on-container-exit
Expand Down Expand Up @@ -116,6 +118,7 @@ jobs:
build-code:
machine:
image: ubuntu-1604:201903-01
resource_class: large
environment:
JAVA_HOME: /usr/lib/jvm/zulu13.28.11-ca-jdk13.0.1-linux_x64

Expand Down Expand Up @@ -195,7 +198,8 @@ jobs:
at: ~/project

# starts a remote docker environment to run docker commands
- setup_remote_docker
- setup_remote_docker:
docker_layer_caching: true

- run:
name: build Prime docker image and push image to GCR
Expand Down Expand Up @@ -231,7 +235,8 @@ jobs:
at: ~/project

# starts a remote docker environment to run docker commands
- setup_remote_docker
- setup_remote_docker:
docker_layer_caching: true

- run:
name: build scaninfo shredder docker image and push image to GCR
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.esp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ services:

datastore-emulator:
container_name: datastore-emulator
image: google/cloud-sdk:218.0.0
image: google/cloud-sdk:272.0.0
expose:
- "8081"
environment:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.ocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ services:

datastore-emulator:
container_name: datastore-emulator
image: google/cloud-sdk:218.0.0
image: google/cloud-sdk:272.0.0
expose:
- "8081"
environment:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.seagull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ services:

datastore-emulator:
container_name: datastore-emulator
image: google/cloud-sdk:218.0.0
image: google/cloud-sdk:272.0.0
expose:
- "8081"
environment:
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ services:

datastore-emulator:
container_name: datastore-emulator
image: google/cloud-sdk:218.0.0
image: google/cloud-sdk:272.0.0
expose:
- "8081"
environment:
Expand All @@ -142,7 +142,7 @@ services:
build:
context: sim-administration/postgres
dockerfile: Dockerfile
tmpfs: "//var/lib/postgresql/data"
tmpfs: "/var/lib/postgresql/data"
ports:
- "55432:5432"

Expand Down

0 comments on commit b83612b

Please sign in to comment.