Skip to content

Commit

Permalink
Merge pull request #205 from Aflynn50/small-improvements
Browse files Browse the repository at this point in the history
feat: make some small improvements to make this easier to use.
  • Loading branch information
Aflynn50 authored Oct 11, 2024
2 parents 2bb2b73 + 2c61f0c commit 6aec7bd
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,36 @@

The collection of jobs found in this repository make up the CI Run project.
CI Runs' aim is, when triggered by a commit to the juju repository is to:
- Create s tarball snapshot of the codebase
- Create a tarball snapshot of the codebase
- Build binaries (for use in testing and as agents)
- Update the testing streams
- Run the unit tests
- Run the suite of functional tests
- Run the suite of integration tests

The integration tests themselves are not in this repo, they are in
`github.com/juju/juju/tests/suites`. This repo contains the informaion Jekins
needs to run the tests.
## Changing the tests

To change which clouds and which versions the tests run on, edit
`./tools/gen-wire-tests/juju.config`. To change which tests are run,
edit `./jobs/ci-run/integration/integrationtests.yml`.

To build the job descriptions run:
```
JUJU_REPO_PATH="<juju-repo-on-branch-to-generate-jobs-from>" make gen-wire-tests
```

## Uploading to Jenkins

To push, you need to be on the Canonical VPN. Check that everything is working with:
```bash
make push-test
```
And push to https://jenkins.juju.canonical.com/ with:
```bash
make push
```

## Run on Noble 24.04

Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
jenkins-job-builder==6.3.0
setuptools<=65.7.0
jenkins-job-builder==6.4.1
13 changes: 8 additions & 5 deletions tools/gen-wire-tests/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"log"
"os"
Expand Down Expand Up @@ -106,11 +107,13 @@ func main() {
log.Fatal("unable to create output dir", outputDir)
}
} else {
log.Println("Warning: Output Directory already exists. It may overwrite files!")
log.Printf("Warning: Output directory %q already exists. It may overwrite files!\n", outputDir)
// Remove all yaml files so that git can track deleted files as well as new ones.
outFiles, err := outDir.Readdirnames(0)
if err != nil {
log.Fatalf("unable to read output dir files: %v", err)
log.Println("")
log.Fatalf("unable to read output dir files: %v\n "+
"If you are having an issue reading from stdin, check your terminal is not part of a strictly confined snap (e.g. an built-in IDE terminal)", err)
}
for _, f := range outFiles {
if !strings.HasSuffix(f, ".yml") {
Expand All @@ -123,13 +126,13 @@ func main() {
}

reader := bufio.NewReader(os.Stdin)
bytes, err := ioutil.ReadAll(reader)
bytes, err := io.ReadAll(reader)
if err != nil {
log.Fatal("unexpected config", err)
log.Fatal("unexpected config: ", err)
}
var config Config
if err := yaml.Unmarshal(bytes, &config); err != nil {
log.Fatal("config parse error", err)
log.Fatal("config parse error: ", err)
}

dirs, err := ioutil.ReadDir(inputDir)
Expand Down

0 comments on commit 6aec7bd

Please sign in to comment.