Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions .github/workflows/docker_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ jobs:
with:
fetch-depth: 0

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: Set up qemu emulators
run: |
docker run --rm --privileged tonistiigi/binfmt --install all

- name: Docker login
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin

- name: Set build tag
id: build_tag_generator
run: |
Expand All @@ -28,18 +40,7 @@ jobs:
--label commit=$GITHUB_SHA \
--label build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label tag=${{ steps.build_tag_generator.outputs.BUILD_TAG }} \
--tag ghcr.io/hyperledger/firefly:${{ steps.build_tag_generator.outputs.BUILD_TAG }}" \
docker

- name: Tag release
run: docker tag ghcr.io/hyperledger/firefly:${{ steps.build_tag_generator.outputs.BUILD_TAG }} ghcr.io/hyperledger/firefly:head

- name: Push docker image
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly:${{ steps.build_tag_generator.outputs.BUILD_TAG }}

- name: Push head tag
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly:head
--tag ghcr.io/hyperledger/firefly:${{ steps.build_tag_generator.outputs.BUILD_TAG }} \
--tag ghcr.io/hyperledger/firefly:head \
--push" \
docker-multiarch
79 changes: 28 additions & 51 deletions .github/workflows/docker_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,67 +12,44 @@ jobs:
with:
fetch-depth: 0

- name: Build
run: |
make DOCKER_ARGS="\
--build-arg BUILD_VERSION=${GITHUB_REF##*/} \
--build-arg GIT_REF=$GITHUB_SHA \
--label commit=$GITHUB_SHA \
--label build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label tag=${GITHUB_REF##*/} \
--tag ghcr.io/hyperledger/firefly:${GITHUB_REF##*/} \
--tag ghcr.io/hyperledger/firefly:head" \
docker

- name: Push docker image
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly:${GITHUB_REF##*/}

- name: Push head tag
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly:head

- name: Tag latest release
if: github.event.action == 'released'
run: docker tag ghcr.io/hyperledger/firefly:${GITHUB_REF##*/} ghcr.io/hyperledger/firefly:latest

- name: Push latest tag
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: Set up qemu emulators
run: |
docker run --rm --privileged tonistiigi/binfmt --install all

- name: Set latest tag
if: github.event.action == 'released'
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly:latest
echo "DOCKER_TAGS=${{ env.DOCKER_TAGS }} --tag ghcr.io/hyperledger/firefly:latest" >> $GITHUB_ENV

- name: Tag alpha release
- name: Set alpha tag
if: github.event.action == 'prereleased' && contains(github.ref, 'alpha')
run: |
docker tag ghcr.io/hyperledger/firefly:${GITHUB_REF##*/} ghcr.io/hyperledger/firefly:alpha
echo "DOCKER_TAGS=${{ env.DOCKER_TAGS }} --tag ghcr.io/hyperledger/firefly:alpha" >> $GITHUB_ENV

- name: Push alpha tag
if: github.event.action == 'prereleased' && contains(github.ref, 'alpha')
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly:alpha

- name: Tag beta release
if: github.event.action == 'prereleased' && contains(github.ref, 'beta')
run: |
docker tag ghcr.io/hyperledger/firefly:${GITHUB_REF##*/} ghcr.io/hyperledger/firefly:beta

- name: Push beta tag
- name: Set beta tag
if: github.event.action == 'prereleased' && contains(github.ref, 'beta')
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly:beta
echo "DOCKER_TAGS=${{ env.DOCKER_TAGS }} --tag ghcr.io/hyperledger/firefly:beta" >> $GITHUB_ENV

- name: Tag rc release
- name: Set rc tag
if: github.event.action == 'prereleased' && contains(github.ref, 'rc')
run: |
docker tag ghcr.io/hyperledger/firefly:${GITHUB_REF##*/} ghcr.io/hyperledger/firefly:rc
echo "DOCKER_TAGS=${{ env.DOCKER_TAGS }} --tag ghcr.io/hyperledger/firefly:rc" >> $GITHUB_ENV

- name: Push rc tag
if: github.event.action == 'prereleased' && contains(github.ref, 'rc')
- name: Build
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly:rc
make DOCKER_ARGS="\
--build-arg BUILD_VERSION=${GITHUB_REF##*/} \
--build-arg GIT_REF=$GITHUB_SHA \
--label commit=$GITHUB_SHA \
--label build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label tag=${GITHUB_REF##*/} \
--tag ghcr.io/hyperledger/firefly:${GITHUB_REF##*/} \
--tag ghcr.io/hyperledger/firefly:head \
${{ env.DOCKER_TAGS }}" \
--push
docker-multiarch
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,7 @@ manifest:
./manifestgen.sh
docker:
./docker_build.sh $(DOCKER_ARGS)
docker-multiarch:
./docker_build.sh --platform linux/amd64,linux/arm64 $(DOCKER_ARGS)
docs: .ALWAYS
cd docs && bundle install && bundle exec jekyll build && bundle exec htmlproofer --disable-external --allow-hash-href --assume-extension ./_site --url-swap '^/firefly/:/' --url-ignore /127.0.0.1/,/localhost/
6 changes: 4 additions & 2 deletions docker_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ echo BASE_TAG=$BASE_TAG
echo UI_TAG=$UI_TAG
echo UI_RELEASE=$UI_RELEASE

docker build \
docker buildx create --name firefly --use
docker buildx build \
-t hyperledger/firefly \
--build-arg FIREFLY_BUILDER_TAG=$FIREFLY_BUILDER_TAG \
--build-arg FABRIC_BUILDER_TAG=$FABRIC_BUILDER_TAG \
Expand All @@ -46,4 +47,5 @@ docker build \
--build-arg UI_TAG=$UI_TAG \
--build-arg UI_RELEASE=$UI_RELEASE \
$@ \
.
.
docker buildx rm firefly
2 changes: 1 addition & 1 deletion test/e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ if [ "$CREATE_STACK" == "true" ]; then
fi

if [ "$BUILD_FIREFLY" == "true" ]; then
make -C ../.. docker
make -C ../.. DOCKER_ARGS="--load" docker
checkOk $?
fi

Expand Down