Repository navigation
Closed
Description
What is the issue?
I have not made any changes to my project for a week and it seems something may have changed in the meanwhile. Where the pipeline was working before it fails with the same error both locally and in Github Actions.
I have seen that there have been some changes to when the plan should abort here #2302, perhaps my plan should never have been working in the first place. If this is the case i'd appreciate some pointers in what i did wrong as im a little stuck.
Please let me know if you need more details.
Log output
failed to load plan: "client.platform.os" is not set:
./cue.mod/pkg/dagger.io/dagger/plan.cue:38:3
./cue.mod/pkg/dagger.io/dagger/plan.cue:151:2
Steps to reproduce
- Build a plan using the below cue
import (
"dagger.io/dagger"
"universe.dagger.io/bash"
"universe.dagger.io/docker"
)
dagger.#Plan & {
client: {
filesystem: {
"./": read: {
contents: dagger.#FS
exclude: [
"README.md",
"eden.cue",
]
}
}
env: {
SONAR_LOGIN: dagger.#Secret
GITHUB_REF: GITHUB_REF
}
}
actions: {
deps: {
node:
docker.#Build & {
steps: [
docker.#Pull & {
source: "index.docker.io/node"
},
docker.#Copy & {
contents: client.filesystem."./".read.contents
dest: "./src"
},
]
}
gitleaks:
docker.#Build & {
steps: [
docker.#Pull & {
source: "index.docker.io/zricethezav/gitleaks"
},
docker.#Copy & {
contents: client.filesystem."./".read.contents
dest: "./src"
},
]
}
sonarscanner:
docker.#Build & {
steps: [
docker.#Pull & {
source: "index.docker.io/sonarsource/sonar-scanner-cli"
},
docker.#Copy & {
contents: client.filesystem."./".read.contents
dest: "/usr/src"
},
]
}
}
build: {
bash.#Run & {
workdir: "./src"
input: deps.node.output
script: contents: #"""
npm ci
"""#
}
}
staticAnalysis: {
lint:
bash.#Run & {
workdir: "./src"
input: build.output
script: contents: #"""
npx eslint --color .
"""#
}
sonarscanner:
docker.#Run & {
env: {
GITHUB_BRANCH_NAME: client.env.GITHUB_REF
SONAR_LOGIN: client.env.SONAR_LOGIN
SONAR_HOST_URL: "https://sonarcloud.io"
}
workdir: "/usr/src"
input: deps.sonarscanner.output
}
}
test: {
integrationTest: {
workdir: "./src"
docker.#Run & {
input: build.output
command: {
name: "/bin/bash"
args: ["-c", "npm run test:ci"]
}
}
}
// unitTest: {
// workdir: "./src"
// docker.#Run & {
// input: build.output
// command: {
// name: "/bin/bash"
// args: ["-c", "npm run test:unit"]
// }
// }
// output: code coverage file
// }
}
SCA: {
secretDetection: {
docker.#Run & {
workdir: "./src"
input: deps.gitleaks.output
command: {
name: "detect"
}
}
}
dependencyScanning: {
docker.#Run & {
workdir: "./src"
input: build.output
command: {
name: "/bin/bash"
args: ["-c", "npx audit-ci --high"]
}
}
}
}
}
}
- Attempt to execute the plan
Dagger version
dagger 0.2.8 (92c8c7a) linux/amd64
OS version
Ubuntu 21.10 on WSL
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]🐞 "client.platform.os" is not set when trying to run dagger do[/-][+]🐞 "client.platform.os is not set" when trying to run dagger do[/+][-]🐞 "client.platform.os is not set" when trying to run dagger do[/-][+]🐞 "client.platform.os is not set" when running dagger do[/+]marcosnils commentedon Apr 26, 2022
Seems like outdated packages and you're using the latest dagger release. Can you run
dagger project update? That should resolve the issue.RemakingEden commentedon Apr 27, 2022
Brilliant, it was as simple as that. Thanks @marcosnils ! I'll close this now