Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cbi-dev] [Jenkinsfile + Kubernetes agent] How to deploy to download.eclipse.org?

Hi

Isn't this just an ordinary copy to downloads problem that is solved by a separate promoter/publish job e.g. https://ci.eclipse.org/ocl/job/promoter ?

I evolved a couple of scripts so that ultimately the promote job is just the shell commands parameterized by the upstream job, which of course does not promote if the upstream job fails.

rm -f downloads.sh updates.sh
curl -s -k ${PUBLISH__DOWNLOADS_SH} > downloads.sh
curl -s -k ${PUBLISH__UPDATES_SH} > updates.sh
chmod +x downloads.sh updates.sh
bash -ex downloads.sh
bash -ex updates.sh

http://git.eclipse.org/c/ocl/org.eclipse.ocl.git/tree/releng/org.eclipse.ocl.releng.build-site/downloads.sh
http://git.eclipse.org/c/ocl/org.eclipse.ocl.git/tree/releng/org.eclipse.ocl.releng.build-site/updates.sh
http://git.eclipse.org/c/ocl/org.eclipse.ocl.git/tree/releng/org.eclipse.ocl.releng.build-site/publisher.properties

Regards

Ed Willink


On 09/10/2018 23:02, Mickael Istria wrote:
Hi,

When using a kubernetes agent in a Jenkinsfile on CJE (jenkins.eclipse.org/wildwebdeveloper in this case), how can I copy the build output (a p2 repository) to download.eclipse.org?
I tried mounting the download.eclipse.org volume with
```
apiVersion: v1
kind: Pod
spec:
  containers:
  - name: container
    image: kdvolder/mvn-plus-npm
    tty: true
    command: [ "cat" ]
    volumeMounts:
    - mountPath: download.eclipse.org
      name: download.eclipse.org
  volumes:
  - name: download.eclipse.org
    hostPath:
      path: /home/data/httpd/download.eclipse.org
      type: Directory
```
But
```
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://172.30.40.1/api/v1/namespaces/cje/pods. Message: Forbidden!Configured service account doesn't have access. Service account may have been revoked. pods "buildtestpod-7hf52-fgxqk" is forbidden: unable to validate against any security context constraint: [spec.volumes[0]: Invalid value: "hostPath": hostPath volumes are not allowed to be used].
```

Any suggestion?

--
Mickael Istria
Eclipse IDE developer, for Red Hat DevelopersH


_______________________________________________
cbi-dev mailing list
cbi-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cbi-dev


Virus-free. www.avast.com

Back to the top