mirror of
https://github.com/anchore/syft.git
synced 2026-02-12 10:36:45 +01:00
enhance development support on macOS ARM (#1163)
This commit is contained in:
parent
5e93d1ea1e
commit
7d4f333ec4
8
Makefile
8
Makefile
@ -38,7 +38,7 @@ BOOTSTRAP_CACHE="c7afb99ad"
|
|||||||
DISTDIR=./dist
|
DISTDIR=./dist
|
||||||
SNAPSHOTDIR=./snapshot
|
SNAPSHOTDIR=./snapshot
|
||||||
OS=$(shell uname | tr '[:upper:]' '[:lower:]')
|
OS=$(shell uname | tr '[:upper:]' '[:lower:]')
|
||||||
SNAPSHOT_BIN=$(shell realpath $(shell pwd)/$(SNAPSHOTDIR)/$(OS)-build_$(OS)_amd64_v1/$(BIN))
|
SNAPSHOT_BIN=$(realpath $(shell pwd)/$(SNAPSHOTDIR)/$(OS)-build_$(OS)_amd64_v1/$(BIN))
|
||||||
|
|
||||||
## Variable assertions
|
## Variable assertions
|
||||||
|
|
||||||
@ -111,13 +111,13 @@ $(TEMPDIR):
|
|||||||
|
|
||||||
.PHONY: bootstrap-tools
|
.PHONY: bootstrap-tools
|
||||||
bootstrap-tools: $(TEMPDIR)
|
bootstrap-tools: $(TEMPDIR)
|
||||||
GO111MODULE=off GOBIN=$(shell realpath $(TEMPDIR)) go get -u golang.org/x/perf/cmd/benchstat
|
GO111MODULE=off GOBIN=$(realpath $(TEMPDIR)) go get -u golang.org/x/perf/cmd/benchstat
|
||||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(TEMPDIR)/ $(GOLANGCILINT_VERSION)
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(TEMPDIR)/ $(GOLANGCILINT_VERSION)
|
||||||
curl -sSfL https://raw.githubusercontent.com/wagoodman/go-bouncer/master/bouncer.sh | sh -s -- -b $(TEMPDIR)/ $(BOUNCER_VERSION)
|
curl -sSfL https://raw.githubusercontent.com/wagoodman/go-bouncer/master/bouncer.sh | sh -s -- -b $(TEMPDIR)/ $(BOUNCER_VERSION)
|
||||||
curl -sSfL https://raw.githubusercontent.com/anchore/chronicle/main/install.sh | sh -s -- -b $(TEMPDIR)/ $(CHRONICLE_VERSION)
|
curl -sSfL https://raw.githubusercontent.com/anchore/chronicle/main/install.sh | sh -s -- -b $(TEMPDIR)/ $(CHRONICLE_VERSION)
|
||||||
.github/scripts/goreleaser-install.sh -d -b $(TEMPDIR)/ $(GORELEASER_VERSION)
|
.github/scripts/goreleaser-install.sh -d -b $(TEMPDIR)/ $(GORELEASER_VERSION)
|
||||||
GOBIN="$(shell realpath $(TEMPDIR))" go install github.com/neilpa/yajsv@$(YAJSV_VERSION)
|
GOBIN="$(realpath $(TEMPDIR))" go install github.com/neilpa/yajsv@$(YAJSV_VERSION)
|
||||||
GOBIN="$(shell realpath $(TEMPDIR))" go install github.com/sigstore/cosign/cmd/cosign@$(COSIGN_VERSION)
|
GOBIN="$(realpath $(TEMPDIR))" go install github.com/sigstore/cosign/cmd/cosign@$(COSIGN_VERSION)
|
||||||
|
|
||||||
.PHONY: bootstrap-go
|
.PHONY: bootstrap-go
|
||||||
bootstrap-go:
|
bootstrap-go:
|
||||||
|
|||||||
@ -104,27 +104,29 @@ func TestParseJar(t *testing.T) {
|
|||||||
Manifest: &pkg.JavaManifest{
|
Manifest: &pkg.JavaManifest{
|
||||||
Main: map[string]string{
|
Main: map[string]string{
|
||||||
"Manifest-Version": "1.0",
|
"Manifest-Version": "1.0",
|
||||||
"Specification-Title": "The Jenkins Plugins Parent POM Project",
|
"Specification-Title": "Example Jenkins Plugin",
|
||||||
"Implementation-Title": "example-jenkins-plugin",
|
"Specification-Version": "1.0",
|
||||||
|
"Implementation-Title": "Example Jenkins Plugin",
|
||||||
"Implementation-Version": "1.0-SNAPSHOT",
|
"Implementation-Version": "1.0-SNAPSHOT",
|
||||||
// extra fields...
|
// extra fields...
|
||||||
"Archiver-Version": "Plexus Archiver",
|
//"Archiver-Version": "Plexus Archiver",
|
||||||
"Plugin-License-Url": "https://opensource.org/licenses/MIT",
|
"Plugin-License-Url": "https://opensource.org/licenses/MIT",
|
||||||
"Plugin-License-Name": "MIT License",
|
"Plugin-License-Name": "MIT License",
|
||||||
"Created-By": "Apache Maven",
|
"Created-By": "Maven Archiver 3.6.0",
|
||||||
//"Built-By": "?",
|
//"Built-By": "?",
|
||||||
//"Build-Jdk": "14.0.1",
|
//"Build-Jdk": "14.0.1",
|
||||||
"Jenkins-Version": "2.164.3",
|
"Build-Jdk-Spec": "18",
|
||||||
"Minimum-Java-Version": "1.8",
|
"Jenkins-Version": "2.204",
|
||||||
"Plugin-Developers": "",
|
//"Minimum-Java-Version": "1.8",
|
||||||
"Plugin-ScmUrl": "https://github.com/jenkinsci/plugin-pom/example-jenkins-plugin",
|
"Plugin-Developers": "",
|
||||||
"Extension-Name": "example-jenkins-plugin",
|
"Plugin-ScmUrl": "https://github.com/jenkinsci/plugin-pom/example-jenkins-plugin",
|
||||||
"Short-Name": "example-jenkins-plugin",
|
//"Extension-Name": "example-jenkins-plugin",
|
||||||
"Group-Id": "io.jenkins.plugins",
|
"Short-Name": "example-jenkins-plugin",
|
||||||
"Plugin-Dependencies": "structs:1.20",
|
"Group-Id": "io.jenkins.plugins",
|
||||||
|
"Plugin-Dependencies": "structs:1.20",
|
||||||
//"Plugin-Version": "1.0-SNAPSHOT (private-07/09/2020 13:30-?)",
|
//"Plugin-Version": "1.0-SNAPSHOT (private-07/09/2020 13:30-?)",
|
||||||
"Hudson-Version": "2.164.3",
|
"Hudson-Version": "2.204",
|
||||||
"Long-Name": "TODO Plugin",
|
"Long-Name": "Example Jenkins Plugin",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
PomProperties: &pkg.PomProperties{
|
PomProperties: &pkg.PomProperties{
|
||||||
@ -180,7 +182,7 @@ func TestParseJar(t *testing.T) {
|
|||||||
"Manifest-Version": "1.0",
|
"Manifest-Version": "1.0",
|
||||||
// extra fields...
|
// extra fields...
|
||||||
"Archiver-Version": "Plexus Archiver",
|
"Archiver-Version": "Plexus Archiver",
|
||||||
"Created-By": "Apache Maven 3.6.3",
|
"Created-By": "Apache Maven 3.8.6",
|
||||||
//"Built-By": "?",
|
//"Built-By": "?",
|
||||||
//"Build-Jdk": "14.0.1",
|
//"Build-Jdk": "14.0.1",
|
||||||
"Main-Class": "hello.HelloWorld",
|
"Main-Class": "hello.HelloWorld",
|
||||||
|
|||||||
@ -4,7 +4,7 @@ set -uxe
|
|||||||
# note: this can be easily done in a 1-liner, however circle CI does NOT allow volume mounts from the host in docker executors (since they are on remote hosts, where the host files are inaccessible)
|
# note: this can be easily done in a 1-liner, however circle CI does NOT allow volume mounts from the host in docker executors (since they are on remote hosts, where the host files are inaccessible)
|
||||||
|
|
||||||
PKGSDIR=$1
|
PKGSDIR=$1
|
||||||
CTRID=$(docker create -u "$(id -u):$(id -g)" -e MAVEN_CONFIG=/tmp/.m2 -v /example-java-app -w /example-java-app maven:3.6.3-openjdk-14 mvn -Duser.home=/tmp -DskipTests package)
|
CTRID=$(docker create -u "$(id -u):$(id -g)" -e MAVEN_CONFIG=/tmp/.m2 -v /example-java-app -w /example-java-app maven:3.8.6-openjdk-18 mvn -Duser.home=/tmp -DskipTests package)
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
docker rm "${CTRID}"
|
docker rm "${CTRID}"
|
||||||
@ -16,4 +16,4 @@ set +e
|
|||||||
docker cp "$(pwd)/example-java-app" "${CTRID}:/"
|
docker cp "$(pwd)/example-java-app" "${CTRID}:/"
|
||||||
docker start -a "${CTRID}"
|
docker start -a "${CTRID}"
|
||||||
mkdir -p "$PKGSDIR"
|
mkdir -p "$PKGSDIR"
|
||||||
docker cp "${CTRID}:/example-java-app/target/example-java-app-maven-0.1.0.jar" "$PKGSDIR"
|
docker cp "${CTRID}:/example-java-app/target/example-java-app-maven-0.1.0.jar" "$PKGSDIR"
|
||||||
|
|||||||
@ -4,7 +4,7 @@ set -uxe
|
|||||||
# note: this can be easily done in a 1-liner, however circle CI does NOT allow volume mounts from the host in docker executors (since they are on remote hosts, where the host files are inaccessible)
|
# note: this can be easily done in a 1-liner, however circle CI does NOT allow volume mounts from the host in docker executors (since they are on remote hosts, where the host files are inaccessible)
|
||||||
|
|
||||||
PKGSDIR=$1
|
PKGSDIR=$1
|
||||||
CTRID=$(docker create -u "$(id -u):$(id -g)" -e MAVEN_CONFIG=/tmp/.m2 -v /example-jenkins-plugin -w /example-jenkins-plugin maven:3.6.3-openjdk-14 mvn -Duser.home=/tmp -DskipTests package)
|
CTRID=$(docker create -u "$(id -u):$(id -g)" -e MAVEN_CONFIG=/tmp/.m2 -v /example-jenkins-plugin -w /example-jenkins-plugin maven:3.8.6-openjdk-18 mvn -Duser.home=/tmp -DskipTests package)
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
docker rm "${CTRID}"
|
docker rm "${CTRID}"
|
||||||
@ -17,4 +17,4 @@ docker cp "$(pwd)/example-jenkins-plugin" "${CTRID}:/"
|
|||||||
docker start -a "${CTRID}"
|
docker start -a "${CTRID}"
|
||||||
mkdir -p "$PKGSDIR"
|
mkdir -p "$PKGSDIR"
|
||||||
docker cp "${CTRID}:/example-jenkins-plugin/target/example-jenkins-plugin.hpi" "$PKGSDIR"
|
docker cp "${CTRID}:/example-jenkins-plugin/target/example-jenkins-plugin.hpi" "$PKGSDIR"
|
||||||
docker cp "${CTRID}:/example-jenkins-plugin/target/example-jenkins-plugin.jar" "$PKGSDIR"
|
docker cp "${CTRID}:/example-jenkins-plugin/target/example-jenkins-plugin.jar" "$PKGSDIR"
|
||||||
|
|||||||
@ -4,7 +4,7 @@ set -uxe
|
|||||||
# note: this can be easily done in a 1-liner, however circle CI does NOT allow volume mounts from the host in docker executors (since they are on remote hosts, where the host files are inaccessible)
|
# note: this can be easily done in a 1-liner, however circle CI does NOT allow volume mounts from the host in docker executors (since they are on remote hosts, where the host files are inaccessible)
|
||||||
|
|
||||||
PKGSDIR=$1
|
PKGSDIR=$1
|
||||||
CTRID=$(docker create -u "$(id -u):$(id -g)" -e MAVEN_CONFIG=/tmp/.m2 -v /example-sb-app -w /example-sb-app maven:3.6.3-openjdk-14 mvn -Duser.home=/tmp -DskipTests package spring-boot:repackage)
|
CTRID=$(docker create -u "$(id -u):$(id -g)" -e MAVEN_CONFIG=/tmp/.m2 -v /example-sb-app -w /example-sb-app maven:3.8.6-openjdk-18 mvn -Duser.home=/tmp -DskipTests package spring-boot:repackage)
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
docker rm "${CTRID}"
|
docker rm "${CTRID}"
|
||||||
@ -16,4 +16,4 @@ set +e
|
|||||||
docker cp "$(pwd)/example-sb-app" "${CTRID}:/"
|
docker cp "$(pwd)/example-sb-app" "${CTRID}:/"
|
||||||
docker start -a "${CTRID}"
|
docker start -a "${CTRID}"
|
||||||
mkdir -p "$PKGSDIR"
|
mkdir -p "$PKGSDIR"
|
||||||
docker cp "${CTRID}:/example-sb-app/target/spring-boot-0.0.1-SNAPSHOT.jar" "$PKGSDIR"
|
docker cp "${CTRID}:/example-sb-app/target/spring-boot-0.0.1-SNAPSHOT.jar" "$PKGSDIR"
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jenkins-ci.plugins</groupId>
|
<groupId>org.jenkins-ci.plugins</groupId>
|
||||||
<artifactId>plugin</artifactId>
|
<artifactId>plugin</artifactId>
|
||||||
<version>3.50</version>
|
<version>4.46</version>
|
||||||
<relativePath />
|
<relativePath />
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>io.jenkins.plugins</groupId>
|
<groupId>io.jenkins.plugins</groupId>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
<packaging>hpi</packaging>
|
<packaging>hpi</packaging>
|
||||||
<properties>
|
<properties>
|
||||||
<!-- Baseline Jenkins version you use to build the plugin. Users must have this version or newer to run. -->
|
<!-- Baseline Jenkins version you use to build the plugin. Users must have this version or newer to run. -->
|
||||||
<jenkins.version>2.164.3</jenkins.version>
|
<jenkins.version>2.204</jenkins.version>
|
||||||
<java.level>8</java.level>
|
<java.level>8</java.level>
|
||||||
<!-- Other properties you may want to use:
|
<!-- Other properties you may want to use:
|
||||||
~ jenkins-test-harness.version: Jenkins Test Harness version you use to test the plugin. For Jenkins version >= 1.580.1 use JTH 2.0 or higher.
|
~ jenkins-test-harness.version: Jenkins Test Harness version you use to test the plugin. For Jenkins version >= 1.580.1 use JTH 2.0 or higher.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
~ stapler-plugin.version: The Stapler Maven plugin version required by the plugin.
|
~ stapler-plugin.version: The Stapler Maven plugin version required by the plugin.
|
||||||
-->
|
-->
|
||||||
</properties>
|
</properties>
|
||||||
<name>TODO Plugin</name>
|
<name>Example Jenkins Plugin</name>
|
||||||
<!-- The default licence for Jenkins OSS Plugins is MIT. Substitute for the applicable one if needed. -->
|
<!-- The default licence for Jenkins OSS Plugins is MIT. Substitute for the applicable one if needed. -->
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
//go:build !arm64
|
||||||
|
|
||||||
package integration
|
package integration
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
FROM jenkins:2.60.3
|
FROM jenkins/jenkins:2.346.3-slim-jdk17
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user