Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
Rename supply-chain-tp to grid-track-and-trace-tp
Browse files Browse the repository at this point in the history
This also fixes up remaining related Docker and Docker Compose files to
reflect this naming change.

Signed-off-by: Shawn T. Amundson <amundson@bitwise.io>
  • Loading branch information
vaporos committed Feb 6, 2019
1 parent 37243b8 commit 26130fd
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ node ('master') {

stage("Archive Build artifacts") {
sh 'mkdir -p build/debs'
sh 'docker run -v $(pwd)/build/debs:/build supply-tp-installed:$ISOLATION_ID bash -c "cp /tmp/supply-chain-tp*.deb /build"'
sh 'docker run -v $(pwd)/build/debs:/build grid-track-and-trace-tp-installed:$ISOLATION_ID bash -c "cp /tmp/grid-track-and-trace-tp*.deb /build"'
archiveArtifacts artifacts: '*.tgz, *.zip'
archiveArtifacts artifacts: 'build/debs/*.deb'
archiveArtifacts artifacts: 'docs/build/html/**, docs/build/latex/*.pdf'
Expand Down
8 changes: 4 additions & 4 deletions contracts/track_and_trace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
# limitations under the License.

[package]
name = "supply-chain-tp"
version = "0.10.1"
name = "grid-track-and-trace-tp"
version = "0.11.0"
authors = ["Cargill Incorporated"]
description = "Sawtooth Supply Chain Transaction Processor"
homepage = "https://github.com/hyperledger/sawtooth-supply-chain"
description = "Grid Track and Trace Transaction Processor"
homepage = "https://grid.hyperledger.org"

[dependencies]
sawtooth-sdk = "^0.1"
Expand Down
12 changes: 6 additions & 6 deletions contracts/track_and_trace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ RUN apt-get update && apt-get install -y protobuf-compiler

# Build TP with dummy source in order to cache dependencies in Docker image.
# Make sure not to use the `volumes` command to overwrite:
# - /sawtooth-supply-chain/contracts/track_and_trace/target/
# - /sawtooth-supply-chain/contracts/track_and_trace/src/messages/
WORKDIR /sawtooth-supply-chain
# - /grid/contracts/track_and_trace/target/
# - /grid/contracts/track_and_trace/src/messages/
WORKDIR /grid
RUN USER=root cargo new --bin contracts/track_and_trace

WORKDIR /sawtooth-supply-chain/contracts/track_and_trace
WORKDIR /grid/contracts/track_and_trace
COPY Cargo.toml Cargo.lock* ./
RUN cargo build

ENV PATH=$PATH:/sawtooth-supply-chain/contracts/track_and_trace/target/debug/
ENV PATH=$PATH:/grid/contracts/track_and_trace/target/debug/

ENTRYPOINT ["/sawtooth-supply-chain/contracts/track_and_trace/target/debug/supply-chain-tp"]
ENTRYPOINT ["/grid/contracts/track_and_trace/target/debug/grid-track-and-trace-tp"]
14 changes: 6 additions & 8 deletions contracts/track_and_trace/Dockerfile-installed-bionic
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# docker build -f contracts/track_and_trace/Dockerfile-installed -t supply-chain-tp .

# -------------=== supply-chain tp build ===-------------
FROM ubuntu:bionic as supply-chain-tp-builder
# -------------=== grid-track-and-trace-tp-builder ===-------------
FROM ubuntu:bionic as grid-track-and-trace-tp-builder

ENV VERSION=AUTO_STRICT

Expand Down Expand Up @@ -43,13 +41,13 @@ WORKDIR /project/contracts/track_and_trace

RUN /root/.cargo/bin/cargo deb

# -------------=== supply-chain-tp docker build ===-------------
# -------------=== grid-track-and-trace-tp docker build ===-------------
FROM ubuntu:bionic

COPY --from=supply-chain-tp-builder /project/contracts/track_and_trace/target/debian/supply-chain-tp*.deb /tmp
COPY --from=grid-track-and-trace-tp-builder /project/contracts/track_and_trace/target/debian/grid-track-and-trace-tp*.deb /tmp

RUN apt-get update \
&& dpkg -i /tmp/supply-chain-tp*.deb || true \
&& dpkg -i /tmp/grid-track-and-trace-tp*.deb || true \
&& apt-get -f -y install

CMD ["supply-chain-tp", "-vv"]
CMD ["grid-track-and-trace-tp", "-vv"]
14 changes: 6 additions & 8 deletions contracts/track_and_trace/Dockerfile-installed-xenial
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# docker build -f contracts/track_and_trace/Dockerfile-installed -t supply-chain-tp .

# -------------=== supply-chain tp build ===-------------
FROM ubuntu:xenial as supply-chain-tp-builder
# -------------=== grid-track-and-trace-tp-builder ===-------------
FROM ubuntu:xenial as grid-track-and-trace-tp-builder

ENV VERSION=AUTO_STRICT

Expand Down Expand Up @@ -43,13 +41,13 @@ WORKDIR /project/contracts/track_and_trace

RUN /root/.cargo/bin/cargo deb

# -------------=== supply-chain-tp docker build ===-------------
# -------------=== grid-track-and-trace-tp docker build ===-------------
FROM ubuntu:xenial

COPY --from=supply-chain-tp-builder /project/contracts/track_and_trace/target/debian/supply-chain-tp*.deb /tmp
COPY --from=grid-track-and-trace-tp-builder /project/contracts/track_and_trace/target/debian/grid-track-and-trace-tp*.deb /tmp

RUN apt-get update \
&& dpkg -i /tmp/supply-chain-tp*.deb || true \
&& dpkg -i /tmp/grid-track-and-trace-tp*.deb || true \
&& apt-get -f -y install

CMD ["supply-chain-tp", "-vv"]
CMD ["grid-track-and-trace-tp", "-vv"]
6 changes: 3 additions & 3 deletions docker-compose-installed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ services:
- no_proxy
depends_on:
- validator
entrypoint: supply-chain-tp -C tcp://validator:4004
entrypoint: grid-track-and-trace-tp -C tcp://validator:4004

validator:
image: hyperledger/sawtooth-validator:1.0
container_name: supply-validator
container_name: grid-sawtooth-validator
expose:
- 4004
# start the validator with an empty genesis batch
Expand All @@ -53,7 +53,7 @@ services:
settings-tp:
image: hyperledger/sawtooth-settings-tp:1.0
container_name: supply-settings-tp
container_name: grid-sawtooth-settings-tp
depends_on:
- validator
entrypoint: settings-tp -v -C tcp://validator:4004
14 changes: 7 additions & 7 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ services:
- 'https_proxy=${https_proxy}'
- 'no_proxy=rest-api,eth0,validator,${no_proxy}'
volumes:
- .:/sawtooth-supply-chain
- /sawtooth-supply-chain/contracts/track_and_trace/target
- /sawtooth-supply-chain/contracts/track_and_trace/src/messages
- .:/grid
- /grid/contracts/track_and_trace/target
- /grid/contracts/track_and_trace/src/messages
entrypoint: |
bash -c "
cargo build &&
supply-chain-tp -v -C tcp://validator:4004
grid-track-and-trace-tp -v -C tcp://validator:4004
"
validator:
image: hyperledger/sawtooth-validator:1.0
container_name: supply-validator
container_name: grid-sawtooth-validator
expose:
- 4004
ports:
Expand All @@ -64,14 +64,14 @@ services:
settings-tp:
image: hyperledger/sawtooth-settings-tp:1.0
container_name: supply-settings-tp
container_name: grid-sawtooth-settings-tp
depends_on:
- validator
entrypoint: settings-tp -vv -C tcp://validator:4004

rest-api:
image: hyperledger/sawtooth-rest-api:1.0
container_name: supply-rest-api
container_name: grid-sawtooth-rest-api
expose:
- 8008
ports:
Expand Down

0 comments on commit 26130fd

Please sign in to comment.