Skip to content

Commit

Permalink
improve(build): update pkg version and sign mac executables
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald authored and thsig committed Feb 25, 2022
1 parent ae49bd7 commit 9cbc785
Show file tree
Hide file tree
Showing 11 changed files with 231 additions and 104 deletions.
34 changes: 33 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ orbs:
# Configuration for our node jobs
node-config: &node-config
docker:
- image: gardendev/circleci-runner:12.22.2-0
- image: gardendev/circleci-runner:12.22.10-0
environment:
<<: *shared-env-config
resource_class: medium
Expand Down Expand Up @@ -775,6 +775,35 @@ jobs:
command: |
sudo -E ./bin/garden plugins local-kubernetes cleanup-cluster-registry --root core/test/data/test-projects/container --env cluster-docker
test-macos:
macos:
xcode: "12.5.1"
steps:
- checkout
- *attach-workspace
# - run:
# name: Configure Node.js
# command: nvm install 12 && nvm alias default 12
- run:
name: brew install
command: brew install docker kubectl
- run:
name: Install gcloud SDK
command: |
cd $HOME
curl -LO https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-373.0.0-darwin-x86_64.tar.gz
tar xzf google-cloud-sdk-373.0.0-darwin-x86_64.tar.gz
echo 'export PATH=$HOME/google-cloud-sdk/bin:$PATH' >> $BASH_ENV
- docker_login
- configure_kubectl_context
- run:
name: Deploy demo-project
command: CIRCLE_BUILD_NUM=$CIRCLE_BUILD_NUM-macos dist/macos-amd64/garden deploy --root examples/demo-project --logger-type basic --env remote
- run:
name: Cleanup
command: kubectl delete --wait=false $(kubectl get ns -o name | grep $CIRCLE_BUILD_NUM-macos) || true
when: always

test-windows:
executor: win/vs2019
steps:
Expand Down Expand Up @@ -869,6 +898,9 @@ workflows:
# Don't attempt to run dist tests for external PRs (they won't have access to the required keys)
<<: *only-internal-prs
requires: [build-dist]
- test-macos:
<<: *only-internal-prs
requires: [build-dist]
- test-windows:
<<: *only-internal-prs
requires: [build-dist]
Expand Down
1 change: 0 additions & 1 deletion bin/garden

This file was deleted.

5 changes: 5 additions & 0 deletions bin/garden
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -e

repo_root=$(cd `dirname $0` && cd .. && pwd)

node --max-old-space-size=4096 ${repo_root}/cli/bin/garden "$@"
2 changes: 1 addition & 1 deletion cli/bin/garden
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node --max-old-space-size=4096
#!/usr/bin/env node

if (process.env.GARDEN_ENABLE_PROFILING === "1" || process.env.GARDEN_ENABLE_PROFILING === "true") {
// Patch require to profile module loading
Expand Down
2 changes: 1 addition & 1 deletion cli/bin/garden-debug
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env node --inspect --max-old-space-size=4096
#!/usr/bin/env node --inspect

require("./garden")
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"minimist": "^1.2.5",
"mocha": "^8.1.1",
"patch-package": "^6.4.7",
"pkg": "4.5.1",
"pkg": "5.5.2",
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.1.0",
"split2": "^3.2.2",
Expand Down
8 changes: 4 additions & 4 deletions cli/patches/pkg+4.5.1.patch → cli/patches/pkg+5.5.2.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
diff --git a/node_modules/pkg/prelude/bootstrap.js b/node_modules/pkg/prelude/bootstrap.js
index b87902f..4e94661 100644
index 7285b7c..27d3975 100644
--- a/node_modules/pkg/prelude/bootstrap.js
+++ b/node_modules/pkg/prelude/bootstrap.js
@@ -1512,7 +1512,7 @@ function payloadFileSync(pointer) {
@@ -1870,7 +1870,7 @@ function payloadFileSync(pointer) {
}
var opts = args[pos];
if (!opts.env) opts.env = require('util')._extend({}, process.env);
const opts = args[pos];
if (!opts.env) opts.env = _extend({}, process.env);
- if (opts.env.PKG_EXECPATH === 'PKG_INVOKE_NODEJS') return;
+ if (opts.env.PKG_EXECPATH !== undefined) return;
opts.env.PKG_EXECPATH = EXECPATH;
Expand Down
2 changes: 1 addition & 1 deletion core/test/unit/src/vcs/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ describe("GitHandler", () => {
submodulePath = await realpath(submodule.path)
initFile = await commit("init", submodulePath)

await execa("git", ["submodule", "add", submodulePath, "sub", "--force"], { cwd: tmpPath })
await execa("git", ["submodule", "add", "--force", "--", submodulePath, "sub"], { cwd: tmpPath })
await execa("git", ["commit", "-m", "add submodule"], { cwd: tmpPath })
})

Expand Down
21 changes: 20 additions & 1 deletion images/circleci-runner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
#### gcloud base image ####
FROM google/cloud-sdk:277.0.0 as gcloud

#### ldid utility ####
FROM cimg/node:12.22.10 as ldid

RUN sudo apt-get update && sudo apt-get install -qq -y --no-install-recommends \
git \
perl \
curl \
build-essential

RUN cd /tmp && \
git clone https://github.com/xerub/ldid.git && \
cd ldid && \
git submodule update --init && \
./make.sh && \
sudo cp -f ./ldid /usr/local/bin/ldid

#### main ####
FROM cimg/node:12.22.2
FROM cimg/node:12.22.10

# install system deps
RUN sudo apt-get update && sudo apt-get -y install rsync parallel python3

# install ldid
COPY --from=ldid /usr/local/bin/ldid /usr/local/bin

# install gcloud
ENV CLOUDSDK_PYTHON=python3
COPY --from=gcloud /usr/lib/google-cloud-sdk /usr/lib/google-cloud-sdk
Expand Down
2 changes: 1 addition & 1 deletion images/circleci-runner/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ kind: Module
type: container
name: circleci-runner
description: Used for the core pipeline in CircleCI
image: gardendev/circleci-runner:12.22.2-0
image: gardendev/circleci-runner:12.22.10-0
2 changes: 1 addition & 1 deletion support/alpine-builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apk add --no-cache \
WORKDIR /tmp/pkg

# Pre-fetch the node12 binary for pkg
RUN yarn add pkg@4.5.1 && \
RUN yarn add pkg@5.5.2 && \
node_modules/.bin/pkg-fetch node12 alpine x64

# Add all the packages
Expand Down
Loading

0 comments on commit 9cbc785

Please sign in to comment.