This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "embed" | |
| "log" | |
| "net/http" | |
| ) | |
| //go:embed static/* | |
| var content embed.FS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| container_scanning: | |
| stage: test | |
| image: | |
| name: docker.io/aquasec/trivy:latest | |
| entrypoint: [""] | |
| variables: | |
| # No need to clone the repo, we exclusively work on artifacts. See | |
| # https://docs.gitlab.com/ee/ci/runners/README.html#git-strategy | |
| GIT_STRATEGY: none | |
| TRIVY_USERNAME: "$CI_REGISTRY_USER" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| default: | |
| before_script: | |
| - apt-get update -qq && apt-get install -y -qq sqlite3 libsqlite3-dev nodejs | |
| - gem install bundler --no-document | |
| - bundle install --jobs $(nproc) "${FLAGS[@]}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "flag" | |
| "io" | |
| "log" | |
| "net" | |
| "net/http" | |
| "strings" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "github.com/prometheus/client_golang/prometheus" | |
| "github.com/prometheus/client_golang/prometheus/promhttp" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import hudson.model.* | |
| // get all running jobs | |
| Jenkins.instance.getAllItems(AbstractItem.class).each { item -> | |
| if (item instanceof org.jenkinsci.plugins.workflow.job.WorkflowJob && item.fullName.contains("your-job")) { | |
| item.builds.each { build -> | |
| if (build.isBuilding()) { | |
| println "Stopping build: ${build.fullDisplayName}" | |
| build.doStop() // stop running job | |
| } |
OlderNewer