Skip to content

Commit 81147bb

Browse files
committed
Updated CircleCI build/test image.
1 parent 9971666 commit 81147bb

File tree

5 files changed

+33
-13
lines changed

5 files changed

+33
-13
lines changed

.circleci/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*
22
!requirements-conda.txt
3+
!fix-permissions

.circleci/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ RUN \
1919
ENV CONDA_DIR=/opt/conda
2020
ENV PATH=$CONDA_DIR/bin:$PATH
2121

22-
COPY requirements-conda.txt /tmp
22+
COPY requirements-conda.txt fix-permissions /tmp
2323
RUN \
2424
conda install --quiet --yes --channel=conda-forge --file=/tmp/requirements-conda.txt && \
2525
echo "$CONDA_DIR/lib" > /etc/ld.so.conf.d/conda.conf && \
2626
ldconfig && \
27-
conda clean --all --force-pkgs-dirs --yes --quiet
27+
conda clean --all --force-pkgs-dirs --yes --quiet && \
28+
sh /tmp/fix-permissions $CONDA_DIR
29+
2830

2931
# Work-around for pyproj issue https://github.com/pyproj4/pyproj/issues/415
3032
ENV PROJ_LIB=/opt/conda/share/proj

.circleci/Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
IMAGE_NAME=circleci-openjdk-conda-gdal
22
SHA=$(shell git log -n1 --format=format:"%H" | cut -c 1-7)
33
VERSION?=$(SHA)
4-
HOST=docker.pkg.github.com
5-
REPO=$(HOST)/locationtech/rasterframes
4+
HOST=docker.io
5+
REPO=$(HOST)/s22s
66
FULL_NAME=$(REPO)/$(IMAGE_NAME):$(VERSION)
7-
GIT_USER?=metasim
8-
KEY?=$(HOME)/.github/repo-publish-key.txt
97

108
.DEFAULT_GOAL := help
119
help:
@@ -20,7 +18,7 @@ build: ## Build the docker image
2018
docker build . -t ${FULL_NAME}
2119

2220
login: ## Login to the docker registry
23-
cat $(KEY) | docker login $(HOST) -u $(GIT_USER) --password-stdin
21+
docker login
2422

2523
push: login ## Push docker image to registry
2624
docker push ${FULL_NAME}

.circleci/config.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ orbs:
66
executors:
77
default:
88
docker:
9-
- image: s22s/miniconda-gdal:latest
9+
- image: s22s/circleci-openjdk-conda-gdal:b8e30ee
1010
working_directory: ~/repo
1111
environment:
12-
SBT_VERSION: 1.3.8
13-
SBT_OPTS: -Xmx768m
12+
_JAVA_OPTIONS: "-Xms32m -Xmx512m"
1413
commands:
1514
setup:
1615
description: Setup for sbt build
@@ -59,7 +58,7 @@ orbs:
5958
command: |
6059
mkdir -p /tmp/core_dumps
6160
ls -lh /tmp
62-
cp core.* *.hs /tmp/core_dumps 2> /dev/null || true
61+
cp core.* *.hs core/* /tmp/core_dumps 2> /dev/null || true
6362
cp -r /tmp/hsperfdata* /tmp/*.hprof /tmp/core_dumps 2> /dev/null || true
6463
when: on_fail
6564

@@ -79,8 +78,6 @@ orbs:
7978
steps:
8079
- run:
8180
command: |
82-
mkdir -p /tmp/core_dumps
83-
cp core.* *.hs /tmp/core_dumps 2> /dev/null || true
8481
mkdir -p /tmp/markdown
8582
cp /home/circleci/repo/pyrasterframes/target/python/docs/*.md /tmp/markdown 2> /dev/null || true
8683
when: on_fail

.circleci/fix-permissions

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
GID=3434 # circleci
6+
7+
for d in "$@"; do
8+
find "$d" \
9+
! \( \
10+
-group $GID \
11+
-a -perm -g+rwX \
12+
\) \
13+
-exec chgrp $GID {} \; \
14+
-exec chmod g+rwX {} \;
15+
# setuid,setgid *on directories only*
16+
find "$d" \
17+
\( \
18+
-type d \
19+
-a ! -perm -6000 \
20+
\) \
21+
-exec chmod +6000 {} \;
22+
done

0 commit comments

Comments
 (0)