@fishawack/lab-env 4.35.0 → 4.35.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitmodules +3 -0
- package/CHANGELOG.md +20 -0
- package/bitbucket-pipelines.yml +41 -4
- package/core/1/CHANGELOG.md +17 -1
- package/core/1/README.md +9 -0
- package/core/1/bitbucket-pipelines.yml +62 -0
- package/core/1/package.json +39 -4
- package/package.json +56 -3
package/.gitmodules
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
|
|
3
|
+
### 4.35.2 (2024-10-02)
|
|
4
|
+
|
|
5
|
+
#### Build Updates
|
|
6
|
+
|
|
7
|
+
* install submodules during release so avail in npm module ([94f14a5](https://bitbucket.org/fishawackdigital/lab-env/commits/94f14a5849d7ad9027503865dd8d4395c25f077f))
|
|
8
|
+
|
|
9
|
+
### 4.35.1 (2024-10-02)
|
|
10
|
+
|
|
11
|
+
#### Build Updates
|
|
12
|
+
|
|
13
|
+
* added setup script that inits submodules ([cdb1415](https://bitbucket.org/fishawackdigital/lab-env/commits/cdb14156ae73ef188d804ce84a5900f74d964e55))
|
|
14
|
+
* Bumped lab-env-core-1 ([9fbdae6](https://bitbucket.org/fishawackdigital/lab-env/commits/9fbdae666f9c70ca82ca891c1027413415b8caac))
|
|
15
|
+
* commit and open pull request against aws-runner on publish" ([174cb20](https://bitbucket.org/fishawackdigital/lab-env/commits/174cb2031dac53121e11c237cd3ddf54d93b6744))
|
|
16
|
+
* escape quote in include check ([658f4ba](https://bitbucket.org/fishawackdigital/lab-env/commits/658f4ba6dadd217ce07486f1165a2a312892f7df))
|
|
17
|
+
* exit early if semantic release doesnt publish anything ([99c7b9f](https://bitbucket.org/fishawackdigital/lab-env/commits/99c7b9fb13b55713fb4f522e08d98c778376fc9b))
|
|
18
|
+
* installed core/1 as a submodule ([f40ad71](https://bitbucket.org/fishawackdigital/lab-env/commits/f40ad711acab83c29b30c3817c0731a956f44abb))
|
|
19
|
+
* publish on more commit types ([4b8ac27](https://bitbucket.org/fishawackdigital/lab-env/commits/4b8ac2725d1a218c516682ec727ce869ddde1237))
|
|
20
|
+
* remove core/1 from repo ([35e96ce](https://bitbucket.org/fishawackdigital/lab-env/commits/35e96ce7ea4723cdf5b144ce28f219b0ce4ca040))
|
|
21
|
+
* use setup script instead of ci directly ([4e2464c](https://bitbucket.org/fishawackdigital/lab-env/commits/4e2464c6d0fd545a2fe4d91821ff56715a6816d6))
|
|
22
|
+
|
|
3
23
|
### 4.35.0 (2024-09-26)
|
|
4
24
|
|
|
5
25
|
#### Features
|
package/bitbucket-pipelines.yml
CHANGED
|
@@ -39,7 +39,7 @@ pipelines:
|
|
|
39
39
|
# Own the .tmp folder as aws-runner so that a non-root user id can be mapped to each container
|
|
40
40
|
- chown -R aws-runner:aws-runner /tmp
|
|
41
41
|
# Install
|
|
42
|
-
- su aws-runner -c 'npm
|
|
42
|
+
- su aws-runner -c 'npm run setup'
|
|
43
43
|
# Test
|
|
44
44
|
- su aws-runner -c 'npm test'
|
|
45
45
|
services:
|
|
@@ -54,9 +54,46 @@ pipelines:
|
|
|
54
54
|
- production
|
|
55
55
|
size: 4x
|
|
56
56
|
script:
|
|
57
|
+
# Install lib deps
|
|
58
|
+
- git submodule init && git submodule update
|
|
57
59
|
# Install release deps
|
|
58
60
|
- npm install -g semantic-release@24 @semantic-release/changelog@6 @semantic-release/git@10 conventional-changelog-conventionalcommits@8
|
|
59
|
-
# Release version
|
|
60
|
-
-
|
|
61
|
+
# Release version via node so can exit out when no release made
|
|
62
|
+
- |
|
|
63
|
+
node -e "const spawn = require('child_process').spawn('semantic-release', ['--repositoryUrl', 'https://$GIT_CREDENTIALS@bitbucket.org/$BITBUCKET_REPO_FULL_NAME'], { env: { ...process.env, FORCE_COLOR: true } }); spawn.stderr.on('data', d => process.stderr.write(d.toString())); spawn.stdout.on('data', d => {process.stdout.write(d.toString()); if(d.toString().includes('There are no relevant changes, so no new version is released.') || d.toString().includes('therefore a new version won\'t be published.')){process.exit(1);}})" || exit 0
|
|
61
64
|
# Sync development after publish
|
|
62
|
-
- git fetch origin "+refs/heads/*:refs/remotes/origin/*" && git checkout -b development origin/development && git merge master && git push origin development
|
|
65
|
+
- git fetch origin "+refs/heads/*:refs/remotes/origin/*" && git checkout -b development origin/development && git merge master && git push origin development
|
|
66
|
+
# Commit and create pull request for new version on aws-runner repo
|
|
67
|
+
- git config --global user.email "digital@fishawack.com"
|
|
68
|
+
- git config --global user.name "Digital Fishawack"
|
|
69
|
+
- git clone https://$GIT_CREDENTIALS@bitbucket.org/fishawackdigital/aws-runner
|
|
70
|
+
- cd aws-runner
|
|
71
|
+
- git checkout -b "$BITBUCKET_REPO_SLUG-$BITBUCKET_COMMIT" origin/development
|
|
72
|
+
- sed -i -e "s/\(@fishawack\/lab-env@\).*/\1$(git ls-remote --tags --refs --sort="v:refname" https://$GIT_CREDENTIALS@bitbucket.org/$BITBUCKET_REPO_FULL_NAME | tail -n1 | sed 's/.*\///')/g" Dockerfile
|
|
73
|
+
- git add .
|
|
74
|
+
- |
|
|
75
|
+
git commit --allow-empty -m "build: Bumped $BITBUCKET_REPO_SLUG"
|
|
76
|
+
- git push origin "$BITBUCKET_REPO_SLUG-$BITBUCKET_COMMIT"
|
|
77
|
+
- |
|
|
78
|
+
curl https://api.bitbucket.org/2.0/repositories/fishawackdigital/aws-runner/pullrequests \
|
|
79
|
+
-u $GIT_CREDENTIALS \
|
|
80
|
+
--header 'Content-Type: application/json' \
|
|
81
|
+
--data "{
|
|
82
|
+
\"title\": \"Bumped $BITBUCKET_REPO_SLUG\",
|
|
83
|
+
\"destination\": {
|
|
84
|
+
\"branch\": {
|
|
85
|
+
\"name\": \"development\"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
\"source\": {
|
|
89
|
+
\"branch\": {
|
|
90
|
+
\"name\": \"$BITBUCKET_REPO_SLUG-$BITBUCKET_COMMIT\"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
\"reviewers\": [
|
|
94
|
+
{
|
|
95
|
+
\"uuid\": \"{2518e4c3-fc1d-4653-b355-c00be099ce6c}\"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
\"close_source_branch\": true
|
|
99
|
+
}"
|
package/core/1/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
|
|
3
|
+
### 1.5.0 (2024-10-01)
|
|
4
|
+
|
|
5
|
+
#### Features
|
|
6
|
+
|
|
7
|
+
* commit into lab-env and create pull request against development on publish ([22e9c66](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/22e9c666dff1e6453090da472a6cd4f0b89c6fbb))
|
|
8
|
+
|
|
9
|
+
#### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* close source branch by default on pull request ([5208373](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/5208373822272c648a547f9b328720cb4fdf9bd4))
|
|
12
|
+
|
|
13
|
+
### 1.4.2 (2024-10-01)
|
|
14
|
+
|
|
15
|
+
#### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* trigger ci ([301d679](https://bitbucket.org/fishawackdigital/lab-env-core-1/commits/301d6795162f0bf8941a3b9413a30092a3e8bf21))
|
|
18
|
+
|
|
3
19
|
### 1.4.1 (2024-07-17)
|
|
4
20
|
* [fix] set global var for git across file system so git avail in mounted volumes i.e node_modules
|
|
5
21
|
|
|
@@ -49,4 +65,4 @@
|
|
|
49
65
|
* [Fix] lftp installed in alpine image as it's needed for content tasks
|
|
50
66
|
|
|
51
67
|
### 1.0.0 (2023-02-21)
|
|
52
|
-
* [Misc] initial commit
|
|
68
|
+
* [Misc] initial commit
|
package/core/1/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
definitions:
|
|
2
|
+
services:
|
|
3
|
+
docker:
|
|
4
|
+
image: docker:dind
|
|
5
|
+
memory: 12288
|
|
6
|
+
|
|
7
|
+
pipelines:
|
|
8
|
+
branches:
|
|
9
|
+
master:
|
|
10
|
+
- step:
|
|
11
|
+
image: fishawack/aws-runner
|
|
12
|
+
runs-on:
|
|
13
|
+
- self.hosted
|
|
14
|
+
- linux
|
|
15
|
+
- production
|
|
16
|
+
size: 4x
|
|
17
|
+
script:
|
|
18
|
+
# Copy ssh keys so physical files exist for agent to use
|
|
19
|
+
- cp /build/*/ssh/* ~/.ssh/
|
|
20
|
+
# Start ssh agent and add all (if any) keys
|
|
21
|
+
- eval `ssh-agent` && ssh-add || true
|
|
22
|
+
# Install release deps
|
|
23
|
+
- npm install -g semantic-release@24 @semantic-release/changelog@6 @semantic-release/git@10 conventional-changelog-conventionalcommits@8
|
|
24
|
+
# Release version
|
|
25
|
+
- semantic-release --repositoryUrl=https://$GIT_CREDENTIALS@bitbucket.org/$BITBUCKET_REPO_FULL_NAME
|
|
26
|
+
# Publish docker image
|
|
27
|
+
- docker login $DOCKER_CREDENTIALS && docker buildx create --use && npm run image
|
|
28
|
+
# Sync development after publish
|
|
29
|
+
- git fetch origin "+refs/heads/*:refs/remotes/origin/*" && git checkout -b development origin/development && git merge master && git push origin development
|
|
30
|
+
# Commit and create pull request for new version on lab-env repo
|
|
31
|
+
- git config --global user.email "digital@fishawack.com"
|
|
32
|
+
- git config --global user.name "Digital Fishawack"
|
|
33
|
+
- git clone https://$GIT_CREDENTIALS@bitbucket.org/fishawackdigital/lab-env
|
|
34
|
+
- cd lab-env
|
|
35
|
+
- git checkout -b "$BITBUCKET_REPO_SLUG-$BITBUCKET_COMMIT" origin/development
|
|
36
|
+
- git submodule init
|
|
37
|
+
- git submodule update
|
|
38
|
+
- git submodule update --remote --merge core/1
|
|
39
|
+
- git add .
|
|
40
|
+
- |
|
|
41
|
+
git commit --allow-empty -m "build: Bumped $BITBUCKET_REPO_SLUG"
|
|
42
|
+
- git push origin "$BITBUCKET_REPO_SLUG-$BITBUCKET_COMMIT"
|
|
43
|
+
- |
|
|
44
|
+
curl https://api.bitbucket.org/2.0/repositories/fishawackdigital/lab-env/pullrequests \
|
|
45
|
+
-u $GIT_CREDENTIALS \
|
|
46
|
+
--header 'Content-Type: application/json' \
|
|
47
|
+
--data "{
|
|
48
|
+
\"title\": \"Bumped $BITBUCKET_REPO_SLUG\",
|
|
49
|
+
\"destination\": {
|
|
50
|
+
\"branch\": {
|
|
51
|
+
\"name\": \"development\"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
\"source\": {
|
|
55
|
+
\"branch\": {
|
|
56
|
+
\"name\": \"$BITBUCKET_REPO_SLUG-$BITBUCKET_COMMIT\"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
\"close_source_branch\": true
|
|
60
|
+
}"
|
|
61
|
+
services:
|
|
62
|
+
- docker
|
package/core/1/package.json
CHANGED
|
@@ -1,11 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "lab-env docker config for the @fishawack/core/1 npm module",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"
|
|
7
|
-
"postversion": "docker buildx build --ssh default --platform linux/amd64,linux/arm64 -t fishawack/lab-env-core-1:$npm_package_version -t fishawack/lab-env-core-1:latest --push . && docker buildx build --ssh default --target alpine --platform linux/amd64,linux/arm64 -t fishawack/lab-env-core-1-alpine:$npm_package_version -t fishawack/lab-env-core-1-alpine:latest --push . && git add . && git commit -m \"build: Bumped fishawack/lab-env-core-1 to $npm_package_version\""
|
|
6
|
+
"image": "docker buildx build --ssh default --platform linux/amd64,linux/arm64 -t fishawack/lab-env-core-1:$npm_package_version -t fishawack/lab-env-core-1:latest --push . && docker buildx build --ssh default --target alpine --platform linux/amd64,linux/arm64 -t fishawack/lab-env-core-1-alpine:$npm_package_version -t fishawack/lab-env-core-1-alpine:latest --push ."
|
|
8
7
|
},
|
|
9
8
|
"author": "Mike Mellor",
|
|
10
|
-
"license": "ISC"
|
|
9
|
+
"license": "ISC",
|
|
10
|
+
"release": {
|
|
11
|
+
"plugins": [
|
|
12
|
+
[
|
|
13
|
+
"@semantic-release/commit-analyzer",
|
|
14
|
+
{
|
|
15
|
+
"preset": "conventionalcommits"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"@semantic-release/release-notes-generator",
|
|
20
|
+
{
|
|
21
|
+
"preset": "conventionalcommits",
|
|
22
|
+
"writerOpts": {
|
|
23
|
+
"headerPartial": "### {{version}} ({{date}})\n",
|
|
24
|
+
"mainTemplate": "{{> header}}\n{{#each commitGroups}}\n\n{{#if title}}\n#### {{title}}\n\n{{/if}}\n{{#each commits}}\n{{> commit root=@root}}\n{{/each}}\n{{/each}}"
|
|
25
|
+
},
|
|
26
|
+
"presetConfig": {
|
|
27
|
+
"commitUrlFormat": "{{host}}/{{owner}}/{{repository}}/commits/{{hash}}"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
[
|
|
32
|
+
"@semantic-release/changelog",
|
|
33
|
+
{
|
|
34
|
+
"changelogTitle": "## Changelog"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
"@semantic-release/npm",
|
|
39
|
+
{
|
|
40
|
+
"npmPublish": false
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"@semantic-release/git"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
11
46
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fishawack/lab-env",
|
|
3
|
-
"version": "4.35.
|
|
3
|
+
"version": "4.35.2",
|
|
4
4
|
"description": "Docker manager for FW",
|
|
5
5
|
"main": "cli.js",
|
|
6
6
|
"scripts": {
|
|
7
|
+
"setup": "npm ci && git submodule init && git submodule update",
|
|
7
8
|
"test": "rm -rf _Test/_fixtures/boilerplate*; CI_BUILD_ID=true mocha _Test/*.js --timeout 12000s --bail"
|
|
8
9
|
},
|
|
9
10
|
"repository": {
|
|
@@ -54,7 +55,29 @@
|
|
|
54
55
|
[
|
|
55
56
|
"@semantic-release/commit-analyzer",
|
|
56
57
|
{
|
|
57
|
-
"preset": "conventionalcommits"
|
|
58
|
+
"preset": "conventionalcommits",
|
|
59
|
+
"releaseRules": [
|
|
60
|
+
{
|
|
61
|
+
"type": "build",
|
|
62
|
+
"release": "patch"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "perf",
|
|
66
|
+
"release": "patch"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "ci",
|
|
70
|
+
"release": "patch"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "refactor",
|
|
74
|
+
"release": "patch"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "style",
|
|
78
|
+
"release": "patch"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
58
81
|
}
|
|
59
82
|
],
|
|
60
83
|
[
|
|
@@ -66,7 +89,37 @@
|
|
|
66
89
|
"mainTemplate": "{{> header}}\n{{#each commitGroups}}\n\n{{#if title}}\n#### {{title}}\n\n{{/if}}\n{{#each commits}}\n{{> commit root=@root}}\n{{/each}}\n{{/each}}"
|
|
67
90
|
},
|
|
68
91
|
"presetConfig": {
|
|
69
|
-
"commitUrlFormat": "{{host}}/{{owner}}/{{repository}}/commits/{{hash}}"
|
|
92
|
+
"commitUrlFormat": "{{host}}/{{owner}}/{{repository}}/commits/{{hash}}",
|
|
93
|
+
"types": [
|
|
94
|
+
{
|
|
95
|
+
"type": "feat",
|
|
96
|
+
"section": "Features"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "fix",
|
|
100
|
+
"section": "Bug Fixes"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "build",
|
|
104
|
+
"section": "Build Updates"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "perf",
|
|
108
|
+
"section": "Performance Improvements"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"type": "ci",
|
|
112
|
+
"section": "CI/CD updates"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "refactor",
|
|
116
|
+
"section": "Code Refactors"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "style",
|
|
120
|
+
"section": "Style Updates"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
70
123
|
}
|
|
71
124
|
}
|
|
72
125
|
],
|