Skip to content

Commit 99b8117

Browse files
committed
2.x: Updated filenames and pushing docker images
1 parent a4212f3 commit 99b8117

File tree

4 files changed

+99
-16
lines changed

4 files changed

+99
-16
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: '2.x-devel: Ubuntu - Build and push ce-dev and ce-dev-controller images'
2+
3+
on:
4+
push:
5+
branches:
6+
- 2.x-devel
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
ref: '2.x-devel'
15+
- 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
21+
- name: Install test dependencies
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y p7zip-full libnss3-tools wget
25+
cd /tmp
26+
wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz
27+
sudo tar -C /usr/local -xzf go1.22.1.linux-amd64.tar.gz
28+
export PATH=$PATH:/usr/local/go/bin
29+
git clone https://github.com/FiloSottile/mkcert && cd mkcert
30+
go build -ldflags "-X main.Version=$(git describe --tags)"
31+
sudo mv ./mkcert /usr/local/bin && cd ../
32+
sudo chmod +x /usr/local/bin/mkcert
33+
rm -Rf mkcert
34+
mkdir -p ~/.config/ce-dev
35+
touch ~/.config/ce-dev/preferences-2.x.yml
36+
echo 'docker_bin: docker' > ~/.config/ce-dev/preferences-2.x.yml
37+
echo 'docker_compose_bin: docker compose' >> ~/.config/ce-dev/preferences-2.x.yml
38+
echo 'mkcert_bin: mkcert' >> ~/.config/ce-dev/preferences-2.x.yml
39+
- name: Build ce-dev and ce-dev-controller
40+
run: |
41+
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

.github/workflows/devel-ubuntu-linux.yml renamed to .github/workflows/devel-ubuntu-pr.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
name: '2.x: Linux - Build ce_dev binaries, images and templates (test)'
1+
name: '2.x-devel: Ubuntu - Test image builds on PR'
22

33
on:
4-
push:
5-
branches:
6-
- 2.x-devel
74
pull_request:
85
types:
96
- opened
@@ -20,7 +17,7 @@ jobs:
2017
- name: Install modules
2118
run: yarn install --production=false --global
2219
- name: Pack the JS
23-
run: yarn oclif pack tarballs --targets=linux-x64,linux-arm,linux-arm64 --no-xz
20+
run: yarn oclif pack tarballs --targets=linux-x64,linux-arm,linux-arm64,darwin-x64,darwin-arm64 --no-xz
2421
- name: Rename the dist/* files
2522
run: yarn renamedist
2623
# We build mkcert from source because releases are broken

.github/workflows/ubuntu-linux.yml renamed to .github/workflows/ubuntu-build.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
name: '2.x: Linux - Build ce_dev binaries, images and templates'
1+
name: '2.x: Ubuntu - Build and push ce-dev and ce-dev-controller images'
22

33
on:
4-
pull_request:
5-
types:
6-
- opened
4+
push:
75
branches:
86
- 2.x
97

@@ -17,10 +15,9 @@ jobs:
1715
- name: Install modules
1816
run: yarn install --production=false --global
1917
- name: Pack the JS
20-
run: yarn oclif pack tarballs --targets=linux-x64,linux-arm,linux-arm64 --no-xz
18+
run: yarn oclif pack tarballs --targets=linux-x64,linux-arm,linux-arm64,darwin-x64,darwin-arm64 --no-xz
2119
- name: Rename the dist/* files
2220
run: yarn renamedist
23-
# We build mkcert from source because releases are broken
2421
- name: Install test dependencies
2522
run: |
2623
sudo apt-get update
@@ -34,19 +31,16 @@ jobs:
3431
sudo mv ./mkcert /usr/local/bin && cd ../
3532
sudo chmod +x /usr/local/bin/mkcert
3633
rm -Rf mkcert
34+
mkdir -p ~/.config/ce-dev
3735
touch ~/.config/ce-dev/preferences-2.x.yml
3836
echo 'docker_bin: docker' > ~/.config/ce-dev/preferences-2.x.yml
3937
echo 'docker_compose_bin: docker compose' >> ~/.config/ce-dev/preferences-2.x.yml
4038
echo 'mkcert_bin: mkcert' >> ~/.config/ce-dev/preferences-2.x.yml
41-
- name: Build and push Docker images
39+
- name: Build ce-dev and ce-dev-controller
4240
run: |
4341
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
4442
/bin/sh docker-images/export.sh --version 2.x --image-name ce-dev --dockerfile-path base --push
4543
/bin/sh docker-images/export.sh --version 2.x --image-name ce-dev-controller --dockerfile-path controller --push
46-
- name: Test templates with the previous images created
47-
run: |
48-
sudo chmod +x bin/run.js
49-
/bin/sh templates/prebuild.sh --template ce-dev.compose.yml
5044
- name: Publish new ce-dev binaries
5145
uses: softprops/action-gh-release@v1
5246
with:

.github/workflows/ubuntu-pr.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: '2.x: Ubuntu - Test image builds on PR'
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,darwin-x64,darwin-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+
mkdir -p ~/.config/ce-dev
38+
touch ~/.config/ce-dev/preferences-2.x.yml
39+
echo 'docker_bin: docker' > ~/.config/ce-dev/preferences-2.x.yml
40+
echo 'docker_compose_bin: docker compose' >> ~/.config/ce-dev/preferences-2.x.yml
41+
echo 'mkcert_bin: mkcert' >> ~/.config/ce-dev/preferences-2.x.yml
42+
- name: Build ce-dev and ce-dev-controller
43+
run: |
44+
/bin/sh docker-images/export.sh --version 2.x --image-name ce-dev --dockerfile-path base
45+
/bin/sh docker-images/export.sh --version 2.x --image-name ce-dev-controller --dockerfile-path controller
46+
- name: Testing templates
47+
run: |
48+
sudo chmod +x bin/run.js
49+
/bin/sh templates/prebuild.sh --template ce-dev.compose.yml

0 commit comments

Comments
 (0)