Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.
Merged
34 changes: 27 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,26 @@ variables:
environment:
name: parity-build

.build_to_own_reg: &docker_build_to_own_reg
<<: *docker_build
before_script:
- test -z "$DOCKERIMAGE" && echo "DOCKERIMAGE must be defined" && exit 1
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
Comment thread
TriplEight marked this conversation as resolved.
script:
# $CI_REGISTRY_IMAGE == registry.parity.io/parity/infrastructure/scripts/
# $CI_REGISTRY == registry.parity.io/
Comment thread
TriplEight marked this conversation as resolved.
- cd dockerfiles/$DOCKERFILE_DIR
# - docker pull $CI_REGISTRY_IMAGE/$CONTAINER_IMAGE:$CONTAINER_TAG || true
- CONTAINER_DATE_TAG="${CI_COMMIT_SHORT_SHA}-$(date +%Y%m%d)"
# - docker build --cache-from $CI_REGISTRY_IMAGE/$CONTAINER_IMAGE:$CONTAINER_TAG
- docker build --no-cache
--build-arg VCS_REF="${CI_COMMIT_SHA}"
--build-arg BUILD_DATE="$(date +%Y%m%d)"
--tag $CI_REGISTRY_IMAGE/$CONTAINER_IMAGE:$CONTAINER_DATE_TAG
--tag $CI_REGISTRY_IMAGE/$CONTAINER_IMAGE:$CONTAINER_TAG .
- docker push $CI_REGISTRY_IMAGE/$CONTAINER_IMAGE:$CONTAINER_DATE_TAG
- docker push $CI_REGISTRY_IMAGE/$CONTAINER_IMAGE:$CONTAINER_TAG


# TODO: check/change substrate 1.0, polkadot 0.4, zcash, parity-pharma, parity-bitcoin, light and remove this image
rust:
Expand All @@ -71,7 +91,7 @@ rust:
- $DOCKERIMAGE == $CI_JOB_NAME

parity-ci-linux:
<<: *docker_build
<<: *docker_build_to_own_reg
variables:
CONTAINER_IMAGE: $CI_JOB_NAME
CONTAINER_TAG: latest
Expand All @@ -81,7 +101,7 @@ parity-ci-linux:
- $DOCKERIMAGE == $CI_JOB_NAME

parity-ci-android:
<<: *docker_build
<<: *docker_build_to_own_reg
variables:
CONTAINER_IMAGE: $CI_JOB_NAME
CONTAINER_TAG: stretch
Expand All @@ -91,7 +111,7 @@ parity-ci-android:
- $DOCKERIMAGE == $CI_JOB_NAME

parity-ci-i386:
<<: *docker_build
<<: *docker_build_to_own_reg
variables:
CONTAINER_IMAGE: $CI_JOB_NAME
CONTAINER_TAG: latest
Expand All @@ -101,7 +121,7 @@ parity-ci-i386:
- $DOCKERIMAGE == $CI_JOB_NAME

parity-ci-arm64:
<<: *docker_build
<<: *docker_build_to_own_reg
variables:
CONTAINER_IMAGE: $CI_JOB_NAME
CONTAINER_TAG: latest
Expand All @@ -111,7 +131,7 @@ parity-ci-arm64:
- $DOCKERIMAGE == $CI_JOB_NAME

parity-ci-armhf:
<<: *docker_build
<<: *docker_build_to_own_reg
variables:
CONTAINER_IMAGE: $CI_JOB_NAME
CONTAINER_TAG: latest
Expand All @@ -121,7 +141,7 @@ parity-ci-armhf:
- $DOCKERIMAGE == $CI_JOB_NAME

parity-ci-docs:
<<: *docker_build
<<: *docker_build_to_own_reg
variables:
CONTAINER_IMAGE: $CI_JOB_NAME
CONTAINER_TAG: latest
Expand All @@ -142,7 +162,7 @@ rust-builder:


awscli:
<<: *docker_build
<<: *docker_build_to_own_reg
variables:
CONTAINER_IMAGE: $CI_JOB_NAME
CONTAINER_TAG: latest
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/awscli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG BUILD_DATE

LABEL io.parity.image.authors="devops-team@parity.io" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.title="parity/awscli" \
io.parity.image.title="registry.parity.io/parity/infrastructure/scripts/awscli" \
io.parity.image.description="awscli" \
io.parity.image.source="https://github.com/paritytech/scripts/blob/${VCS_REF}/\
dockerfiles/awscli/Dockerfile" \
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/parity-ci-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG BUILD_DATE

LABEL io.parity.image.authors="devops-team@parity.io" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.title="parity/parity-ci-android" \
io.parity.image.title="registry.parity.io/parity/infrastructure/scripts/parity-ci-android" \
io.parity.image.description="cmake rhash libudev-dev time xsltproc gperf; libudev.patch; \
android ndk r16b; cargo target arm-linux-androideabi, cargo target armv7-linux-androideabi" \
io.parity.image.source="https://github.com/paritytech/scripts/blob/${VCS_REF}/\
Expand Down Expand Up @@ -57,7 +57,7 @@ RUN set -eux; \
# autotools-dev automake autoconf libtool docbook-xsl
rustup target add arm-linux-androideabi; \
rustup target add armv7-linux-androideabi; \
cargo install sccache; \
cargo install sccache --features redis; \
# Android NDK and toolchain
cd /usr/local; \
wget -q https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip; \
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/parity-ci-android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Uses [sccache](https://github.com/mozilla/sccache).
# Usage
```linux-armv7-android:
stage: build
image: parity/parity-ci-android:stretch
image: registry.parity.io/parity/infrastructure/scripts/parity-ci-android:stretch
script:
- cargo build ...
```
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/parity-ci-arm64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM parity/parity-ci-linux:latest as builder
FROM registry.parity.io/parity/infrastructure/scripts/parity-ci-linux:latest as builder

# metadata
ARG VCS_REF
ARG BUILD_DATE

LABEL io.parity.image.authors="devops-team@parity.io" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.title="parity/parity-ci-arm64" \
io.parity.image.title="registry.parity.io/parity/infrastructure/scripts/parity-ci-arm64" \
io.parity.image.description="g++-aarch64-linux-gnu gcc-aarch64-linux-gnu libudev-dev \
libudev-dev:arm64; rustup target aarch64-unknown-linux-gnu" \
io.parity.image.source="https://github.com/paritytech/scripts/blob/${VCS_REF}/\
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/parity-ci-arm64/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Uses [sccache](https://github.com/mozilla/sccache).
```
build-linux-arm64:
stage: build
image: parity/parity-ci-arm64:latest
image: registry.parity.io/parity/infrastructure/scripts/parity-ci-arm64:latest
script:
- cargo build build --target aarch64-unknown-linux-gnu $CARGO_OPTIONS
```
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/parity-ci-armhf/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM parity/parity-ci-linux:latest as builder
FROM registry.parity.io/parity/infrastructure/scripts/parity-ci-linux:latest as builder

# metadata
ARG VCS_REF
ARG BUILD_DATE

LABEL io.parity.image.authors="devops-team@parity.io" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.title="parity/parity-ci-armhf" \
io.parity.image.title="registry.parity.io/parity/infrastructure/scripts/parity-ci-armhf" \
io.parity.image.description="g++-arm-linux-gnueabihf gcc-arm-linux-gnueabihf libudev-dev \
libudev-dev:armhf; cargo target armv7-unknown-linux-gnueabihf" \
io.parity.image.source="https://github.com/paritytech/scripts/blob/${VCS_REF}/\
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/parity-ci-armhf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Uses [sccache](https://github.com/mozilla/sccache).
```
build-linux-armhf:
stage: build
image: parity/parity-ci-armhf:latest
image: registry.parity.io/parity/infrastructure/scripts/parity-ci-armhf:latest
script:
- cargo build --target armv7-unknown-linux-gnueabihf $CARGO_OPTIONS
```
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/parity-ci-docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG BUILD_DATE

LABEL io.parity.image.authors="devops-team@parity.io" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.title="parity/parity-ci-docs" \
io.parity.image.title="registry.parity.io/parity/infrastructure/scripts/parity-ci-docs" \
io.parity.image.description="curl ca-certificates git; nodejs yarn" \
io.parity.image.source="https://github.com/paritytech/scripts/blob/${VCS_REF}/\
dockerfiles/parity-ci-docs/Dockerfile" \
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/parity-ci-i386/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM parity/parity-ci-linux:latest as builder
FROM registry.parity.io/parity/infrastructure/scripts/parity-ci-linux:latest as builder

# metadata
ARG VCS_REF
ARG BUILD_DATE

LABEL io.parity.image.authors="devops-team@parity.io" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.title="parity/parity-ci-i386" \
io.parity.image.title="registry.parity.io/parity/infrastructure/scripts/parity-ci-i386" \
io.parity.image.description="gcc-multilib g++-multilib libudev-dev libudev-dev:i386; \
cargo target i686-unknown-linux-gnu" \
io.parity.image.source="https://github.com/paritytech/scripts/blob/${VCS_REF}/\
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/parity-ci-i386/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Uses [sccache](https://github.com/mozilla/sccache).
```
build-linux-i386:
stage: build
image: parity/parity-ci-i386:latest
image: registry.parity.io/parity/infrastructure/scripts/parity-ci-i386:latest
script:
- cargo build --target i686-unknown-linux-gnu $CARGO_OPTIONS
```
Expand Down
5 changes: 3 additions & 2 deletions dockerfiles/parity-ci-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG BUILD_DATE

LABEL io.parity.image.authors="devops-team@parity.io" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.title="parity/parity-ci-linux" \
io.parity.image.title="registry.parity.io/parity/infrastructure/scripts/parity-ci-linux" \
io.parity.image.description="curl git make cmake ca-certificates g++ rhash gcc \
pkg-config libudev-dev time libssl-dev libc6-dev \
rust stable/beta/nightly, cargo-audit, sccache" \
Expand Down Expand Up @@ -40,7 +40,8 @@ RUN set -eux; \
rm rustup-init; \
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
rustup install nightly beta; \
cargo install cargo-audit sccache; \
cargo install cargo-audit; \
cargo install sccache --features redis; \
# apt clean up
apt-get autoremove -y; \
apt-get clean; \
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/parity-ci-linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Usage:
```
build-linux:
stage: build
image: parity/parity-ci-linux:latest
image: registry.parity.io/parity/infrastructure/scripts/parity-ci-linux:latest
script:
- cargo build ...
```