Skip to content

Commit cb6837b

Browse files
committed
2.x: Fixed version used in github workflows. Updated templates to use the version
1 parent 07ab6f8 commit cb6837b

13 files changed

+91
-25
lines changed

.github/workflows/devel-ubuntu-linux.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,15 @@ jobs:
3737
sudo mv ./mkcert /usr/local/bin && cd ../
3838
sudo chmod +x /usr/local/bin/mkcert
3939
rm -Rf mkcert
40+
mkdir -p ~/.config/ce-dev
41+
touch ~/.config/ce-dev/preferences-2.x.yml
42+
echo 'docker_bin: docker' > ~/.config/ce-dev/preferences-2.x.yml
43+
echo 'docker_compose_bin: docker compose' >> ~/.config/ce-dev/preferences-2.x.yml
44+
echo 'mkcert_bin: mkcert' >> ~/.config/ce-dev/preferences-2.x.yml
4045
- name: Build ce-dev and ce-dev-controller
4146
run: |
42-
/bin/sh docker-images/export.sh --version devel --image-name ce-dev --dockerfile-path base-devel
43-
/bin/sh docker-images/export.sh --version devel --image-name ce-dev-controller --dockerfile-path controller-devel
47+
/bin/sh docker-images/export.sh --version 2.x-devel --image-name ce-dev --dockerfile-path base-devel
48+
/bin/sh docker-images/export.sh --version 2.x-devel --image-name ce-dev-controller --dockerfile-path controller-devel
4449
- name: Testing templates
4550
run: |
4651
sudo chmod +x bin/dev.js

.github/workflows/ubuntu-linux.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: '2.x: Linux - Build ce_dev binaries, images and templates'
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
branches:
8+
- 2.x
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
ref: '2.x'
17+
- name: Install modules
18+
run: yarn install --production=false --global
19+
- name: Pack the JS
20+
run: yarn oclif pack tarballs --targets=linux-x64,linux-arm,linux-arm64 --no-xz
21+
- name: Rename the dist/* files
22+
run: yarn renamedist
23+
# We build mkcert from source because releases are broken
24+
- name: Install test dependencies
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y p7zip-full libnss3-tools wget
28+
cd /tmp
29+
wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz
30+
sudo tar -C /usr/local -xzf go1.22.1.linux-amd64.tar.gz
31+
export PATH=$PATH:/usr/local/go/bin
32+
git clone https://github.com/FiloSottile/mkcert && cd mkcert
33+
go build -ldflags "-X main.Version=$(git describe --tags)"
34+
sudo mv ./mkcert /usr/local/bin && cd ../
35+
sudo chmod +x /usr/local/bin/mkcert
36+
rm -Rf mkcert
37+
touch ~/.config/ce-dev/preferences-2.x.yml
38+
echo 'docker_bin: docker' > ~/.config/ce-dev/preferences-2.x.yml
39+
echo 'docker_compose_bin: docker compose' >> ~/.config/ce-dev/preferences-2.x.yml
40+
echo 'mkcert_bin: mkcert' >> ~/.config/ce-dev/preferences-2.x.yml
41+
- name: Build and push Docker images
42+
run: |
43+
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
44+
/bin/sh docker-images/export.sh --version 2.x --image-name ce-dev --dockerfile-path base --push
45+
/bin/sh docker-images/export.sh --version 2.x --image-name ce-dev-controller --dockerfile-path controller --push
46+
- name: Test templates and push Drupal images to Docker
47+
run: |
48+
sudo chmod +x bin/run.js
49+
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
50+
/bin/sh templates/prebuild.sh --template ce-dev.compose.yml --push
51+
- name: Publish new ce-dev binaries
52+
uses: softprops/action-gh-release@v1
53+
with:
54+
files: dist/**/**
55+
body_path: RELEASE
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

RELEASE

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
11
2.0
2-
Upgrade ce-dev to typescript 5
2+
3+
## Changes since 1.24
4+
5+
* Docker images using Bookworm-slim
6+
* Use of latest Typescript version (5.3.x)
7+
* Binaries built with Emacs instead of Commonjs: Emacs can consume Commonjs modules,
8+
but Commonjs can't consume Emacs modules. It means we can use more contrib modules
9+
* src folder has been organised a bit better.
10+
* Removed drupal 8 and drupal 9 templates.
11+
* The way to assign IPs have changed.
12+
* All the packages used are up to date.

docker-images/export.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ usage(){
88
echo 'Export a base Code Enigma image, optionally pushing it to your Docker repository.'
99
echo ''
1010
echo 'Mandatory arguments:'
11-
echo '--version: Version tag to apply to the Docker image, e.g. "latest".'
11+
echo '--version: Version tag to apply to the Docker image, e.g. "2.x, 2.x-devel, latest".'
1212
echo '--image-name: Name of the resulting Docker image, e.g. "ce-dev".'
1313
echo ''
1414
echo 'Available options:'
1515
echo '--push: Push the built image to the Docker repository.'
16-
echo '--base-image: Name of the base image to use, IMPORTANT: must match your Dockerfile - defaults to "debian:bullseye-slim".'
16+
echo '--base-image: Name of the base image to use, IMPORTANT: must match your Dockerfile - defaults to "debian:bookworm-slim".'
1717
echo '--dockerfile-path: Pass the path within docker-images to your Dockerfile and other build assets - defaults to "base".'
1818
echo '--docker-repo: Pass the Docker repository name - defaults to "codeenigma".'
19-
echo '--ce-dev-version: The version to append to the image name - defaults to "2.x".'
2019
}
2120

2221
# Parse options arguments.
@@ -43,10 +42,6 @@ parse_options(){
4342
shift
4443
BASE_IMAGE="$1"
4544
;;
46-
"--ce-dev-version")
47-
shift
48-
CE_DEV_VERSION="$1"
49-
;;
5045
"--push")
5146
PUSH="yes"
5247
;;
@@ -64,7 +59,6 @@ DOCKERFILE_PATH="base"
6459
PUSH="no"
6560
BASE_IMAGE="debian:bookworm-slim"
6661
DOCKER_REPO="codeenigma"
67-
CE_DEV_VERSION="2.x"
6862
VERSION=""
6963
IMAGE_NAME=""
7064

@@ -89,8 +83,8 @@ docker image pull "$BASE_IMAGE"
8983

9084
# Build image.
9185
echo "Building $DOCKERFILE_PATH image."
92-
docker image build --compress "--label=$IMAGE_NAME-$CE_DEV_VERSION:$VERSION" --no-cache=true -t "$DOCKER_REPO/$IMAGE_NAME-$CE_DEV_VERSION:$VERSION" "$OWN_DIR/$DOCKERFILE_PATH" || exit 1
86+
docker image build --compress "--label=$IMAGE_NAME:$VERSION" --no-cache=true -t "$DOCKER_REPO/$IMAGE_NAME:$VERSION" "$OWN_DIR/$DOCKERFILE_PATH" || exit 1
9387
if [ $PUSH = "yes" ]; then
94-
echo "Publishing the image with docker image push $DOCKER_REPO/$IMAGE_NAME-$CE_DEV_VERSION:$VERSION"
95-
docker image push "$DOCKER_REPO/$IMAGE_NAME-$CE_DEV_VERSION:$VERSION"
88+
echo "Publishing the image with docker image push $DOCKER_REPO/$IMAGE_NAME:$VERSION"
89+
docker image push "$DOCKER_REPO/$IMAGE_NAME:$VERSION"
9690
fi

templates/blank/ce-dev/ce-dev-devel.compose.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ x-ce_dev:
1010
version: 2.x
1111
services:
1212
{{ project_name }}:
13-
image: codeenigma/ce-dev-2.x:devel
13+
image: codeenigma/ce-dev:2.x-devel
1414
platform: linux/amd64
1515
cgroup: host
1616
cap_add:

templates/blank/ce-dev/ce-dev.compose.prebuilt.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ x-ce_dev:
1010
version: 2.x
1111
services:
1212
{{ project_name }}:
13-
image: 'codeenigma/blank-blank:latest'
13+
image: 'codeenigma/blank-blank:2.x'
1414
platform: linux/amd64
1515
cgroup: host
1616
cap_add:

templates/blank/ce-dev/ce-dev.compose.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ x-ce_dev:
1010
version: 2.x
1111
services:
1212
{{ project_name }}:
13-
image: codeenigma/ce-dev-2.x:latest
13+
image: codeenigma/ce-dev:2.x
1414
platform: linux/amd64
1515
cgroup: host
1616
cap_add:

templates/drupal10/ce-dev/ce-dev-devel.compose.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ x-ce_dev:
1111
- https://www.{{ project_name }}.local
1212
services:
1313
web:
14-
image: codeenigma/ce-dev-2.x:devel
14+
image: codeenigma/ce-dev:2.x-devel
1515
platform: linux/amd64
1616
cgroup: host
1717
expose:

templates/drupal10/ce-dev/ce-dev.compose.prebuilt.yml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ x-ce_dev:
1111
- 'https://www.{{ project_name }}.local'
1212
services:
1313
web:
14-
image: 'codeenigma/drupal10-web:latest'
14+
image: 'codeenigma/drupal10-web:2.x'
1515
platform: linux/amd64
1616
cgroup: host
1717
expose:
@@ -36,7 +36,7 @@ services:
3636
cap_add:
3737
- NET_ADMIN
3838
db:
39-
image: 'codeenigma/drupal10-db:latest'
39+
image: 'codeenigma/drupal10-db:2.x'
4040
platform: linux/amd64
4141
environment:
4242
MYSQL_ROOT_PASSWORD: ce-dev

templates/drupal10/ce-dev/ce-dev.compose.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ x-ce_dev:
1111
- https://www.{{ project_name }}.local
1212
services:
1313
web:
14-
image: codeenigma/ce-dev-2.x:latest
14+
image: codeenigma/ce-dev:2.x
1515
platform: linux/amd64
1616
cgroup: host
1717
expose:

templates/localgov/ce-dev/ce-dev-devel.compose.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ x-ce_dev:
1111
- https://www.{{ project_name }}.local
1212
services:
1313
web:
14-
image: codeenigma/ce-dev-2.x:devel
14+
image: codeenigma/ce-dev:2.x-devel
1515
platform: linux/amd64
1616
cgroup: host
1717
expose:

templates/localgov/ce-dev/ce-dev.compose.prebuilt.yml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ x-ce_dev:
1111
- 'https://www.{{ project_name }}.local'
1212
services:
1313
web:
14-
image: 'codeenigma/drupal9-web:latest'
14+
image: 'codeenigma/drupal10-web:2.x'
1515
platform: linux/amd64
1616
cgroup: host
1717
expose:
@@ -36,7 +36,7 @@ services:
3636
cap_add:
3737
- NET_ADMIN
3838
db:
39-
image: 'codeenigma/drupal9-db:latest'
39+
image: 'codeenigma/drupal10-db:2.x'
4040
platform: linux/amd64
4141
environment:
4242
MYSQL_ROOT_PASSWORD: ce-dev

templates/localgov/ce-dev/ce-dev.compose.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ x-ce_dev:
1111
- https://www.{{ project_name }}.local
1212
services:
1313
web:
14-
image: codeenigma/ce-dev-2.x:latest
14+
image: codeenigma/ce-dev:2.x
1515
platform: linux/amd64
1616
cgroup: host
1717
expose:

0 commit comments

Comments
 (0)