Skip to content

Commit b970325

Browse files
authored
Drupal 11 template, remove yarn and changed references to devel-2.x (#202)
* 2.x: Using the right conditions to build binaries * 2.x: Update RELEASE file * 2.x: Fixed how the tags are identified to run a new build * 2.x: Fixed tarballs, mising lib folder * 2.x: Fixed some bits about localgov * 2.x: Getting the latest release available per branch * Updated install.sh scrip to get the latest version per branch. Fixed some localgov templates (#189) * 2.x: Fixed some bits about localgov * 2.x: Getting the latest release available per branch * 2.x: Added drupal11 template. Removed .travis file * 2.x: Added Drupal 11 template * 2.x: Updated references with 2.x-devel to devel-2.x * 2.x: Removed reference to the branch * 2.x: Enabled corepack to use latest version of yarn * 2.x: Fixed yarn command * 2.x: Using yarn dlx instead of yarn install --global * 2.x: Using again install instead of dlx * 2.x: Removed all references to yarn to make it simple * 2.x: Added missing flag production=false * 2.x: Removed --global because it does not work with --production=false
1 parent 79f5ead commit b970325

27 files changed

+3475
-1947
lines changed

.github/workflows/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ docker pull codeenigma/ce-dev-controller:2.x
1919
Then edit your project's `ce-dev.compose.yml` file, changing the image for each applicable service to use the `-devel` tag instead of the current tag, for example:
2020

2121
```yaml
22-
image: codeenigma/ce-dev:2.x -> image: codeenigma/ce-dev:2.x-devel
22+
image: codeenigma/ce-dev:2.x -> image: codeenigma/ce-dev:devel-2.x
2323
```
2424
2525
Finally, destroy and recreate your `docker compose` file and containers:
@@ -36,9 +36,9 @@ ce-dev deploy
3636
To test the `devel` version of the `ce-dev-controller` image locally you can do the following:
3737

3838
```bash
39-
docker pull codeenigma/ce-dev-controller:2.x-devel
39+
docker pull codeenigma/ce-dev-controller:devel-2.x
4040
# Replace the 'latest' tag with your 'devel' image
41-
docker tag codeenigma/ce-dev-controller:2.x-devel codeenigma/ce-dev-controller:2.x
41+
docker tag codeenigma/ce-dev-controller:devel-2.x codeenigma/ce-dev-controller:2.x
4242
docker kill ce_dev_controller
4343
# Then in any ce-dev project
4444
ce-dev start
+16-11
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
1-
name: '2.x-devel: Ubuntu - Build and push ce-dev and ce-dev-controller images'
1+
name: 'devel-2.x: Ubuntu - Build and push ce-dev and ce-dev-controller images'
22

33
on:
44
push:
55
branches:
6-
- 2.x-devel
6+
- devel-2.x
77

88
jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
1313
with:
14-
ref: '2.x-devel'
14+
ref: 'devel-2.x'
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 'latest'
1518
- name: Install modules
16-
run: yarn install --production=false --global
17-
- name: Pack the JS
18-
run: yarn oclif pack tarballs --targets=linux-x64,linux-arm,linux-arm64,darwin-x64,darwin-arm64 --no-xz
19-
- name: Rename the dist/* files
20-
run: yarn renamedist
19+
run: npm install --production=false
20+
- name: Generate distributions with oclif
21+
run: |
22+
npm run prepack-oclif
23+
npx oclif pack tarballs --targets=linux-x64,linux-arm,linux-arm64,darwin-x64,darwin-arm64 --no-xz
24+
npm run postpack-oclif
25+
npm run renamedist
2126
- name: Install test dependencies
2227
run: |
2328
sudo apt-get update
@@ -36,8 +41,8 @@ jobs:
3641
echo 'docker_bin: docker' > ~/.config/ce-dev/preferences-2.x.yml
3742
echo 'docker_compose_bin: docker compose' >> ~/.config/ce-dev/preferences-2.x.yml
3843
echo 'mkcert_bin: mkcert' >> ~/.config/ce-dev/preferences-2.x.yml
39-
- name: Build ce-dev and ce-dev-controller
44+
- name: Build and push ce-dev and ce-dev-controller
4045
run: |
4146
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
42-
/bin/sh docker-images/export.sh --version 2.x-devel --image-name ce-dev --dockerfile-path base-devel --push
43-
/bin/sh docker-images/export.sh --version 2.x-devel --image-name ce-dev-controller --dockerfile-path controller-devel --push
47+
/bin/sh docker-images/export.sh --version devel-2.x --image-name ce-dev --dockerfile-path base-devel --push
48+
/bin/sh docker-images/export.sh --version devel-2.x --image-name ce-dev-controller --dockerfile-path controller-devel --push

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

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
1-
name: '2.x-devel: Ubuntu - Test image builds on PR'
1+
name: 'devel-2.x: Ubuntu - Test image builds on PR'
22

33
on:
44
pull_request:
55
types:
66
- opened
77
branches:
8-
- 2.x-devel
8+
- devel-2.x
99

1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
1516
with:
16-
ref: '2.x-devel'
17+
node-version: 'latest'
1718
- 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,darwin-x64,darwin-arm64 --no-xz
21-
- name: Rename the dist/* files
22-
run: yarn renamedist
19+
run: npm install --production=false
20+
- name: Generate distributions with oclif
21+
run: |
22+
npm run prepack-oclif
23+
npx oclif pack tarballs --targets=linux-x64,linux-arm,linux-arm64,darwin-x64,darwin-arm64 --no-xz
24+
npm run postpack-oclif
25+
npm run renamedist
2326
# We build mkcert from source because releases are broken
2427
- name: Install test dependencies
2528
run: |
@@ -41,9 +44,9 @@ jobs:
4144
echo 'mkcert_bin: mkcert' >> ~/.config/ce-dev/preferences-2.x.yml
4245
- name: Build ce-dev and ce-dev-controller
4346
run: |
44-
/bin/sh docker-images/export.sh --version 2.x-devel --image-name ce-dev --dockerfile-path base-devel
45-
/bin/sh docker-images/export.sh --version 2.x-devel --image-name ce-dev-controller --dockerfile-path controller-devel
47+
/bin/sh docker-images/export.sh --version devel-2.x --image-name ce-dev --dockerfile-path base-devel
48+
/bin/sh docker-images/export.sh --version devel-2.x --image-name ce-dev-controller --dockerfile-path controller-devel
4649
- name: Testing templates
4750
run: |
4851
sudo chmod +x bin/dev.js
49-
/bin/sh templates/prebuild.sh --template ce-dev-devel.compose.yml --devel
52+
/bin/sh templates/test.sh --template ce-dev-devel.compose.yml --devel

.github/workflows/ubuntu-build.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ jobs:
1616
- uses: actions/checkout@v4
1717
with:
1818
ref: '2.x'
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: 'latest'
1922
- name: Install modules
20-
run: yarn install --production=false --global
21-
- name: Pack the JS
22-
run: yarn oclif pack tarballs --targets=linux-x64,linux-arm,linux-arm64,darwin-x64,darwin-arm64 --no-xz
23-
- name: Rename the dist/* files
24-
run: yarn renamedist
23+
run: npm install --production=false
24+
- name: Generate distributions with oclif
25+
run: |
26+
npm run prepack-oclif
27+
npx oclif pack tarballs --targets=linux-x64,linux-arm,linux-arm64,darwin-x64,darwin-arm64 --no-xz
28+
npm run postpack-oclif
29+
npm run renamedist
2530
- name: Install test dependencies
2631
run: |
2732
sudo apt-get update

.github/workflows/ubuntu-pr.yml

+10-7
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
1516
with:
16-
ref: '2.x'
17+
node-version: 'latest'
1718
- 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,darwin-x64,darwin-arm64 --no-xz
21-
- name: Rename the dist/* files
22-
run: yarn renamedist
19+
run: npm install --production=false
20+
- name: Generate distributions with oclif
21+
run: |
22+
npm run prepack-oclif
23+
npx oclif pack tarballs --targets=linux-x64,linux-arm,linux-arm64,darwin-x64,darwin-arm64 --no-xz
24+
npm run postpack-oclif
25+
npm run renamedist
2326
# We build mkcert from source because releases are broken
2427
- name: Install test dependencies
2528
run: |
@@ -46,4 +49,4 @@ jobs:
4649
- name: Testing templates
4750
run: |
4851
sudo chmod +x bin/run.js
49-
/bin/sh templates/prebuild.sh --template ce-dev.compose.yml
52+
/bin/sh templates/test.sh --template ce-dev.compose.yml

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ node_modules
88
oclif.manifest.json
99
tsconfig.tsbuildinfo
1010
.idea/
11+
.yarn/

.travis.yml

-97
This file was deleted.

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ce-dev 2.x
22
======
33
Local Stack wrapper tool
44

5-
[![2.x: Linux - Build ce_dev binaries, images and templates (test)](https://github.com/codeenigma/ce-dev/actions/workflows/ce-dev-devel-linux.yml/badge.svg?branch=2.x-devel)](https://github.com/codeenigma/ce-dev/actions/workflows/ce-dev-devel-linux.yml)
5+
[![2.x: Linux - Build ce_dev binaries, images and templates (test)](https://github.com/codeenigma/ce-dev/actions/workflows/ce-dev-devel-linux.yml/badge.svg?branch=devel-2.x)](https://github.com/codeenigma/ce-dev/actions/workflows/ce-dev-devel-linux.yml)
66
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=codeenigma_ce-dev&metric=security_rating)](https://sonarcloud.io/dashboard?id=codeenigma_ce-dev)
77
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=codeenigma_ce-dev&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=codeenigma_ce-dev)
88
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=codeenigma_ce-dev&metric=bugs)](https://sonarcloud.io/dashboard?id=codeenigma_ce-dev)
@@ -36,7 +36,7 @@ Local Stack wrapper tool
3636

3737
* Install Node.js in your local machine https://nodejs.org/en/download/package-manager
3838
* Clone this repo in your local machine.
39-
* Change the branch (2.x, 2.x-devel, etc...) to work on it.
39+
* Change the branch (2.x, devel-2.x, etc...) to work on it.
4040
* Run ```npm install```
4141

4242
With these steps you will have all the packages installed.
@@ -84,7 +84,7 @@ codeenigma/ce-dev 2.x 8753195771fc 3 days ago
8484
codeenigma/ce-dev-controller 2.x 5aed115a5e74 3 days ago 1.83GB
8585
```
8686

87-
if you are testing the devel version, the tag will be 2.x-devel.
87+
if you are testing the devel version, the tag will be devel-2.x.
8888

8989
If you don't have the local images, you can follow these steps:
9090

@@ -95,7 +95,7 @@ If you don't have the local images, you can follow these steps:
9595
```angular2html
9696
/bin/sh docker-images/export.sh --version 2.x --image-name ce-dev --dockerfile-path base
9797
/bin/sh docker-images/export.sh --version 2.x --image-name ce-dev-controller --dockerfile-path controller
98-
/bin/sh templates/prebuild.sh --template ce-dev.compose.yml
98+
/bin/sh templates/test.sh --template ce-dev.compose.yml
9999
```
100100

101101
The last step will generate the drupal10-web, drupal10-db and blank docker images. Also, it will create docker containers

RELEASE

+4-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
1-
2.0.0
1+
2.0.1
22

3-
## Changes since 1.2.4
3+
## Changes since 2.0.0
44

5-
* Docker images based on Bookworm-slim
6-
* Docker image MariaDB used as database.
7-
* Docker image codeenigma/ce-dev:2.x image used web image
8-
* No more use of different predefined drupalX-web images, we rely on 'ce-dev provision'.
9-
* Use of latest Typescript version (5.x.x)
10-
* Binaries built with Emacs instead of Commonjs: Emacs can consume Commonjs modules,
11-
but Commonjs can't consume Emacs modules. It means we can use more contrib modules
12-
* src folder has been organised a bit better.
13-
* Removed drupal 8 and drupal 9 templates.
14-
* The way to assign IPs have changed.
15-
* Improved command 'shell'
16-
* Added new command 'drush'
17-
* Removed references to win-x
18-
* All the packages used are up to date.
5+
* Added Drupal 11 template
6+
* Updated references to 2.x-devel with devel-2.x

docker-images/controller-devel/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM codeenigma/ce-dev:2.x-devel
1+
FROM codeenigma/ce-dev:devel-2.x
22

33
RUN \
44
set -x && \

docker-images/export.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ 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. "2.x, 2.x-devel, latest".'
11+
echo '--version: Version tag to apply to the Docker image, e.g. "2.x, devel-2.x, latest".'
1212
echo '--image-name: Name of the resulting Docker image, e.g. "ce-dev".'
1313
echo ''
1414
echo 'Available options:'

0 commit comments

Comments
 (0)