Skip to content

Commit

Permalink
Implement mule packaging pipeline (algorand#1629)
Browse files Browse the repository at this point in the history
  • Loading branch information
bricerisingalgorand authored Oct 26, 2020
1 parent 6c68532 commit 9408501
Show file tree
Hide file tree
Showing 12 changed files with 267 additions and 522 deletions.
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ S3_RELEASE_BUCKET = $$S3_RELEASE_BUCKET

# If build number already set, use it - to ensure same build number across multiple platforms being built
BUILDNUMBER ?= $(shell ./scripts/compute_build_number.sh)
FULLBUILDNUMBER ?= $(shell ./scripts/compute_build_number.sh -f)
COMMITHASH := $(shell ./scripts/compute_build_commit.sh)
BUILDBRANCH := $(shell ./scripts/compute_branch.sh)
CHANNEL ?= $(shell ./scripts/compute_branch_channel.sh $(BUILDBRANCH))
Expand Down Expand Up @@ -300,10 +301,6 @@ install: build
###### TARGETS FOR CICD PROCESS ######
include ./scripts/release/mule/Makefile.mule

SUPPORTED_ARCHIVE_OS_ARCH = linux/amd64 linux/arm64 linux/arm darwin/amd64

archive:
CHANNEL=$(CHANNEL) \
PATH=$(SRCPATH)/tmp/node_pkgs/$(OS_TYPE)/$(ARCH)/bin:$${PATH} \
scripts/upload_version.sh $(CHANNEL) $(SRCPATH)/tmp/node_pkgs $(S3_RELEASE_BUCKET)

aws s3 cp tmp/node_pkgs s3://algorand-internal/channel/${CHANNEL}/$(FULLBUILDNUMBER) --recursive --exclude "*" --include "*${CHANNEL}*$(FULLBUILDNUMBER)*"
7 changes: 1 addition & 6 deletions docker/build/cicd.centos.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ ENV GOROOT=/usr/local/go \
RUN mkdir -p $GOPATH/src/github.com/algorand
COPY . $GOPATH/src/github.com/algorand/go-algorand
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH \
BRANCH=${BRANCH} \
CHANNEL=${CHANNEL} \
DEFAULTNETWORK=${DEFAULTNETWORK} \
FULLVERSION=${FULLVERSION} \
GOPROXY=https://gocenter.io \
PKG_ROOT=${PKG_ROOT}
GOPROXY=https://gocenter.io
WORKDIR $GOPATH/src/github.com/algorand/go-algorand
RUN make ci-deps && make clean
RUN rm -rf $GOPATH/src/github.com/algorand/go-algorand && \
Expand Down
7 changes: 1 addition & 6 deletions docker/build/cicd.ubuntu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ ENV GOROOT=/usr/local/go \
RUN mkdir -p $GOPATH/src/github.com/algorand
COPY . $GOPATH/src/github.com/algorand/go-algorand
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH \
BRANCH=${BRANCH} \
CHANNEL=${CHANNEL} \
DEFAULTNETWORK=${DEFAULTNETWORK} \
FULLVERSION=${FULLVERSION} \
GOPROXY=https://gocenter.io \
PKG_ROOT=${PKG_ROOT}
GOPROXY=https://gocenter.io
WORKDIR $GOPATH/src/github.com/algorand/go-algorand
RUN make ci-deps && make clean
RUN rm -rf $GOPATH/src/github.com/algorand/go-algorand && \
Expand Down
2 changes: 1 addition & 1 deletion installer/rpm/algorand/algorand.spec
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ if [ "%{RELEASE_GENESIS_PROCESS}" != "x" ]; then
done
cp %{buildroot}/var/lib/algorand/genesis/${DEFAULT_RELEASE_NETWORK}/genesis.json %{buildroot}/var/lib/algorand/genesis.json
else
cp ${REPO_DIR}/installer/genesis/${DEFAULTNETWORK}/genesis.json %{buildroot}/var/lib/algorand/genesis.json
cp ${REPO_DIR}/installer/genesis/${DEFAULT_RELEASE_NETWORK}/genesis.json %{buildroot}/var/lib/algorand/genesis.json
#${GOPATH}/bin/buildtools genesis ensure -n ${DEFAULT_RELEASE_NETWORK} --source ${REPO_DIR}/gen/${DEFAULT_RELEASE_NETWORK}/genesis.json --target %{buildroot}/var/lib/algorand/genesis.json --releasedir ${REPO_DIR}/installer/genesis
fi

Expand Down
220 changes: 0 additions & 220 deletions mule.yaml

This file was deleted.

9 changes: 8 additions & 1 deletion package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ agents:
workDir: $HOME/projects/go-algorand

tasks:
- task: docker.Make
name: build
agent: deb
target: ci-build

- task: docker.Make
name: rpm
agent: rpm
Expand All @@ -44,19 +49,21 @@ tasks:
jobs:
package:
tasks:
- docker.Make.build
- docker.Make.deb
- docker.Make.rpm
- docker.Make.docker

package-deb:
tasks:
- docker.Make.build
- docker.Make.deb

package-rpm:
tasks:
- docker.Make.build
- docker.Make.rpm

package-docker:
tasks:
- docker.Make.docker

2 changes: 1 addition & 1 deletion scripts/release/build/rpm/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export REPO_DIR
DEFAULT_RELEASE_NETWORK=$("$REPO_DIR/scripts/compute_branch_release_network.sh" "$DEFAULTNETWORK")
export DEFAULT_RELEASE_NETWORK
DEFAULTNETWORK=devnet
export DEFAULT_NETWORK
export DEFAULTNETWORK
ALGO_BIN="$HOME/subhome/go/bin"
export ALGO_BIN

Expand Down
1 change: 0 additions & 1 deletion scripts/release/mule/Makefile.mule
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ mule = $(shell ls -d scripts/release/mule/*/ | awk 'BEGIN { FS="/" ; OFS="-" } {
mule-deploy-rpm:
scripts/release/mule/deploy/rpm/deploy.sh

mule-package-deb: ci-build
mule-package-%: PKG_TYPE=$*
mule-package-%:
echo Building algorand package...
Expand Down
Loading

0 comments on commit 9408501

Please sign in to comment.