@fishawack/lab-env 4.11.1 → 4.13.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## Changelog
2
2
 
3
+ ### 4.13.0 (2023-02-25)
4
+ * [Change] Bumped fishawack/lab-env-core-1 to 1.2.2
5
+
6
+ ### 4.12.0 (2023-02-25)
7
+ * [Change] Bumped fishawack/lab-env-core-1 to 1.2.1
8
+
3
9
  ### 4.11.1 (2023-02-25)
4
10
  * [Bug] coerce core version to remove tilde/carats
5
11
 
@@ -1,5 +1,15 @@
1
1
  ## Changelog
2
2
 
3
+ ### 1.2.2 (2023-02-25)
4
+ * [fix] set BRANCH and CI_COMMIT_REF_NAME env variables in container
5
+ * [fix] installed git-branch to fetch the current branch for deployment targets
6
+ * [refactor] moved global node module symlinking to alpine image for future use
7
+
8
+ ### 1.2.1 (2023-02-25)
9
+ * [fix] install eb cli into root of image rather than root user directory
10
+ * [perf] dont recurse and dont change group of node_modules to speed up command
11
+ * [refactor] set node git flag without switching user directly in dockerfile
12
+
3
13
  ### 1.1.4 (2023-02-23)
4
14
  * [Fix] Installed missing are-you-es5 global npm module
5
15
  * [Fix] Installed missing check-dependencies global npm module
package/core/1/Dockerfile CHANGED
@@ -26,9 +26,7 @@ ENV PATH="${PATH}:/dart-sass/"
26
26
  RUN rm -rf /sass.tar.gz
27
27
 
28
28
  # Set safe directory to remove intel errors when running git rev-parse
29
- USER node
30
- RUN git config --global --add safe.directory /app
31
- USER root
29
+ RUN su node -c "git config --global --add safe.directory /app"
32
30
 
33
31
  # Install lftp
34
32
  RUN apt-get install -y lftp
@@ -45,6 +43,12 @@ RUN npm install check-dependencies -g
45
43
  # Install node_modules checker
46
44
  RUN npm install are-you-es5 -g
47
45
 
46
+ # Install git branch fetcher
47
+ RUN npm install git-branch -g
48
+
49
+ # Link root global node_modules to ~/.node_modules
50
+ RUN ln -s /usr/local/lib/node_modules/ /home/node/.node_modules
51
+
48
52
  # Cleanup apt-get install folders
49
53
  RUN apt-get clean && \
50
54
  rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@@ -69,14 +73,13 @@ RUN apt-get install -y ghostscript
69
73
  RUN apt-get install zip
70
74
 
71
75
  # Install AWS Elastic Beanstalk cli
72
- RUN apt-get install -y zlib1g-dev libssl-dev libncurses-dev libffi-dev libsqlite3-dev libreadline-dev libbz2-dev
73
- USER node
74
- RUN git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git ~/aws-eb --depth 1 --branch v0.1.2
75
- RUN ~/aws-eb/scripts/bundled_installer
76
- RUN rm -rf ~/aws-eb
77
- ENV PATH="${PATH}:/home/node/.ebcli-virtual-env/executables"
78
- ENV PATH="${PATH}:/home/node/.pyenv/versions/3.7.2/bin"
79
- USER root
76
+ ENV PATH="${PATH}:/.pyenv/versions/3.7.2/bin"
77
+ ENV PATH="${PATH}:/.ebcli-virtual-env/executables"
78
+ RUN apt-get install -y zlib1g-dev libssl-dev libncurses-dev libffi-dev libsqlite3-dev libreadline-dev libbz2-dev && \
79
+ git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git ~/aws-eb --depth 1 --branch v0.1.2 && \
80
+ PYENV_ROOT=/.pyenv ~/aws-eb/scripts/python_installer && \
81
+ python ~/aws-eb/scripts/ebcli_installer.py --location / && \
82
+ rm -rf ~/aws-eb
80
83
 
81
84
  # Install AWS-CLI@2 (arch switch)
82
85
  RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(if [ "$TARGETARCH" = "arm64" ]; then echo 'aarch64'; else echo 'x86_64'; fi).zip" -o "awscliv2.zip"
@@ -93,9 +96,6 @@ RUN apt-get install -y wine64
93
96
  # Install watertight
94
97
  RUN --mount=type=ssh npm install -g git+ssh://git@bitbucket.org/fishawackdigital/watertight-node-auto.git#v6.0.0
95
98
 
96
- # Link root global node_modules to ~/.node_modules
97
- RUN ln -s /usr/local/lib/node_modules/ /home/node/.node_modules
98
-
99
99
  # Cleanup apt-get install folders
100
100
  RUN apt-get clean && \
101
101
  rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@@ -22,6 +22,8 @@ services:
22
22
  - USER_UID=${USER_UID:-0}
23
23
  - USER_GID=${USER_GID:-0}
24
24
  - FW_ROOT=${FW_ROOT:-}
25
+ - BRANCH=${BRANCH:-}
26
+ - CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME:-}
25
27
  volumes:
26
28
  node_modules:
27
29
  driver: "local"
@@ -6,7 +6,7 @@ if [ -z "$FW_ROOT" ]; then
6
6
  usermod -u $USER_UID node &>/dev/null
7
7
 
8
8
  # Own the node_modules folder otherwise it'll be owned by root/previous node id which will prevent writing
9
- chown -R node:node /app/node_modules
9
+ chown node /app/node_modules
10
10
 
11
11
  # Default arguments will always be bash -l, if nothing follows this just start an non login interactive shell
12
12
  if [ -z "${@:3}" ]; then
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core",
3
- "version": "1.1.4",
3
+ "version": "1.2.2",
4
4
  "description": "lab-env docker config for the @fishawack/core/1 npm module",
5
5
  "scripts": {
6
6
  "preversion": "docker login",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishawack/lab-env",
3
- "version": "4.11.1",
3
+ "version": "4.13.0",
4
4
  "description": "Docker manager for FW",
5
5
  "main": "cli.js",
6
6
  "scripts": {