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
42 changes: 42 additions & 0 deletions .github/workflows/ce-dev-build-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build the devel ce-dev base and controller images

# Run this workflow only on a push/merged PR to branch devel
on:
push:
branches:
- devel

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn
# Uses https://oclif.io/
- name: Pack the JS
run: yarn oclif-dev pack
# We build mkcert from source because releases are broken
# The last step sets ce-dev config to NOT use sudo because this causes docker image push problems
- name: Install build and publish dependencies
run: |
sudo apt-get update
sudo apt-get install -y p7zip-full libnss3-tools wget
cd /tmp
wget https://golang.org/dl/go1.16.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.16.3.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
git clone https://github.com/FiloSottile/mkcert && cd mkcert
go build -ldflags "-X main.Version=$(git describe --tags)"
sudo mv ./mkcert /usr/local/bin && cd ../
sudo chmod +x /usr/local/bin/mkcert
rm -Rf mkcert
mkdir -p ~/.config/ce-dev
touch ~/.config/ce-dev/preferences-1.x.yml
echo 'docker_bin: docker' > ~/.config/ce-dev/preferences-1.x.yml
echo 'docker_compose_bin: docker compose' >> ~/.config/ce-dev/preferences-1.x.yml
echo 'mkcert_bin: mkcert' >> ~/.config/ce-dev/preferences-1.x.yml
- name: Build and push Docker images
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
/bin/sh docker-images/export.sh devel --push
6 changes: 3 additions & 3 deletions docker-images/export.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi
OWN_DIR=$( cd "$( dirname "$OWN" )" && pwd -P)

# Ensure we have a fresh image to start with.
docker image pull debian:bullseye
docker image pull debian:bullseye-slim

# Build base image.
echo "Building base image."
Expand All @@ -45,8 +45,8 @@ if [ "$2" = "--push" ]; then
docker image push "codeenigma/ce-dev-controller-1.x:$1"
fi

# Build dind image.
# echo "Building dind image"
# Build DinD (Docker in Docker) image.
# echo "Building DinD image"
# sudo docker image build --compress "--label=ce-dev-dind-1.x:$1" --no-cache=true -t "codeenigma/ce-dev-dind-1.x:$1" "$OWN_DIR/dind" || exit 1
# if [ "$2" = "--push" ]; then
# echo "Publishing the image with docker image push codeenigma/ce-dev-dind-1.x:$1"
Expand Down